Multiple ethernet connections

I need to use the Wifi-wing as an access point. While I am doing development i need a second ethernet connection to manage the device, download code, and debug.
I have tried a usb LAN adapter and a USB wifi adapter but neither appears when I run $ ip a or $ iw list.

How can I connect a usb LAN or wifi adapter so I can have a second ethernet connection when I convert the wifi-wing to AP mode.

Note that when i run $ iw list it indicates that for the wifi-wing “interface combinations are not supported” so I cannot use the wifi-wing as both client and AP.

It’s likely that the driver for the USB device you’re using isn’t in the default image. If you can find out what the chipset is, it shouldn’t be too hard to enable it in the kernel. Once you get that setup, it should be as easy as editing the networking interfaces config and setup a static IP or use dhcp for the USB device.

I have a TP-Link USB Wifi TL-WN722N which has Atheros AR9271 chip.
Referring to https://wiki.debian.org/ath9k_htc I run
$ sudo apt-get install firmware-atheros
I did this, then reboot and cannot see the device with $ ip a or $ sudo iw list
Any iseas on how to go further with this?

I also have a TP-Link LAN USB UE300 with Realtek 8153 chip
Referring to https://www.pcsuggest.com/install-rtl8153-driver-linux/
I download the realtek driver from: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software
then
$ tar xvf r8152.53.56-2.12.0.tar
$ sudo apt-get install linux-headers-4.9.0-11-all-armhf libelf-dev
$ cd r8152…
$ make
I get the error: no such file or directory ‘/lib/modules/5.0.0+/kernel/drivers/net/usb’
Any ideas on how to progress ?

Have an RTL8152 (same driver as the 8153) I was going to try to get working myself. Looks like this driver is in the kernel mainline with config USB_RTL8152:

Might be easier to just turn it on in the config menu when building the kernel from https://github.com/Groboards/giantboard-tools. I am about to try this now. I’ll try to keep up to date.

In regard to why the atheros doesn’t work, it looks like you are attempting to use a Debian repo package which might assume that a Debian kernel is used. However, the giantboard images use a custom 5.0 kernel. Looks like a similar problem might be happening when you try to build the out-of-tree driver source for the realtek (the headers installed are not for the running kernel).

To update, enabling the RTL8152 driver in the kernel config menu when building the kernel from giantboard-tools does the trick for me!

Also, for anyone else looking for a slick way to get ethernet to this board while still powering from the same USB port, I’m using a chromecast ethernet/power adapter which has the RTL8152 chipset. Seems to be working fine (after enabling the driver).
https://store.google.com/us/product/ethernet_adapter_for_chromecast

1 Like

I have run config and enabled the RTL8152 driver for USB. Although there is no direct Atheros 9x driver I enabled everything USB Wifi Atheros that referenced 9x. With the new kernel there is still no indication that the wifi or LAN device via USB is attached.

Back to the stock image I have tried attaching a USB video camera and nothing appeared under /dev/video. I also attached a USB Memory stick but nothing appeared under /media. I tried two different uSB-to-USBA cables and neither worked.

I tried both uUSB-to-USBA cabled on a Raspberry pi zero and all 4 devices worked fine (Video, memory, LAN, Wifi).

Any ideas?
With the new image you built with the RTL8152 driver built, what di you do to enable the driver ?
What do I need to do to enable a video camera and USB memery stick? Do i need to add those drivers to the new image ?

For the realtek: after the driver is registered with usbcore in the kernel (happens automatically when you enable the driver in the kernel build), the device should come up automatically after USB enumeration. Try taking a peak at dmesg?

debian@giantboard:~$ sudo dmesg | grep 'usb 1\|r8152'
[    0.210000] usbcore: registered new interface driver r8152
[    0.610000] usb 1-1: new high-speed USB device number 2 using atmel-ehci
[    0.810000] usb 1-1: New USB device found, idVendor=0bda, idProduct=8152, bcdDevice=20.00
[    0.810000] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    0.810000] usb 1-1: Product: USB 10/100 LAN
[    0.810000] usb 1-1: Manufacturer: Realtek
[    0.810000] usb 1-1: SerialNumber: E8C74F049A23
[    0.980000] usb 1-1: reset high-speed USB device number 2 using atmel-ehci
[    1.260000] r8152 1-1:1.0 eth0: v1.09.9
[    6.710000] r8152 1-1:1.0 enxe8c74f049a23: renamed from eth0
[   12.950000] r8152 1-1:1.0 enxe8c74f049a23: carrier on

From there you should see the interface in ip commands:

debian@giantboard:~$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT  
group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
3: enxe8c74f049a23: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc 
pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether e8:c7:4f:04:9a:23 brd ff:ff:ff:ff:ff:ff

