USB to ETH adapter not working on iMX8X

I want to get a USB to ethernet adpater to work, but there is no new network interface when its connected…

Linux version is:

root@colibri-imx8x:~# uname -a
Linux colibri-imx8x 5.4.91-5.2.0-devel+git.590db576d04d #1 SMP PREEMPT Tue Feb 2 16:38:41 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

Usb device is detected:

Bus 003 Device 007: ID 0b95:772b ASIX Electronics Corp. AX88772B

But there is no new interface:

root@colibri-imx8x:~# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:14:2D:67:B8:01
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::214:2dff:fe67:b801/64 Scope:Link
          RX packets:1380 errors:0 dropped:0 overruns:0 frame:0
          TX packets:850 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1796736 (1.7 MiB)  TX bytes:82584 (80.6 KiB)

lo        Link encap:Local Loopback
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:856 errors:0 dropped:0 overruns:0 frame:0
          TX packets:856 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:56494 (55.1 KiB)  TX bytes:56494 (55.1 KiB)

usb-net module seems to be present as I got the following, but I´m not sure if its loaded correctly, as modprobe does not give an output:

root@colibri-imx8x:~# ls /lib/modules/5.4.91-5.2.0-devel+git.590db576d04d/kernel/drivers/net/usb/
cdc_ether.ko  rndis_host.ko  usbnet.ko
root@colibri-imx8x:~# modprobe usbnet

but rmmod succeeds just ones so probably it is loaded:

root@colibri-imx8x:~# rmmod usbnet
root@colibri-imx8x:~# rmmod usbnet
rmmod: ERROR: Module usbnet is not currently loaded

Is there another step necessary that I´m missing in order to get the adapter working?

Greetings @msx23!

You also need to modprobe asix, which is the kernel module that supports your device: Linux Kernel Driver DataBase: CONFIG_USB_NET_AX8817X: ASIX AX88xxx Based USB 2.0 Ethernet Adapters.
Can you please try it?

Thanks for your answer, I see that the asix driver is missing, but how can I get it? I also found the driver sources on the manufacturers website:

I have built the image with OpenEmbedded/Yocto? Do I have to modify the build process there? Or what is the easiest way to get the driver working?


The most elegant way to do this would be to add the driver to the kernel and build your own image using the Yocto project. This is our article on using OpenEmbedded.

Alternatively, you can build the kernel manually. You can enable this module, build the kernel and deploy it to your target. Check out this article.

The easiest and most straightforward way would be to use Torizon, our Linux platform. TorizonCore, our distro, already comes with many kernel modules, including the one you need. The idea is to avoid doing OpenEmbedded builds and using containers to run your application. You can install TorizonCore via the Toradex Easy Installer.

Thanks for you rhelp, I was now able to use the adapter. I executed the following before running the OpenEmbedded build:

bitbake -c menuconfig virtual/kernel

And in the new window I could just enable the AX88XXXX-driver and voila: it works after reflashing

Nice! Glad that this works for you.