Android USB tethering not working

Bump ^

Hi,
We have tried OnePlus 7 and Google Pixel 2. Don’t observe the issue. May see if other users who have Samsung phones can share experience.

Unfortunately I don’t have any other android phones on hand to test. However, could it be that the outdated kernel that l4t is based on is the cause? I’m assuming cdc_ether and rdnis_host is not loading for my phone because it doesn’t have updated logic to detect that the usb identifiers for my phone is one that these drivers should handle? The kernel version on my computer is 4.15.0-99. Is there a way to just update the cdc_ether, rndis_host, and cdc_acm part of the kernel? Or maybe spoofing the usb identifier to trick these kernel modules to activate?

Bump ^

Hi,
Since we don’t have the phone, may see if other users have it and can share experience.

I appreciate the help but there’s not a single employee in Nvidia that owns a Samsung phone? What about the other parts of my question about the outdated kernel potentially being the cause? Can you suggest other things to try? To be honest I find it a little unreasonable that Nvidia is expecting the community to pick up support for such a deeply technical issue with the Jetson boards for a basic feature with a device from literally the most popular smartphone manufacturer in the world. And especially since it works out of the box with standard Ubuntu.

Hi,
It looks to be enumerated as usb0

[   63.199626] rndis_host 2-1:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-1, RNDIS device, 2a:2a:69:30:22:78

Please try sudo dhclient usb0.

That is the output from my x86 machine where the feature works, not the Jetson. The Jetson does not load the rdnis_host module at all, and as I mentioned, even with the phone not plugged in there is already a usb0 so usb0 can’t be the phone.

Hi,
Please try

$ sudo apt-get install linux-image-generic-hwe-18.04

Reference link:

I have seen that before, and I am not a linux expert, but isn’t that package developed by Ubuntu for vanilla Ubuntu? Since the Jetson boards are running on a modified Linux 4 Tegra distribution/kernel, do we need something different to update those specific kernel modules?

I tried it and it says unsupported platform:

x@xavier:~$ sudo apt-get install linux-image-generic-hwe-18.04
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  efibootmgr libfwup1
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-image-5.3.0-53-generic linux-modules-5.3.0-53-generic
  linux-modules-extra-5.3.0-53-generic
Suggested packages:
  fdutils linux-hwe-doc-5.3.0 | linux-hwe-source-5.3.0 linux-hwe-tools
  linux-headers-5.3.0-53-generic
The following NEW packages will be installed:
  linux-image-5.3.0-53-generic linux-image-generic-hwe-18.04
  linux-modules-5.3.0-53-generic linux-modules-extra-5.3.0-53-generic
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 62.4 MB of archives.
After this operation, 301 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 linux-modules-5.3.0-53-generic arm64 5.3.0-53.47~18.04.1 [13.7 MB]
Get:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 linux-image-5.3.0-53-generic arm64 5.3.0-53.47~18.04.1 [9,872 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 linux-modules-extra-5.3.0-53-generic arm64 5.3.0-53.47~18.04.1 [38.8 MB]
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 linux-image-generic-hwe-18.04 arm64 5.3.0.53.110 [2,700 B]
Fetched 62.4 MB in 7s (9,311 kB/s)                                             
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package linux-modules-5.3.0-53-generic.
(Reading database ... 182405 files and directories currently installed.)
Preparing to unpack .../linux-modules-5.3.0-53-generic_5.3.0-53.47~18.04.1_arm64.deb ...
Unpacking linux-modules-5.3.0-53-generic (5.3.0-53.47~18.04.1) ...
Selecting previously unselected package linux-image-5.3.0-53-generic.
Preparing to unpack .../linux-image-5.3.0-53-generic_5.3.0-53.47~18.04.1_arm64.deb ...
Unpacking linux-image-5.3.0-53-generic (5.3.0-53.47~18.04.1) ...
Selecting previously unselected package linux-modules-extra-5.3.0-53-generic.
Preparing to unpack .../linux-modules-extra-5.3.0-53-generic_5.3.0-53.47~18.04.1_arm64.deb ...
Unpacking linux-modules-extra-5.3.0-53-generic (5.3.0-53.47~18.04.1) ...
Selecting previously unselected package linux-image-generic-hwe-18.04.
Preparing to unpack .../linux-image-generic-hwe-18.04_5.3.0.53.110_arm64.deb ...
Unpacking linux-image-generic-hwe-18.04 (5.3.0.53.110) ...
Setting up linux-modules-5.3.0-53-generic (5.3.0-53.47~18.04.1) ...
Setting up linux-image-5.3.0-53-generic (5.3.0-53.47~18.04.1) ...
I: /vmlinuz is now a symlink to boot/vmlinuz-5.3.0-53-generic
I: /initrd.img is now a symlink to boot/initrd.img-5.3.0-53-generic
Setting up flash-kernel (3.98ubuntu11~18.04.1) ...
flash-kernel: deferring update (trigger activated)
Setting up linux-modules-extra-5.3.0-53-generic (5.3.0-53.47~18.04.1) ...
Setting up linux-image-generic-hwe-18.04 (5.3.0.53.110) ...
Processing triggers for linux-image-5.3.0-53-generic (5.3.0-53.47~18.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.3.0-53-generic
Error! Your kernel headers for kernel 5.3.0-53-generic cannot be found.
Please install the linux-headers-5.3.0-53-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 5.3.0-53-generic cannot be found.
Please install the linux-headers-5.3.0-53-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.3.0-53-generic
Warning: root device /dev/root does not exist
Warning: couldn't identify filesystem type for fsck hook, ignoring.
I: The initramfs will attempt to resume from /dev/zram7
I: (UUID=a36fbb7a-e246-40f9-a606-6057f715ea1d)
I: Set the RESUME variable to override this.
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/aarch64-linux-gnu_EGL.conf: No such file or directory
/sbin/ldconfig.real: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf.d/aarch64-linux-gnu_GL.conf: No such file or directory
flash-kernel: deferring update (trigger activated)
/etc/kernel/postinst.d/zz-flash-kernel:
flash-kernel: deferring update (trigger activated)
Processing triggers for flash-kernel (3.98ubuntu11~18.04.1) ...
Unsupported platform.
dpkg: error processing package flash-kernel (--configure):
 installed flash-kernel package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 flash-kernel
E: Sub-process /usr/bin/dpkg returned an error code (1)

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 …

:(