Android USB tethering not working

I’m trying to tether the internet of my Galaxy S8 to the Jetson via USB but it hasn’t been working. I tested the same setup with my x86 Ubuntu 18.04 machine and it works out of the box. I’ve verified through dmesg and lsusb that the Jetson is able to detect my phone, and it can even detect when the phone is specifically in USB tethering mode. It seems like the difference between the x86 machine and the Xavier is that the cdc_ether driver is not loaded. Is there an additional driver that I need to download for the Jetson board?

Xavier output from dmesg when I plugin my phone:

[ 9458.173573] usb 1-2: new high-speed USB device number 22 using tegra-xusb
[ 9458.196492] usb 1-2: New USB device found, idVendor=04e8, idProduct=6860
[ 9458.196503] usb 1-2: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[ 9458.196510] usb 1-2: Product: SAMSUNG_Android
[ 9458.196516] usb 1-2: Manufacturer: SAMSUNG
[ 9458.196549] usb 1-2: SerialNumber: 9887fc324d59364842
[ 9458.199428] cdc_acm 1-2:1.1: ttyACM0: USB ACM device
[ 9458.209767] tegra-asoc: sound: ASoC: CODEC DAI rt5659-aif1 not registered
[ 9458.209936] tegra-asoc: sound: snd_soc_register_card failed (-517)
[ 9458.212117] tegra-asoc: sound: ASoC: CODEC DAI rt5659-aif1 not registered
[ 9458.212286] tegra-asoc: sound: snd_soc_register_card failed (-517)
[ 9458.278545] tegra-asoc: sound: ASoC: CODEC DAI rt5659-aif1 not registered
[ 9458.278711] tegra-asoc: sound: snd_soc_register_card failed (-517)
[ 9458.930400] ucsi_ccg 1-0008: port1 evt: VDM Received
[ 9458.930409] ucsi_ccg 1-0008: vdm_hdr: svid: ff00, cmd: Discover Identity (1) cmd_type: ACK, obj_pos: 0

x86 Ubuntu machine output from dmesg (USB tether works):

