How do I move a USB to ethernet dongle in HA OS Generic x86 and ZigBee mesh

I have HA OS Generic x86-64 running on a HP Stream laptop. When I set it up a few months ago I plugged in a USB Ethernet adapter and it worked fine. Now I want to move the adapter from the single USB version 2 port to one of the 2 USB version 3 ports so I can plug my SONOFF ZigBee Dongle plus in the USB version 2 port, since it appears the ZigBee dongle does not play nice on the USB 3 port, it works but not very well. ( I saw that it would run better on a USB 2 port when I was trouble shooting weak ZigBee connection issues). How do I reset/configure the HA OS so it will “rediscover” the network adapter after I move it. I have tried just moving it but the network connection doesn’t work even after a restart. It goes back to working fine when I move it back and reboot again.

I was thinking about just reinstalling HA OS and then restore from a backup but I was hoping there was an easier way.

What does dmesg an lsmod tell you?

I presume I would run these commands after I move the Ethernet adapter and reboot? At that point I don’t have a network connection to work from. What would I be looking for? Or will the output from the commands still be useful from the system after I put it back and is working. Sorry, I’m a noob with Linux based systems.

Oh ok. Well in linux hardware is driven by drivers, which are extensions to the kernel.

dmesg gives you a looong output of the kernel log and looking through it you may spot the driver fir the network adapter being loaded and get some idea of why it is or isn’t working.

Also lsmod will tell you what drivers are loaded.

lsusb will tell you about the usb ports.

Maybe your usb ethernet device doesn’t work well on usb3?

You need a keyboard and display on the Home Assistant host computer to see the output from dmesg and lsmod.

The Ethernet adapter is a USB 3.0 to gigabit from Amazon, pretty generic. I will look through the dmesg output on the console screen (it’s a laptop). You are right it is really a lot of output. :slight_smile:

The HA OS command line seems pretty limited dmesg, lsmod and lsusb just come back with “This command set is specifically designed for Home Assistant Operating System…”. In a nutshell I can only get “About” type information on the OS, update the OS and a few other commands, the above 3 commands are not listed. There are some “core” commands but they don’t appear to be for the kernel.

OK, I caught it in the act. Without rebooting I could unplug from one port and move to the other port then move it back and get the log from the HA terminal.

The 1st line is it seeing it unplugged as usb 1-3, then it fhas some failure messages trying to read and write. Then it sees it plugged into usb 2-1. The AX88179 is the ethernet device. Then I unplug it again and it sees it back on usb 1-3 and it is working. At that point I go to my web interface and it shows connected and I grab this log:

