Power & Source of Big Ideas

Two wifi with Neo Air

Moderators: chensy, FATechsupport

I'm trying to setup a Neo Air with 2 wifi interfaces - the built in one plus another dongle connected on the USB. I'm getting some funny things and I wonder if there are some issues with the WiFi drivers.

First I use the stock kernel:

Code: Select all

root@poppy:~# uname -a
Linux poppy 3.4.39-h3 #24 SMP PREEMPT Tue Oct 18 13:31:10 CST 2016 armv7l armv7l armv7l GNU/Linux

If I run lsusb I can see the dongle:

Code: Select all

root@poppy:~# lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

(ignore the FTDI chip for the moment - that is an interface for controlling some Dynamixel servos in a robot).

If I check lsmod the drivers are loaded correctly:

Code: Select all

root@poppy:~# lsmod
Module                  Size  Used by
rtl8192cu             613413  0
ftdi_sio               29102  0
bcmdhd                599208  0
cfg80211              470273  1 bcmdhd
compat                 25372  2 cfg80211,bcmdhd

The problems start if I want to look at the wifi adapters:

Code: Select all

root@poppy:~# iwconfig
gre0      no wireless extensions.

lo        no wireless extensions.

tunl0     no wireless extensions.

sit0      no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:"B52_EXT"
          Mode:Managed  Frequency:2.437 GHz  Access Point: A0:63:91:C7:69:B3
          Bit Rate=52 Mb/s   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=57/70  Signal level=-53 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:13  Invalid misc:1   Missed beacon:0

enx0013ef650829  unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated
          Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ip6tnl0   no wireless extensions.

As you can see the second adapter has a very funny looking descriptor - derived from the MAC address. In other systems (Raspberry Pi) this second adapter was shown as wlan1 (as you would expect).

And if I run ifconfig the interface is missing completely:

Code: Select all

root@poppy:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 94:a1:a2:a3:ef:5a
          inet addr:192.168.0.27  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::96a1:a2ff:fea3:ef5a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:291 errors:0 dropped:0 overruns:0 frame:0
          TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:32392 (32.3 KB)  TX bytes:21945 (21.9 KB)

It would be nice if anyone can come with some suggestions.

Thanks.
Maybe do a :

Code: Select all

ifdown wlan0

then another

Code: Select all

iwconfig or iwlist scan


As well as the unassociated comment it looks like the signal level is non-existent or is that an expected result?
Apparently this has something to do with Predictable Network Interface Names. It looks like it works as fine as the wlan1, etc. but you need to copy and paste the long interface name in the config files.

I've managed to setup a Neo with the built in wlan0 connecting to my wifi network while the dongle is setup as an AP and runs dhcp server. Additionally NAT is setup to route traffic from one to the other so that if wlan0 is connected to WiFi then when I connect to the AP I can still have internet access.

This is a very convenient way to manage robots - because you can take them anywhere and the AP will allow you to connect and work with the robot independent on any available networks, but you still have the second WiFi so that when connected to network you can get access to internet (and update the software for instance).
Thanks for the added information. Maybe I will another go using two WiFi dongles, one to talk to my Smartphone Hotspot and the other talking via WiFi to a Solar Battery Management system.

Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 28 guests