[   59.874609] usb 2-1: New USB device found, idVendor=04e8, idProduct=6860
[   59.874616] usb 2-1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[   59.874619] usb 2-1: Product: SAMSUNG_Android
[   59.874622] usb 2-1: Manufacturer: SAMSUNG
[   59.874625] usb 2-1: SerialNumber: 9887fc324d59364842
[   59.894720] cdc_acm 2-1:1.1: ttyACM0: USB ACM device
[   59.895584] usbcore: registered new interface driver cdc_acm
[   59.895584] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   62.728123] usb 2-1: USB disconnect, device number 4
[   62.728344] cdc_acm 2-1:1.1: failed to set dtr/rts
[   63.143244] usb 2-1: new SuperSpeed USB device number 5 using xhci_hcd
[   63.168205] usb 2-1: New USB device found, idVendor=04e8, idProduct=6864
[   63.168208] usb 2-1: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[   63.168210] usb 2-1: Product: SAMSUNG_Android
[   63.168211] usb 2-1: Manufacturer: SAMSUNG
[   63.168213] usb 2-1: SerialNumber: 9887fc324d59364842
[   63.195267] usbcore: registered new interface driver cdc_ether
[   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
[   63.200403] usbcore: registered new interface driver rndis_host
[   63.204788] rndis_host 2-1:1.0 enp0s20u1: renamed from usb0
[   63.250976] IPv6: ADDRCONF(NETDEV_UP): enp0s20u1: link is not ready

Xavier output from lsusb without enabling USB tethering on the phone:

Bus 002 Device 007: ID 0bda:8153 Realtek Semiconductor Corp. 
Bus 002 Device 006: ID 2109:0813 VIA Labs, Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 022: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
Bus 001 Device 019: ID 1b1c:1b02 Corsair 
Bus 001 Device 018: ID 1532:0012 Razer USA, Ltd 
Bus 001 Device 017: ID 2109:2813 VIA Labs, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Xavier output from lsusb when USB tethering is enabled:

Bus 002 Device 007: ID 0bda:8153 Realtek Semiconductor Corp. 
Bus 002 Device 006: ID 2109:0813 VIA Labs, Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 024: ID 04e8:6864 Samsung Electronics Co., Ltd GT-I9070 (network tethering, USB debugging enabled)
Bus 001 Device 019: ID 1b1c:1b02 Corsair 
Bus 001 Device 018: ID 1532:0012 Razer USA, Ltd 
Bus 001 Device 017: ID 2109:2813 VIA Labs, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Hi,
The driver should be built in by default:

CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDCETHER=y

Please follow the steps and check if you can get the IP address:

  1. Connect your phone to Xavier
  2. Select USB tethering on the phone
  3. Get the IP address through “dhclient usb1” on Xavier

I get Cannot find device "usb1" from dhclient usb1

I know the Xavier uses the front USB-c port as a network interface when flashing. Does that have something to do with the issue? I tried connecting my phone to both the front and back usb-c port but neither worked. Below is my output from ifconfig -a and it’s the same whether I connect my phone or not. I’m a little confused as to where the rndis0 and usb0 interfaces are coming from since they show up when my phone is not attached either. I know ztbto4tsm2 is from my VPN, and it looks like l4tbr0 is the interface that the Nvidia software uses for flashing?

dummy0: flags=130<BROADCAST,NOARP>  mtu 1500
        ether 5a:2a:fe:ce:32:94  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:04:4b:e5:8b:4f  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 40  

l4tbr0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.55.1  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        ether 4a:a6:9e:88:1d:81  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 187  bytes 13531 (13.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 187  bytes 13531 (13.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 4a:a6:9e:88:1d:81  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 4a:a6:9e:88:1d:83  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ztbto4tsm2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 2800
        inet 172.25.105.250  netmask 255.255.0.0  broadcast 172.25.255.255
        inet6 fe80::e8d8:c8ff:fe76:96ab  prefixlen 64  scopeid 0x20<link>
        ether ea:d8:c8:76:96:ab  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 56  bytes 6812 (6.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Hi,
We tried Oneplus 7 and it works. Please check if you see similar prints in dmesg:

91203 [  133.082149] scsi 2:0:0:0: CD-ROM            OnePlus  Device Driver    0414 PQ: 0 ANSI: 2
91204 [  151.523643] usb 2-4: USB disconnect, device number 2^M^M
91205 [  151.953785] usb 2-4: new SuperSpeed USB device number 3 using tegra-xusb
91206 [  151.982159] usb 2-4: New USB device found, idVendor=2a70, idProduct=f00e
91207 [  151.982253] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
91208 [  151.982583] usb 2-4: Product: GM1903
91209 [  151.982687] usb 2-4: Manufacturer: OnePlus
91210 [  151.982746] usb 2-4: SerialNumber: d6a055b5
91211 [  152.006258] rndis_host 2-4:1.0 usb1: register 'rndis_host' at usb-3610000.xhci-4, RNDIS device, 7e:78:47:40:fd:ae

To make sure this is not cable related, my setup is:

Back side USB-C port of the Xavier (next to the power jack) -> USB-C male to USB-B female -> USB-B male to USB-C male -> USB-C port of my Galaxy S8. Both cables are from the Xavier Dev Kit. Did you do your test with cables that the Xavier Dev Kit shipped with?

When I successfully tethered on my x86 laptop, I was using the same USB-B male to USB-C male cable from the Dev Kit. I have also tried the front-port of the Xavier, as well as a different USB-C to USB-B hub with no success.

This is the dmesg output when plugging in my phone and select “File Transfer” on my phone:

[ 1055.203441] usb 2-3: new SuperSpeed USB device number 6 using tegra-xusb
[ 1055.225230] usb 2-3: New USB device found, idVendor=04e8, idProduct=6860
[ 1055.225267] usb 2-3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[ 1055.225275] usb 2-3: Product: SAMSUNG_Android
[ 1055.225281] usb 2-3: Manufacturer: SAMSUNG
[ 1055.225287] usb 2-3: SerialNumber: 9887fc324d59364842
[ 1055.230761] cdc_acm 2-3:1.1: ttyACM0: USB ACM device

This is the dmesg output after I select USB tethering:

[ 1102.963933] usb 2-3: USB disconnect, device number 6
[ 1103.228261] usb 2-3: new SuperSpeed USB device number 7 using tegra-xusb
[ 1103.250527] usb 2-3: New USB device found, idVendor=04e8, idProduct=6864
[ 1103.250566] usb 2-3: New USB device strings: Mfr=7, Product=8, SerialNumber=9
[ 1103.250574] usb 2-3: Product: SAMSUNG_Android
[ 1103.250580] usb 2-3: Manufacturer: SAMSUNG
[ 1103.250586] usb 2-3: SerialNumber: 9887fc324d59364842

Additionally, could you address my question with respect to what the usb0 and rdnis0 interfaces are for from my ifconfig?

@DaneLLL Any thoughts on the above?

Hi,
We try another phone and it also works on Xavier/r32.3.1. usb1 is present.

[  959.036225] usb 2-4: new SuperSpeed USB device number 2 using tegra-xusb
[  959.059996] usb 2-4: New USB device found, idVendor=18d1, idProduct=4ee1
[  959.060011] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  959.060060] usb 2-4: Product: Pixel 2
[  959.060066] usb 2-4: Manufacturer: Google
[  959.060073] usb 2-4: SerialNumber: HT79E1A00831
[  967.703769] usb 2-4: USB disconnect, device number 2
[  968.044016] usb 2-4: new SuperSpeed USB device number 3 using tegra-xusb
[  968.069220] usb 2-4: New USB device found, idVendor=18d1, idProduct=4ee3
[  968.069249] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  968.069255] usb 2-4: Product: Pixel 2
[  968.069261] usb 2-4: Manufacturer: Google
[  968.069266] usb 2-4: SerialNumber: HT79E1A00831
[  968.131494] rndis_host 2-4:1.0 usb1: register 'rndis_host' at usb-3610000.xhci-4, RNDIS device, ea:11:41:c8:3f:c3
[  968.134591] usbcore: registered new interface driver rndis_host

We are checking your query about usb0 and rndis0. Will update.

Do you have any insight as to why it works for your phones but not mine? Do you have any suggestions on how to further debug why my setup doesn’t work? As I mentioned, I am able to get it to work out of the box with my x86 Ubuntu machine with the same phone setup.

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)