I guessing because you can’t do the latter there is a hiccup somewhere in the former. Not too sure. USB power or OTG/negotiation problem of some sort?

The Atheros might be more complicated because of that non-free firmware which you were trying to install before. You probably need to get those files to the right place for the driver. I think they typically aren’t included in the kernel build because of licensing/IP issues. dmesg might have some hints at where that one is stalling too.

Managed to get the RTL8153 to enumerate but it does not apear on the network list:

debian@giantboard:~$ dmesg | grep usb
[ 16.200000] usbcore: registered new interface driver r8152
[ 16.210000] usbcore: registered new interface driver cdc_ether
[ 16.370000] usb 1-1: reset high-speed USB device number 2 using atmel-ehci
[ 25.470000] usb0: HOST MAC 0e:42:e8:60:ab:ad
[ 25.470000] usb0: MAC 0a:05:5c:26:df:73
[ 25.480000] usb 1-1: USB disconnect, device number 2
debian@giantboard:~$

debian@giantboard:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether f8:f0:05:ea:c0:d3 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.226/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::faf0:5ff:feea:c0d3/64 scope link
valid_lft forever preferred_lft forever
3: sit0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
5: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 0a:05:5c:26:df:73 brd ff:ff:ff:ff:ff:ff
debian@giantboard:~$

Also tried another LAN device using AX88179 chip which I enabled in the kernel build. It enumerates but also does not appear on the network list:

[ 0.610000] usb 1-1: new high-speed USB device number 2 using atmel-ehci
[ 0.810000] usb 1-1: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 1.00
[ 0.810000] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 0.810000] usb 1-1: Product: AX88179
[ 0.810000] usb 1-1: Manufacturer: ASIX Elec. Corp.
[ 0.810000] usb 1-1: SerialNumber: 00000000000082
[ 7.210000] ax88179_178a 1-1:1.0 eth0: register ‘ax88179_178a’ at usb-500000.ehci-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:23:54:6c:78:48
[ 7.210000] usbcore: registered new interface driver ax88179_178a
[ 16.350000] usb0: HOST MAC 0e:42:e8:60:ab:ad
[ 16.350000] usb0: MAC 0a:05:5c:26:df:73
[ 16.380000] usb 1-1: USB disconnect, device number 2
[ 16.380000] ax88179_178a 1-1:1.0 enx0023546c7848: unregister ‘ax88179_178a’ usb-500000.ehci-1, ASIX AX88179 USB 3.0 Gigabit Ethernet
debian@giantboard:~$

debian@giantboard:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether f8:f0:05:ea:c0:d3 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.226/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::faf0:5ff:feea:c0d3/64 scope link
valid_lft forever preferred_lft forever
3: sit0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
5: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 0a:05:5c:26:df:73 brd ff:ff:ff:ff:ff:ff
debian@giantboard:~$

Tried with the wifi after loading the atheros firmware and it enumerates but cannot be located from connmanctl:

[ 0.610000] usb 1-1: new high-speed USB device number 2 using atmel-ehci
[ 0.830000] usb 1-1: New USB device found, idVendor=0cf3, idProduct=9271, bcdDevice= 1.08
[ 0.830000] usb 1-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[ 0.830000] usb 1-1: Product: USB2.0 WLAN
[ 0.830000] usb 1-1: Manufacturer: ATHEROS
[ 0.830000] usb 1-1: SerialNumber: 12345
[ 6.790000] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[ 6.790000] usbcore: registered new interface driver ath9k_htc
[ 7.130000] usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
[ 16.980000] usb0: HOST MAC 0e:42:e8:60:ab:ad
[ 16.980000] usb0: MAC 0a:05:5c:26:df:73
[ 17.010000] usb 1-1: USB disconnect, device number 2
[ 18.450000] usb 1-1: ath9k_htc: USB layer deinitialized
debian@giantboard:~$

connmanctl> scan wifi
Scan completed for wifi
connmanctl> services
*AO Peter02 wifi_000000000000_50657465723032_managed_psk
connmanctl>

Note that all three devices enumerate with usb then they deregister or deinitialise.
Any ideas how to move forward?

Note that the entry in connmanctl for services is for the wifi featherwing.

Did you try disabling the USB gadget systemd service? Let’s start with the realtek, looks like that never even enumerated but instead the gadget is present.

sudo systemctl disable usbgadget-serial-eth-ms.service
sudo shutdown now

and power cycle

Yeah, looks like the AX88179 enumerated then disconnected and unregistered itself after the gadget started too. Thinking the gadget is screwing things up.

Great. Thanks for your help. Both LAN adapters and the wifi adapter are working along with the webacm and the usb memory sticks.
I greatly appreciate your time and support.

1 Like