Android USB tethering not working

Hi,
The issue looks to be that certain phones are not listed as USB modem, and do not trigger cdc_ether.

Please check if this works:

Would you mind sharing exactly what I should try? I’m lost here since my phone does not show up at all as a network interface so I’m not sure how I can change the mac address of it. I think this is because rndis_host is not being loaded because it doesn’t recognize the USB device as a tether that needs it?

Hi,
You may try to enable USB debug mode as suggested in

And


Not sure but name of network interface might be ztbto4tsm2.

That doesn’t make sense. My understanding is that cdc_ether/rndis_host is not even detecting the USB device as a viable candidate for setting it up as a network interface so it doesn’t load in and doesn’t convert the USB device as a network interface. I already have USB debugging mode enabled and as I mentioned above, ztbto4tsm2 is the network interface created by my VPN and is not associated with the phone. Is there an engineer that works on the kernel side of l4t that I could get in touch with?

friendly bump

Hi,
Please apply the patch and try again.
https://patchwork.ozlabs.org/project/netdev/patch/20170927213103.11987-1-aleksander@aleksander.es/

Thank you, this looks really promising, do you have any instructions on how I can apply this patch?

Hi,
Please check Kernel Customization in development guide.

Unfortunately that did not work for me.

I followed step 1-7 under “Building the NVIDIA kernel”: I downloaded the kernel sources, applied the patch manually, cross compiled on my x86 ubuntu, copied the kernel sources and build artifacts over to the Jetson, and installed the newly built kernels on the Jetson. However, rndis_host is still not loading up for me when switching to USB tethering mode.

I’m not super familiar with the kernel installation process, but I can see when I ran make module_install ... that rndis_host.ko is installed in the logs, but I don’t see anything about cdc_ether. Where would cdc_ether be installed?

Furthermore, I checked the detailed lsusb output for when the phone is in tether mode and I can confirm that it does indeed have a interface descriptor that matches 1) misc class 2) subclass=4 3) protocol=1, so the patch should work. My guess is then that I am not installing the newly built/patched cdc_ether correctly.

Also I should note that I’m testing this on a Jetson Nano as opposed to the AGX Xavier before.

Here is the output from dmesg after installing the newly built kernels. [98.280363] is when I select USB tethering on my phone.


