I want to build a multi-radio ad-hoc network using the RPi 3. So far I am able to create a 2 node network using the on-board WiFi interface (broadcom, wlan0).
I tried to add a second interface (rtl8812au, wlan1). I compiled the driver from source (tried 2 repos: https://github.com/gnab/rtl8812au and https://github.com/astsam/rtl8812au). Both drivers compile ok. When I boot, it seems to work (I can see both wlan interfaces).
My problem is that it looks like I cannot use both interfaces at the same time (I ommitted lo and eth0):
pi@rpi1:~ $ ifconfig
wlan0 Link encap:Ethernet HWaddr 74:da:38:84:2c:cc
inet addr:10.0.11.2 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::76da:38ff:fe84:2ccc/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:2 overruns:0 frame:0
TX packets:2 errors:0 dropped:39 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24 (24.0 B) TX bytes:810 (810.0 B)
wlan1 Link encap:Ethernet HWaddr b8:27:eb:8c:82:f4
inet addr:10.0.4.2 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST PROMISC MULTICAST MTU:1500 Metric:1
RX packets:16 errors:0 dropped:16 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1825 (1.7 KiB) TX bytes:0 (0.0 B)
pi@rpi1:~ $ iwconfig
wlan0 IEEE 802.11abgn ESSID:"channelEleven"
Mode:Ad-Hoc Frequency:2.462 GHz Cell: AA:69:A6:90:CB:7B
Tx-Power=12 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
wlan1 IEEE 802.11bgn ESSID:"channelFour"
Mode:Ad-Hoc Frequency:2.427 GHz Cell: Not-Associated
Tx-Power=31 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:on
As you may see, wlan0 has tx-power = 12dbm, while wlan1 is 31dbm. As far as I could understand, at boot time, the Pi randomly chooses one of the interfaces to be the main one (whichever has 30+ dbm), some times it's wlan0 sometimes wlan1.
If I turn a secondary Pi (rpi2) with the same settings (different ip of course), I am able to ping both interfaces, but it turns out only one iface is used (i.e. the RX/TX bytes never increase on the 12dB one), thus only one interface is being controlled/used/whatever the correct term is.
I'm not the most driver/savvy person, am I missing some config? This is my /etc/network:
auto lo
iface lo inet loopback
iface eth0 inet manual
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
wireless-essid channelEleven
wireless-channel 11
wireless-mode ad-hoc
address 10.0.11.2
netmask 255.0.0.0
auto wlan1
allow-hotplug wlan1
iface wlan1 inet static
wireless-essid channelFour
wireless-channel 4
wireless-mode ad-hoc
address 10.0.4.2
netmask 255.0.0.0
Thanks in advance!
Edit:
This is the topology I'm trying to make:
------------------------
| node1 |
------------------------
| wlan0 | wlan1 |
| 10.0.11.1 | 10.0.4.1 |
------------------------
/|\ /|\
| |
| |
(channel 11) (channel 4)
(freq 2.462) (freq 2.427)
| |
| |
\|/ \|/
------------------------
| wlan0 | wlan1 |
| 10.0.11.2 | 10.0.4.2 |
------------------------
| node2 |
------------------------
Another piece of information: I thought the power supply might be the issue, but I don't think it is, I had a 5V 1A supply before, now I have a 5V 2.5A, but the problem persists.