Many coffee/guest Wi-Fi networks require a portal login that a Tesla can’t complete reliably. With this setup:
- Your Pi joins the Wi-Fi
- You complete the portal login from your phone/laptop while connected to the Pi AP
- Once authorized, the network usually whitelists the Pi’s WAN MAC, and your system (Tesla Car) gets internet through NAT.
This repository installs a travel-router stack for Raspberry Pi that only supports Qualcomm Atheros AR9271 USB Wi‑Fi adapters using ath9k_htc.
- Use Raspberry Pi OS (Bookworm or older supported Debian-based Pi OS variants).
- Ensure internet is working on your Pi for package installation.
- Plug in the Qualcomm Atheros AR9271 USB Wi‑Fi dongle. (https://amzn.to/4tpAeai)
- Install git if needed:
sudo apt update sudo apt install -y git
- Clone this repo to a stable location on the Pi (recommended:
/opt/traveling-pi-router):sudo mkdir -p /opt cd /opt sudo git clone https://github.com/CocoHusky/Traveling-Pi-Router.git traveling-pi-router cd /opt/traveling-pi-router
You can run the installer from any folder, but
/opt/traveling-pi-routeris recommended so scripts stay in a predictable location for future updates.
From the cloned repo directory:
cd /opt/traveling-pi-router
sudo ./install.shThe installer fails fast if AR9271/ath9k_htc is not detected.
- Plug in your AR9271 dongle.
- Run:
(or
iw dev
ip link) - Copy the MAC address of the USB Wi‑Fi interface.
sudo nano /etc/travelrouter/config.envChange at least these values:
SSIDPASSPHRASEAP_IFACE_MACCOUNTRY
Default config generated by installer:
SSID=TravelRouter
PASSPHRASE=changeme123
AP_IFACE_MAC=00:11:22:33:44:55
COUNTRY=US
WAN_IF=wlan0
LAN_IF=wlan1
LAN_CIDR=192.168.50.1/24
DHCP_START=192.168.50.20
DHCP_END=192.168.50.150sudo systemctl enable --now travelrouterIf your interface name does not immediately become LAN_IF (wlan1 by default), reboot once:
sudo rebootiw dev
ip a show wlan1
systemctl status travelrouter hostapd dnsmasq
cat /var/lib/misc/dnsmasq.leasesExpected:
iw dev: LAN interface is typeAPand shows your SSID.ip a show wlan1: includes192.168.50.1/24.systemctl status ...: services are active/running.dnsmasq.leases: clients appear after connecting.
- Interface naming is done via systemd
.linkusing your configuredAP_IFACE_MAC(/etc/systemd/network/10-travelrouter.link), not udevNAME=rules. - If NetworkManager is installed, installer/startup automatically mark
LAN_IFunmanaged so hostapd can own AP mode. - If dhcpcd is installed, installer/startup enforce
denyinterfaces LAN_IF. - Installer/startup automatically unmask and enable
hostapdanddnsmasq. - The AP config uses
nl80211and a fixed channel (channel=6); AR9271/ath9k_htccan be quirky with ACS/auto-channel selection. - Scripts avoid logging your plaintext passphrase.
sudo ./uninstall.shThis removes installed service/scripts/link files and keeps /etc/travelrouter/config.env for reuse.