[   73.993956] usb 2-1.3: new SuperSpeed USB device number 3 using tegra-xusb
[   74.020182] usb 2-1.3: New USB device found, idVendor=04e8, idProduct=6860
[   74.020249] usb 2-1.3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[   74.020295] usb 2-1.3: Product: SAMSUNG_Android
[   74.020338] usb 2-1.3: Manufacturer: SAMSUNG
[   74.020382] usb 2-1.3: SerialNumber: 9887fc324d59364842
[   74.189297] cdc_acm 2-1.3:1.1: ttyACM0: USB ACM device
[   74.195986] usbcore: registered new interface driver cdc_acm
[   74.214258] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   75.063407] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[   75.063417] tegra-xudc-new 700d0000.xudc: pls = 4
[   75.063422] tegra-xudc-new 700d0000.xudc: toggle vbus
[   75.063502] android_work: did not send uevent (0 0           (null))
[   77.247493] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[   77.247504] tegra-xudc-new 700d0000.xudc: pls = 4
[   77.247509] tegra-xudc-new 700d0000.xudc: toggle vbus
[   77.247572] android_work: did not send uevent (0 0           (null))
[   79.431768] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[   79.431792] tegra-xudc-new 700d0000.xudc: pls = 4
[   79.431804] tegra-xudc-new 700d0000.xudc: toggle vbus
[   79.431908] android_work: did not send uevent (0 0           (null))
[   79.971293] usb 2-1.3: USB disconnect, device number 3
[   79.975609] cdc_acm 2-1.3:1.1: failed to set dtr/rts
[   80.576060] usb 2-1.3: new SuperSpeed USB device number 4 using tegra-xusb
[   80.598842] usb 2-1.3: New USB device found, idVendor=04e8, idProduct=6860
[   80.598855] usb 2-1.3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[   80.598863] usb 2-1.3: Product: SAMSUNG_Android
[   80.598871] usb 2-1.3: Manufacturer: SAMSUNG
[   80.598878] usb 2-1.3: SerialNumber: 9887fc324d59364842
[   80.607320] cdc_acm 2-1.3:1.1: ttyACM0: USB ACM device
[   81.615614] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[   81.615625] tegra-xudc-new 700d0000.xudc: pls = 4
[   81.615630] tegra-xudc-new 700d0000.xudc: toggle vbus
[   81.615694] android_work: did not send uevent (0 0           (null))
[   85.883880] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[   85.883896] tegra-xudc-new 700d0000.xudc: pls = 4
[   85.883905] tegra-xudc-new 700d0000.xudc: toggle vbus
[   85.884015] android_work: did not send uevent (0 0           (null))
[   88.068271] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[   88.068328] tegra-xudc-new 700d0000.xudc: pls = 4
[   88.068360] tegra-xudc-new 700d0000.xudc: toggle vbus
[   88.068571] android_work: did not send uevent (0 0           (null))
[   90.252306] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[   90.252361] tegra-xudc-new 700d0000.xudc: pls = 4
[   90.252393] tegra-xudc-new 700d0000.xudc: toggle vbus
[   90.252601] android_work: did not send uevent (0 0           (null))
[   96.600340] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[   96.600383] tegra-xudc-new 700d0000.xudc: pls = 4
[   96.600409] tegra-xudc-new 700d0000.xudc: toggle vbus
[   96.600579] android_work: did not send uevent (0 0           (null))
[   97.859811] usb 2-1.3: USB disconnect, device number 4
[   98.071925] usb 2-1: usb_suspend_both: status 0
[   98.280363] usb 2-1.3: new SuperSpeed USB device number 5 using tegra-xusb
[   98.302755] usb 2-1.3: New USB device found, idVendor=04e8, idProduct=6864
[   98.302765] usb 2-1.3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[   98.302770] usb 2-1.3: Product: SAMSUNG_Android
[   98.302775] usb 2-1.3: Manufacturer: SAMSUNG
[   98.302780] usb 2-1.3: SerialNumber: 9887fc324d59364842
[  102.960100] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  102.960110] tegra-xudc-new 700d0000.xudc: pls = 4
[  102.960115] tegra-xudc-new 700d0000.xudc: toggle vbus
[  102.960179] android_work: did not send uevent (0 0           (null))
[  109.308024] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  109.308035] tegra-xudc-new 700d0000.xudc: pls = 4
[  109.308040] tegra-xudc-new 700d0000.xudc: toggle vbus
[  109.308106] android_work: did not send uevent (0 0           (null))
[  126.268226] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  126.268235] tegra-xudc-new 700d0000.xudc: pls = 4
[  126.268238] tegra-xudc-new 700d0000.xudc: toggle vbus
[  126.268305] android_work: did not send uevent (0 0           (null))
[  128.452226] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  128.452237] tegra-xudc-new 700d0000.xudc: pls = 4
[  128.452242] tegra-xudc-new 700d0000.xudc: toggle vbus
[  128.452307] android_work: did not send uevent (0 0           (null))
[  130.636203] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  130.636214] tegra-xudc-new 700d0000.xudc: pls = 4
[  130.636219] tegra-xudc-new 700d0000.xudc: toggle vbus
[  130.636283] android_work: did not send uevent (0 0           (null))
[  132.894764] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  132.894774] tegra-xudc-new 700d0000.xudc: pls = 4
[  132.894779] tegra-xudc-new 700d0000.xudc: toggle vbus
[  132.894846] android_work: did not send uevent (0 0           (null))
[  141.323324] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  141.323335] tegra-xudc-new 700d0000.xudc: pls = 4
[  141.323340] tegra-xudc-new 700d0000.xudc: toggle vbus
[  141.323405] android_work: did not send uevent (0 0           (null))
[  145.587059] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  145.587071] tegra-xudc-new 700d0000.xudc: pls = 4
[  145.587076] tegra-xudc-new 700d0000.xudc: toggle vbus
[  145.587140] android_work: did not send uevent (0 0           (null))
[  147.770928] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  147.770939] tegra-xudc-new 700d0000.xudc: pls = 4
[  147.770944] tegra-xudc-new 700d0000.xudc: toggle vbus
[  147.771009] android_work: did not send uevent (0 0           (null))
[  152.034710] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  152.034721] tegra-xudc-new 700d0000.xudc: pls = 4
[  152.034726] tegra-xudc-new 700d0000.xudc: toggle vbus
[  152.034790] android_work: did not send uevent (0 0           (null))
[  158.382534] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  158.382543] tegra-xudc-new 700d0000.xudc: pls = 4
[  158.382546] tegra-xudc-new 700d0000.xudc: toggle vbus
[  158.382605] android_work: did not send uevent (0 0           (null))
[  185.530254] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  185.530277] tegra-xudc-new 700d0000.xudc: pls = 4
[  185.530291] tegra-xudc-new 700d0000.xudc: toggle vbus
[  185.530394] android_work: did not send uevent (0 0           (null))
[  191.874255] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  191.874315] tegra-xudc-new 700d0000.xudc: pls = 4
[  191.874353] tegra-xudc-new 700d0000.xudc: toggle vbus
[  191.874578] android_work: did not send uevent (0 0           (null))
[  196.138226] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  196.138288] tegra-xudc-new 700d0000.xudc: pls = 4
[  196.138329] tegra-xudc-new 700d0000.xudc: toggle vbus
[  196.138559] android_work: did not send uevent (0 0           (null))
[  200.404742] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  200.404807] tegra-xudc-new 700d0000.xudc: pls = 4
[  200.404847] tegra-xudc-new 700d0000.xudc: toggle vbus
[  200.409217] android_work: did not send uevent (0 0           (null))
[  202.589430] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  202.589440] tegra-xudc-new 700d0000.xudc: pls = 4
[  202.589444] tegra-xudc-new 700d0000.xudc: toggle vbus
[  202.589510] android_work: did not send uevent (0 0           (null))
[  208.933531] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  208.933545] tegra-xudc-new 700d0000.xudc: pls = 4
[  208.933551] tegra-xudc-new 700d0000.xudc: toggle vbus
[  208.933728] android_work: did not send uevent (0 0           (null))
[  229.839758] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  229.839822] tegra-xudc-new 700d0000.xudc: pls = 4
[  229.839861] tegra-xudc-new 700d0000.xudc: toggle vbus
[  229.840087] android_work: did not send uevent (0 0           (null))
[  232.021227] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  232.021253] tegra-xudc-new 700d0000.xudc: pls = 4
[  232.021266] tegra-xudc-new 700d0000.xudc: toggle vbus
[  232.021372] android_work: did not send uevent (0 0           (null))
[  246.685033] tegra-xudc-new 700d0000.xudc: port_reset_war_work
[  246.685052] tegra-xudc-new 700d0000.xudc: pls = 4
[  246.685063] tegra-xudc-new 700d0000.xudc: toggle vbus
[  246.685242] android_work: did not send uevent (0 0           (null))```

Okay, did some more reading and figured out a few more things. Since cdc_ether is a built-in module, I’m assuming it will be part of the kernel image and will not be touched by the make modules_install ... step. I’m not sure what step 5 and 6 is actually intended to do if I’m just copying it on my host pc and if make modules_install ... doesn’t actually move those on the Jetson.

Step 5: Replace <release_packagep>/Linux_for_Tegra/kernel/Image with a copy of: 
$TEGRA_KERNEL_OUT/arch/arm64/boot/Image

Step 6: Replace the contents of Linux_for_Tegra/kernel/dtb/ with the contents of:
$TEGRA_KERNEL_OUT/arch/arm64/boot/dts/

So I copied those files manually to overwrite /boot/Image and /boot/dts/ on the Jetson. I also swapped the power supply cable for the Jetson Nano since I wasn’t sure if that was causing problems as well as my phone said it was charging slowly. I swapped to a different power supply cable for the Nano and that fixed the charging slowly issue.

This is the result from dmesg after those changes:

[   74.891507] usb 2-1.3: new SuperSpeed USB device number 3 using tegra-xusb
[   74.915815] usb 2-1.3: New USB device found, idVendor=04e8, idProduct=6860
[   74.915881] usb 2-1.3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[   74.915930] usb 2-1.3: Product: SAMSUNG_Android
[   74.915973] usb 2-1.3: Manufacturer: SAMSUNG
[   74.916014] usb 2-1.3: SerialNumber: 9887fc324d59364842
[   75.123027] cdc_acm 2-1.3:1.1: ttyACM0: USB ACM device
[   75.149630] usbcore: registered new interface driver cdc_acm
[   75.149637] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   80.532287] cdc_acm 2-1.3:1.1: failed to set dtr/rts
[   80.878106] usb 2-1.3: reset SuperSpeed USB device number 3 using tegra-xusb
[   80.900120] usb 2-1.3: device firmware changed
[   80.901072] cdc_acm 2-1.3:1.1: ttyACM0: USB ACM device
[   80.901982] usb 2-1.3: USB disconnect, device number 3
[   81.373948] usb 2-1.3: new SuperSpeed USB device number 4 using tegra-xusb
[   81.398717] usb 2-1.3: New USB device found, idVendor=04e8, idProduct=6860
[   81.398727] usb 2-1.3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[   81.398733] usb 2-1.3: Product: SAMSUNG_Android
[   81.398738] usb 2-1.3: Manufacturer: SAMSUNG
[   81.398743] usb 2-1.3: SerialNumber: 9887fc324d59364842
[   98.633075] usb 2-1.3: USB disconnect, device number 4
[   99.021865] usb 2-1.3: new SuperSpeed USB device number 5 using tegra-xusb
[   99.043781] usb 2-1.3: New USB device found, idVendor=04e8, idProduct=6864
[   99.043791] usb 2-1.3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[   99.043797] usb 2-1.3: Product: SAMSUNG_Android
[   99.043803] usb 2-1.3: Manufacturer: SAMSUNG
[   99.043808] usb 2-1.3: SerialNumber: 9887fc324d59364842

Still no cdc_ether showing up …

:(

Okay, I completely figured it out now. The instructions in the " Building the NVIDIA Kernel" link I think assumes that the built kernel will then be flashed over to the Jetson later on, so everything is supposed to be executed on the host PC. I realized that by specifying INSTALL_MOD_PATH to where my Linux_for_Tegra directory was on the Jetson made no sense because it was just then copying over the external modules to that random directory. What I actually needed to do was overwrite the kernel modules on the Jetson / directory. So I installed the external modules by running make modules_install ... without the INSTALL_MOD_PATH argument, which then takes / as the default path. Now that the new rndis_host is properly installed on the Jetson I am able to use USB tethering on my phone. Thank you for your help.