Colibri iMX6 RNDIS

Hi Community

I am working on Colibri iMX6DL with Iris carrier board.

I have wifi hotspot device which can provide internet access over USB.
I tried it with Ubuntu and the device is using rndis_host kernel module

[161220.533950] rndis_host 1-4:1.0 enx00e0227aa8c8: unregister 'rndis_host' usb-0000:00:14.0-4, RNDIS device
[166734.031354] rndis_host 1-4:1.0 eth0: register 'rndis_host' at usb-0000:00:14.0-4, RNDIS device, 00:e0:22:7a:a8:c8
[166734.093739] rndis_host 1-4:1.0 enx00e0227aa8c8: renamed from eth0

I’have tried the enable CONFIG_USB_NET_RNDIS_HOST with menuconfig and rebuilded.

There is a module pack is running
lsmod

Module                  Size  Used by
mxc_v4l2_capture       25640  0
ipu_bg_overlay_sdc      5233  1 mxc_v4l2_capture
ipu_still               1763  1 mxc_v4l2_capture
ipu_prp_enc             5763  1 mxc_v4l2_capture
ipu_csi_enc             3417  1 mxc_v4l2_capture
usb_f_rndis            11262  2
ipu_fg_overlay_sdc      5872  1 mxc_v4l2_capture
u_ether                 8725  1 usb_f_rndis
max9526_tvin            5890  0
adv7280_tvin            6701  0
v4l2_int_device         1884  3 adv7280_tvin,max9526_tvin,mxc_v4l2_capture
libcomposite           34093  10 usb_f_rndis
configfs               22846  3 usb_f_rndis,libcomposite

and the dmesg output is

root@colibri-imx6:~# dmesg | grep usb
[    0.386426] usbcore: registered new interface driver usbfs
[    0.386534] usbcore: registered new interface driver hub
[    0.386689] usbcore: registered new device driver usb
[    0.386953] 2000000.aips-bus:usbphy_nop1 supply vcc not found, using dummy regulator
[    0.387173] 2000000.aips-bus:usbphy_nop2 supply vcc not found, using dummy regulator
[    1.375464] usbcore: registered new interface driver asix
[    1.380981] usbcore: registered new interface driver ax88179_178a
[    1.387186] usbcore: registered new interface driver cdc_ether
[    1.393117] usbcore: registered new interface driver net1080
[    1.398874] usbcore: registered new interface driver cdc_subset
[    1.404892] usbcore: registered new interface driver zaurus
[    1.410576] usbcore: registered new interface driver cdc_ncm
[    1.428417] usbcore: registered new interface driver usb-storage
[    1.434582] usbcore: registered new interface driver usbserial
[    1.440497] usbcore: registered new interface driver usbserial_generic
[    1.447124] usbserial: USB Serial support registered for generic
[    1.453213] usbcore: registered new interface driver ftdi_sio
[    1.459041] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.466442] usbcore: registered new interface driver pl2303
[    1.472088] usbserial: USB Serial support registered for pl2303
[    1.479505] 2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
[    1.487978] 2184000.usb supply vbus not found, using dummy regulator
[    2.222577] usbcore: registered new interface driver usbhid
[    2.228188] usbhid: USB HID core driver
[    2.431369] 2184000.usb supply vbus not found, using dummy regulator
[    2.863759] usb 2-1: new high-speed USB device number 2 using ci_hdrc
[   11.673353] usb0: HOST MAC 00:14:2d:ff:ff:fe
[   11.686271] usb0: MAC 00:14:2d:ff:ff:ff
[   11.972746] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[  123.923149] usb 2-1: USB disconnect, device number 2
[  143.343755] usb 1-1: new full-speed USB device number 2 using ci_hdrc
[  143.536231] usb 1-1: not running at top speed; connect to a high speed hub
[  143.574768] usb-storage 1-1:1.2: USB Mass Storage device detected
[  143.591541] scsi host0: usb-storage 1-1:1.2
[  143.756153] usbcore: registered new interface driver cdc_acm

and dmesg rndis output is nothing

root@colibri-imx6:~# dmesg | grep rndis
root@colibri-imx6:~#             

There is not any information about rndis on dmesg colibri-imx6 but the Ubuntu pc have.
What is difference between rndis_host and usb_f_rndis.

How can i solve ?

Should work easily. You connect your Android phone as slave to your Colibri host port, on phone you then enable tethering over USB. Colibri should detect RNDIS device, load rndis_host driver automatically.

usb_f_rndis is for gadget side. Looks like you have it operating. So plugging your Colibri gadget port to PC, your PC should detect new USB network card.

Hi @Edward thanks for your reply.
I connected my Android phone to Colibri iMX6 directly by usb. And I enabled the tethering over USB then
rndis_host driver didn’t loaded automatically.

But the gadget side really worked. I can connect the over USB with ssh to colibri from PC.

Hi @erdemkahraman,

Make sure you installed kernel with enabled RNDIS_HOST:

# zcat /proc/config.gz | grep RNDIS_H
CONFIG_USB_NET_RNDIS_HOST=m

Make sure you installed kernel modules compiled with enabled RNDIS_HOST:

# find /lib/modules -name rndis*
/lib/modules/5.4.193/kernel/drivers/net/usb/rndis_host.ko

If module is there, hm, perhaps something wrong with USB? Try loading module by hand. In case of rndis_host initially not loaded, it should emit few messages to dmesg:

# modprobe rndis_host
[  465.362065] usbcore: registered new interface driver cdc_ether
[  465.402086] usbcore: registered new interface driver rndis_host

Does USB host port function properly? What happens when you plug in USB flash drive? Des lsusb list at least one root hub?

3 Likes

I rebuileded the image with "CONFIG_USB_NET_RNDIS_HOST=m" and rndis_host worked succesfully thank you @Edward

1 Like