-
Notifications
You must be signed in to change notification settings - Fork 356
Setting up External Wi‐Fi Adapter for Archiving
This guide may help people who choose to use an external Wi-Fi adapter on a board that already has an integrated Wi-Fi. This can be useful if your archiving operation does not complete in time before the car sleeps, or you prefer a higher throughput connection for whatever reason. In this setup, the integrated Wi-Fi card is used for Access Point functionality. If the latter is not needed, you may disable the integrated Wi-Fi completely (in which case the guide below will need to be corrected as your interface names will change). This has been tested on a Raspberry Pi 4B and assumes the standard "one step setup" as a starting point.
- Ensure your external card works, i.e. install or compile drivers if needed, ensure wlan1 interface is present by executing
iwconfig
. I used a BrosTrend adapter, so just followed https://linux.brostrend.com. -
rm /etc/udev/rules.d/70-persistent-net.rules
as no need to create theap0
alias anymore. - edit
/etc/dnsmasq.conf
:
interface=lo,wlan0
no-dhcp-interface=lo,wlan1
#bind-interfaces
bogus-priv
dhcp-range=192.168.66.100,192.168.66.150,12h
# don't configure a default route, we're not a router
dhcp-option=3
- edit
/etc/hostapd/hostapd.conf
, here are only the differences. Note that I use RPi 4B with 5GHz ac card, so I set it up for max speed:
interface=wlan0
# "a" simply means 5GHz
hw_mode=a
# 802.11ac and 802.11n support
ieee80211ac=1
ieee80211n=1
# the channel to use, automatic (0) didn't work
channel=36
- edit
/etc/network/interfaces
and comment out or remove everything related toap0
:
#auto ap0
#allow-hotplug ap0
#iface ap0 inet static
# address 192.168.66.1
# netmask 255.255.255.0
# hostapd /etc/hostapd/hostapd.conf
- edit
/etc/dhcpcd.conf
and replaceap0
withwlan0
and add IP configuration, the end will look like this:
interface wlan0
static ip_address=192.168.66.1/24
nohook wpa_supplicant
There has been a report of the following alternative way of configuring wlan0
that works (the steps below replace the corresponding steps above):
5. edit /etc/network/interfaces
and replace ap0
with wlan0
so that it looks like this:
source-directory /etc/network/interfaces.d
auto lo
auto wlan0
iface lo inet loopback
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.66.1
netmask 255.255.255.0
hostapd /etc/hostapd/hostapd.conf
- edit
/etc/dhcpcd.conf
and replaceap0
withwlan0
at the end of the file:
interface wlan0
nohook wpa_supplicant