How to enable TX2 USB RNDIS function

Hi All:

I want to test TX2 devkit RNDIS function, but it failed. My test procedure just as follows:

  1. TX2 devkit connect a WIFI AP.
  2. turn off ubuntu PC’s WIFI and plug out ethernet.
  3. connect TX2 devkit and a ubuntu PC and test PC network function.

I use “lsusb -t” can see RNDIS interface as follows, but it seems this function is fail.

adam@adam-Latitude:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    |__ Port 1: Dev 7, If 5, Class=Communications, Driver=cdc_ether, 480M
    |__ Port 1: Dev 7, If 3, Class=CDC Data, Driver=cdc_acm, 480M
    |__ Port 1: Dev 7, If 1, Class=CDC Data, Driver=rndis_host, 480M
    |__ Port 1: Dev 7, If 6, Class=CDC Data, Driver=cdc_ether, 480M
    |__ Port 1: Dev 7, If 4, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 1: Dev 7, If 2, Class=Communications, Driver=cdc_acm, 480M
    |__ Port 1: Dev 7, If 0, Class=Communications, Driver=rndis_host, 480M
    |__ Port 5: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 5: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 7: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M

Do you know how to enable USB RNDIS?

I’m running R28.2:

head -n 1 /etc/nv_tegra_release 
# R28 (release), REVISION: 2.0, GCID: 10136452, BOARD: t186ref, EABI: aarch64, DATE: Fri Dec  1 14:20:33 UTC 2017

and it seems kernel has support for USB RNDIS:

gunzip -c /proc/config.gz | grep USB | grep RNDIS
CONFIG_USB_NET_RNDIS_HOST=m
# CONFIG_USB_NET_RNDIS_WLAN is not set
CONFIG_USB_F_RNDIS=y
CONFIG_USB_CONFIGFS_RNDIS=y

You may activate CONFIG_USB_NET_RNDIS_WLAN for your case.

Note my R28.2 kernel lacks USB_ACM support:

gunzip -c [s]/proc/config.gz | grep USB_ACM
# CONFIG_USB_ACM is not set

If needed, but not sure for your case (seems you have cdc_acm), you may check http://www.jetsonhacks.com/2017/07/31/build-kernel-ttyacm-module-nvidia-jetson-tx2/ for adding USB_ACM support.

What does lsmod show ?

Hi Honey_Patouceul:

So you have tried RNDIS is ok on TX2 devkit?
please see the logs on my board as follows:

nvidia@tegra-ubuntu:~$ head -n 1 /etc/nv_tegra_release                                                                                                                
# R28 (release), REVISION: 2.0, GCID: 10567845, BOARD: t186ref, EABI: aarch64, DATE: Fri Mar  2 04:57:01 UTC 2018
nvidia@tegra-ubuntu:~$ gunzip -c /proc/config.gz | grep USB | grep RNDIS                                                                                                                                    
CONFIG_USB_NET_RNDIS_HOST=m
# CONFIG_USB_NET_RNDIS_WLAN is not set
CONFIG_USB_F_RNDIS=y
CONFIG_USB_CONFIGFS_RNDIS=y
nvidia@tegra-ubuntu:~$ gunzip -c /proc/config.gz | grep USB_ACM
CONFIG_USB_ACM=y
nvidia@tegra-ubuntu:~$ lsmod
Module                  Size  Used by
nvidia@tegra-ubuntu:~$

No, I don’t have such a device, so I cannot say it can work for sure.
I was just trying to understand what is the problem in your case and advise to check ACM support.

The output of lsmod being void is surprising to me.
Do you have a custom kernel ?
What gives:

uname -a
ls /lib/modules/

Can you plug the USB RNDIS device in, wait for 10s and run lsmod again ?

Honey_Patouceul,

I remember CONFIG_USB_ACM=y is added to rel-28.2 kernel. Could you confirm it?

Well, I think it was missing in the Dec2017 build (DP), but it is back in March2018 build (Prod Release).

Hi Honey_Patouceul:

nvidia@tegra-ubuntu:~$uname -r
4.4.38+
nvidia@tegra-ubuntu:~$ls /lib/modules/
4.4.38-tegra

Seems you’re running a custom kernel but you haven’t built or installed modules.
For a 4.4.38+ kernel, modules should be in /lib/modules/4.4.38+, while you only have the modules for kernel 4.4.38-tegra.