USB Ethernet Gadget not connecting

I have a USB Ethernet Gadget that when I connect to other Ubuntu18.04 machines it attaches fine and I see it as a network interface

4: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether b6:30:f8:52:01:76 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::b430:f8ff:fe52:176/64 scope link
       valid_lft forever preferred_lft forever

Here is the dmesg log when I plug in the device to a working setup:

[   66.350555] usb 1-1.2: new high-speed USB device number 3 using xhci_hcd
[   66.451897] usb 1-1.2: New USB device found, idVendor=1cf2, idProduct=a4a2, bcdDevice= 3.14
[   66.451918] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   66.451931] usb 1-1.2: Product: RNDIS/Ethernet Gadget
[   66.451944] usb 1-1.2: Manufacturer: Linux 3.14.70-fslc+g34b9927 with 2184000.usb
[   66.519502] cdc_eem 1-1.2:1.0 usb0: register 'cdc_eem' at usb-0000:01:00.0-1.2, CDC EEM Device, b6:30:f8:52:01:76
[   66.521772] usbcore: registered new interface driver cdc_eem

However, when I attach the device to the TX2 NX it does not show up as an NIC and I get these logs in dmesg:

[  153.497340] usb 1-2.4: new high-speed USB device number 5 using tegra-xusb
[  153.519325] usb 1-2.4: New USB device found, idVendor=1cf2, idProduct=a4a2
[  153.519348] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  153.519366] usb 1-2.4: Product: RNDIS/Ethernet Gadget
[  153.519381] usb 1-2.4: Manufacturer: Linux 3.14.70-fslc+g34b9927 with 2184000.usb

Seems the device is not getting registered with cdc_eem. I tried loading this module and I see it in lsmod
however I’m still not able to get the device to register Nvidia board. Any help is greatly appreciated.

Module                  Size  Used by
bnep                   16562  2
fuse                  104554  3
xt_conntrack            3609  1
ipt_MASQUERADE          2346  1
nf_nat_masquerade_ipv4     3111  1 ipt_MASQUERADE
nf_conntrack_netlink    29413  0
nfnetlink               7959  2 nf_conntrack_netlink
xt_addrtype             3670  2
iptable_filter          2481  1
iptable_nat             2882  1
nf_conntrack_ipv4      11992  2
nf_defrag_ipv4          1836  1 nf_conntrack_ipv4
nf_nat_ipv4             6712  1 iptable_nat
nf_nat                 20406  2 nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack          106659  6 nf_conntrack_ipv4,nf_conntrack_netlink,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat
br_netfilter           16216  0
overlay                48718  0
hid_logitech_hidpp     23004  0
userspace_alert         5828  0
hid_logitech_dj        13813  0
zram                   25920  4
cdc_eem                 4282  0
spidev                 13218  0
nvgpu                1589200  18
ip_tables              19441  2 iptable_filter,iptable_nat
x_tables               28951  5 ip_tables,iptable_filter,ipt_MASQUERADE,xt_addrtype,xt_conntrack

Edit:
Using L4T 34.1.1

Sounds like you have an actual device, and not a virtual “fake” device (which is what the “gadget” API is for). I’d avoid calling it a gadget since it would make people think this is software-based and not hardware.

In the USB registry one can search for the manufacturer ID and product ID within the manufacturer. Manufacturer 1cf2 does not show up, and thus, even though USB is 100% working, and the driver is present, the hot plug system does not know to link that particular hardware with that particular driver. Likely this means the systems which work have a udev file for this purpose.

I did not see that manufacturer ID, and so it wasn’t possible to look up the actual product manufacturer and model. Possibly with that one could find the udev file, maybe even directly installable with apt-get (maybe).

What is the exact brand and model of the device? Also, on a Ubuntu system which works, what do you see from:
sudo find /etc/udev
(one of those files might work if the udev file is present and you can’t find the file by other means)

Thank you for the clarification.

What is the exact brand and model of the device?

Brand: TrellisWare
Model: TW-875 TSM GHOST

Also, on a Ubuntu system which works, what do you see from:
sudo find /etc/udev

pi@raspberrypi:~ $ sudo find /etc/udev/
/etc/udev/
/etc/udev/udev.conf
/etc/udev/rules.d
/etc/udev/rules.d/99-com.rules
/etc/udev/hwdb.d

I tried adding these udev files to the Nvidia board but still not getting the device to link.

I’ve been looking through the forums here and I’ve seen mention of missing kernel modules or configuration. Specifically because of the missing dmesg log about usbcore: registered new interface driver cdc_eem that I do see on devices that successfully link the device. Is it possible I did not import that module correctly when I tried manually or could be missing other configs/modules?
Really appreciate your help.

For reference I found this here (they have a support email address, but you probably won’t need it…still, it is there):
https://www.trellisware.com/trellisware-radios/tw-875-tsm-ghost/

Fascinating device. To test for the CDC_EEM driver on the Jetson:
zcat /proc/config.gz | grep -i 'cdc_eem'

You might still need a udev file like “/etc/udev/rules.d/99-com.rules” (I don’t know for sure if that is for your device, but if you attach a copy to the forums, then we can find out…you might need to rename it with a .txt suffix).

The CDC_EEM is a standard driver, but you might need to build it as a module (which install is then just a file copy…ignore docs which want you to flash since you are not installing a new kernel and are just adding a module).

The docs associated with your specific L4T release have the official information in the “kernel customization” section, see the docs for your release:
https://developer.nvidia.com/linux-tegra
(to find the L4T release use “head -n 1 /etc/nv_tegra_release”)

If the official docs are not enough, here is some extra info on kernel build:
https://forums.developer.nvidia.com/t/topic/193640/11

If your system does not have that already, although the docs are extensive, it is much easier than it sounds for a module install.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.