I'm trying to setup an ad-hoc network (intranet-only, no internet) of RPi4s (Buster 2019-09-26) using dongles with detachable antennas. I can successfully
- setup ad-hoc modes on the internal WiFi (both 2GHz and 5GHz) and add
babeldon top of it.
- get internet from a WiFi USB dongle (used
MrEngmanscripts to install drivers).
But I can't get ad-hoc to work on the dongles though - I set things up same as for
wlan0 but packets don't go through. Searching around indicates it's probably the dongle that can't do ad-hoc.
My question is: what is the attribute I should look for in a dongle? So far all were using the
rtl8822bu, is that the culprit? How can I check ahead of time if a chipset will work? I don't mind scouring the internet looking for the right dongle, but I'm not sure what makes the right one right or why.
Current setup process in case it's not a hardware issue:
sudo systemctl stop dhcpcd.service sudo ifconfig wlan0 down sudo nano /etc/network/interfaces
Make it look like
# interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback iface eth0 inet dhcp auto wlan0 iface wlan0 inet static address xxx.xxx.xx.xx netmask 255.255.255.0 wireless-channel 44 wireless-essid my_net wireless-mode ad-hoc
sudo ifconfig wlan0 up sudo reboot
Do this for each Pi, changing the static IP, and you have an ad-hoc network!
Connect to the internet using
wlan0, plug dongle in, then run
sudo wget http://www.fars-robotics.net/install-wifi -O /usr/bin/install-wifi sudo chmod +x /usr/bin/install-wifi sudo install-wifi
You can now connect to the internet through your dongle! Now follow the
wlan0 steps but set it up for
wlan1 (and add
iface wlan0 inet dhcp to the
sudo iw list | grep -A 12 -i "valid interface combinations"
Supported interface modes * IBSS * managed * AP * P2P-client * P2P-GO Band 1: Capabilities: 0x1963 RX LDPC HT20/HT40 Static SM Power Save RX HT20 GI RX HT40 SGI -- Supported interface modes * IBSS * managed * AP * P2P-client * P2P-GO * P2P-device Band 1: Capabilities: 0x1022 HT20/HT40 Static SM Power Save RX HT20 GI No RX STBC