[  942.055915] usb 1-3: USB disconnect, device number 6
[  942.056262] ax88179_178a 1-3:1.0 enp0s21f0u3: unregister 'ax88179_178a' usb-0000:00:15.0-3, ASIX AX88179 USB 3.0 Gigabit Ethernet
[  942.056561] ax88179_178a 1-3:1.0 enp0s21f0u3: Failed to read reg index 0x0002: -19
[  942.056571] ax88179_178a 1-3:1.0 enp0s21f0u3: Failed to write reg index 0x0002: -19
[  942.062517] ax88179_178a 1-3:1.0 enp0s21f0u3 (unregistered): Failed to write reg index 0x0002: -19
[  942.062526] ax88179_178a 1-3:1.0 enp0s21f0u3 (unregistered): Failed to write reg index 0x0001: -19
[  942.062529] ax88179_178a 1-3:1.0 enp0s21f0u3 (unregistered): Failed to write reg index 0x0002: -19
[  946.103904] usb 2-1: new SuperSpeed USB device number 3 using xhci_hcd
[  946.124411] usb 2-1: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 1.00
[  946.124432] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  946.124439] usb 2-1: Product: AX88179
[  946.124444] usb 2-1: Manufacturer: ASIX Elec. Corp.
[  946.124449] usb 2-1: SerialNumber: 008CAE4CD68636
[  946.463385] ax88179_178a 2-1:1.0 eth0: register 'ax88179_178a' at usb-0000:00:15.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 8c:ae:4c:d6:86:36
[  946.472304] ax88179_178a 2-1:1.0 enp0s21f0u1: renamed from eth0
[  949.326504] ax88179_178a 2-1:1.0 enp0s21f0u1: ax88179 - Link status is: 1
[  949.332729] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s21f0u1: link becomes ready
[  952.100753] usb 2-1: USB disconnect, device number 3
[  952.100945] xhci_hcd 0000:00:15.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[  952.101096] ax88179_178a 2-1:1.0 enp0s21f0u1: unregister 'ax88179_178a' usb-0000:00:15.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet
[  952.101184] ax88179_178a 2-1:1.0 enp0s21f0u1: Failed to read reg index 0x0002: -19
[  952.101197] ax88179_178a 2-1:1.0 enp0s21f0u1: Failed to write reg index 0x0002: -19
[  952.106402] ax88179_178a 2-1:1.0 enp0s21f0u1 (unregistered): Failed to write reg index 0x0002: -19
[  952.106410] ax88179_178a 2-1:1.0 enp0s21f0u1 (unregistered): Failed to write reg index 0x0001: -19
[  952.106413] ax88179_178a 2-1:1.0 enp0s21f0u1 (unregistered): Failed to write reg index 0x0002: -19
[  954.189481] usb 1-3: new high-speed USB device number 7 using xhci_hcd
[  954.323563] usb 1-3: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 1.00
[  954.323583] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  954.323590] usb 1-3: Product: AX88179
[  954.323595] usb 1-3: Manufacturer: ASIX Elec. Corp.
[  954.323600] usb 1-3: SerialNumber: 008CAE4CD68636
[  954.657482] ax88179_178a 1-3:1.0 eth0: register 'ax88179_178a' at usb-0000:00:15.0-3, ASIX AX88179 USB 3.0 Gigabit Ethernet, 8c:ae:4c:d6:86:36
[  954.671247] ax88179_178a 1-3:1.0 enp0s21f0u3: renamed from eth0
[  957.518398] ax88179_178a 1-3:1.0 enp0s21f0u3: ax88179 - Link status is: 1
[  957.526834] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s21f0u3: link becomes ready

But I don’t know what to do about it. :frowning: … but I caught it!

Thanks for your help. After sleeping on it I’m going to just reload HASS OS and restore from backup. I am fairly comfortable with the process since this will be my 5th or 6th time. Each time restoring my backup always made the system whole again even when the installation type and or hardware changed. I started out on an old IBM x3350 server running a supervised but it used too much electricity :electric_plug: and was too loud :loud_sound:. Then I went to HA OS on a old desktop, then move to an old laptop (built in UPS) but it croaked, I went back to the server while I shopped for a replacement system. I happened to see this HP Stream laptop that was a display model at my local Walmart got it for less than $100 US. Only issue was it didn’t have an ethernet port (didn’t notice until I got home with it, the online specs say 10/100/1000 ethernet but it is not there) hence the dongle.

Thanks again and thanks stevemann for your input too.

Follow-up: Reloaded HA OS with USB Ethernet adapter in the USB 3.1 port and SONOFF ZigBee coordinator in the USB 2.0 port. Slight improvement to ZigBee signal strength to my Philips LWB015 flood lights. Swapped my Third Reality ZigBee smart plugs for SONOFF S40LITE smart plugs. The Third Reality smart plugs did not work well and the SONOFF smart plugs are worse. For both if they loose power when they are on, when the power returns they are always off. All of my Wifi smart plugs and the Philips ZigBee devices have a setting for “Start-up behavior” (Off, On, toggle or previous value). Both brands are lousy routers, the Third Reality plugs would route intermittently and I have yet to see the SONOFF S40LITEs even try. I will let the mesh settle for a while and see if the SONOFF routing improves.

Have you put the zigbee device on a long USB extension cable well away from the laptop?

Also see in general Improve network range and stability | Zigbee2MQTT

Yes it has a 1 meter extension. That said I placed the ZigBee up as high above the laptop and that seemed to help. I find it odd that one of the smart plugs is about 2 meters from the coordinator and it has an LQI of 116. All 4 of my plugs and both lights are working so I guess that’s what counts. Thanks for the help.