This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: How to enable USB RNDIS in SDK9.1

Part Number: AM625
Other Parts Discussed in Thread: SK-AM62B

How to enable USB CDC in SDK9.1?

customer made change in defconfig and dts, but get error during kernel launching

am62x_vh600_defconfig

k3-am62-main.dtsi

k3-am62x-vh600-common.dtsi

  • Hi Tony,

    Those 'Unknown symbol ...' kernel messages mean the kernel Image and modules in the root filesystem are not from the same kernel build.

    When recompiled the kernel and modules, ensure to update both kernel Image and modules to the root filesystem.

  • Bin,

    I tried to verify on SK-AM62B according the user guide, and enable USB Gadget functions build in Kernel other than module.

    Enable USB1 to otg.

    rebuild dtb and Kernel, update to sd card, after booting up, connect USB1 to pc, no response on either side. 

    make sd card with default .wic file, insmod rndis.ko also return below errors.

    And Does it a driver for WIN10 pc to support AM62x RNDIS?

  • Hi Tony,

    It appears the customer has made some progress.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1311134/usb-error-when-linux-start-on-am6234

    Do you still need answers here?

  • I did not make it work with default fs, I leave my desktop build SDK tonight, maybe he rebuild it make it work. 

  • Enable USB1 to otg.

    Is this SK or custom board? The USB1 on SK is host-only port, it won't work in otg mode. If custom board, is its USB1 designed as a dual role port? The DTS shows USB0 is already a dual-role port.

  • Hi, Bin,

    From the SK-AM62B Schematic, USB1 should can be either host or slave. do you mean the connector on board is type A host?

    I rebuild Kernel and Modules, and copied all sudo cp -rf ./drivers/usb/* /media/tony/rootfs/lib/modules/6.1.33-rt11-g685e771524/kernel/drivers/usb/"

    then insmod usb_f_rndis.ko or g_ether.ko, both return error. it should be dependence issue.

    root@am62xx-evm:/lib/modules/6.1.46-rt13-gb871cdee8c/kernel/drivers/usb/gadget/function# insmod usb_f_rndis.ko
    [   96.292580] usb_f_rndis: Unknown symbol usb_os_desc_prepare_interf_dir (err -2)ction# insmod usb_f_rndis.ko
    [   96.292612] usb_f_rndis: Unknown symbol usb_interface_id (err -2)
    [   96.292626] usb_f_rndis: Unknown symbol usb_assign_descriptors (err -2)
    [   96.292654] usb_f_rndis: Unknown symbol gether_disconnect (err -2)
    [   96.292670] usb_f_rndis: Unknown symbol config_ep_by_speed (err -2)
    [   96.292675] usb_f_rndis: Unknown symbol gether_set_dev_addr (err -2)
    [   96.292690] usb_f_rndis: Unknown symbol gether_register_netdev (err -2)
    [   96.292702] usb_f_rndis: Unknown symbol usb_function_register (err -2)
    [   96.292709] usb_f_rndis: Unknown symbol gether_get_host_addr_u8 (err -2)
    [   96.292714] usb_f_rndis: Unknown symbol gether_set_qmult (err -2)
    [   96.292729] usb_f_rndis: Unknown symbol gether_get_host_addr (err -2)
    [   96.292855] usb_f_rndis: Unknown symbol gether_set_gadget (err -2)
    [   96.292868] usb_f_rndis: Unknown symbol usb_ep_autoconfig (err -2)
    [   96.292889] usb_f_rndis: Unknown symbol usb_put_function_instance (err -2)
    [   96.292898] usb_f_rndis: Unknown symbol gether_connect (err -2)
    [   96.292906] usb_f_rndis: Unknown symbol gether_get_dev_addr (err -2)
    [   96.292910] usb_f_rndis: Unknown symbol gether_set_host_addr (err -2)
    [   96.292925] usb_f_rndis: Unknown symbol usb_function_unregister (err -2)
    insmod: ERROR: could not insert module usb_f_rndis.ko: Unknown s[   96.292931] usb_f_rndis: Unknown symbol gether_cleanup (err -2)
    ymbol in module
    [   96.292941] usb_f_rndis: Unknown symbol gether_get_ifname (err -2)
    [   96.292946] usb_f_rndis: Unknown symbol gether_set_ifname (err -2)
    [   96.292961] usb_f_rndis: Unknown symbol gether_setup_name_default (err -2)
    root@am62xx-evm:/lib/modules/6.1.46-rt13-gb871cdee8c/kernel/driv[   96.292974] usb_f_rndis: Unknown symbol gether_get_qmult (err -2)
    ers/usb/gadget/function# [   96.292987] usb_f_rndis: Unknown symbol usb_free_all_descriptors (err -2)
    [   96.292996] usb_f_rndis: Unknown symbol usb_gstrings_attach (err -2)

    root@am62xx-evm:/lib/modules/6.1.46-rt13-gb871cdee8c/kernel/drivers/usb/gadget/legacy# insmod g_ether.ko
    [ 2183.268468] g_ether: Unknown symbol usb_get_function_instance (err -2)
    [ 2183.268501] g_ether: Unknown symbol usb_string_ids_tab (err -2)
    [ 2183.268511] g_ether: Unknown symbol usb_get_function (err -2)
    [ 2183.268518] g_ether: Unknown symbol usb_composite_unregister (err -2)
    [ 2183.268539] g_ether: Unknown symbol gether_set_dev_addr (err -2)
    [ 2183.268545] g_ether: Unknown symbol usb_put_function (err -2)
    [ 2183.268563] g_ether: Unknown symbol rndis_borrow_net (err -2)
    [ 2183.268577] g_ether: Unknown symbol usb_add_function (err -2)
    [ 2183.268581] g_ether: Unknown symbol usb_composite_probe (err -2)
    [ 2183.268587] g_ether: Unknown symbol gether_register_netdev (err -2)
    [ 2183.268594] g_ether: Unknown symbol usb_composite_overwrite_options (err -2)
    [ 2183.268599] g_ether: Unknown symbol gether_set_qmult (err -2)
    [ 2183.268605] g_ether: Unknown symbol usb_otg_descriptor_alloc (err -2)
    insmod: ERROR: could not insert module g_ether.ko: Unknown symbo[ 2183.268610] g_ether: Unknown symbol gether_set_gadget (err -2)
    l in module
    [ 2183.268617] g_ether: Unknown symbol usb_put_function_instance (err -2)
    [ 2183.268623] g_ether: Unknown symbol gether_set_host_addr (err -2)
    [ 2183.268628] g_ether: Unknown symbol usb_otg_descriptor_init (err -2)
    [ 2183.268634] g_ether: Unknown symbol usb_add_config (err -2)
    root@am62xx-evm:/lib/modules/6.1.46-rt13-gb871cdee8c/kernel/drivers/usb/gadget/legacy#

  • Hi Tony,

    do you mean the connector on board is type A host?

    Yes.

    USB1 bus has 150uF cap, which is too much for device mode. USB1 cannot be used as a device port even if you use an illegal type-A-to-type-A USB cable.

    I rebuild Kernel and Modules, and copied all sudo cp -rf ./drivers/usb/* /media/tony/rootfs/lib/modules/6.1.33-rt11-g685e771524/kernel/drivers/usb/"

    then insmod usb_f_rndis.ko or g_ether.ko, both return error. it should be dependence issue.

    You only copied the kernel modules, but not the kernel Image. You have to update both to the SD card:

    - sudo cp arch/arm64/boot/Image <SD card rootfs mount point>/boot/
    - sudo make modules_install INSTALL_MOD_PATH=<SD card rootfs mount point>

  • Hi, Bin,

    As customer's Ubantu under Vmware, it is not detected, but not sure due to PC system, or board.

    I would like to verify the RNDIS feature on my sice, I make Image, modules and dtb again, cp and installed new build Image and modules, still same error. 

    root@am62xx-evm:/lib/modules# ls -l
    total 8
    drwxr-xr-x 4 root root 4096 Mar  9  2018 6.1.46-rt13-gb871cdee8c
    drwxr-xr-x 3 root root 4096 Jan 15  2024 6.1.46-rt13-gb871cdee8c31-dirty
    root@am62xx-evm:/lib/modules#
    
    root@am62xx-evm:/lib/modules/6.1.46-rt13-gb871cdee8c31-dirty/kernel/drivers/usb/gadget/legacy# uname -a
    Linux am62xx-evm 6.1.46-rt13-gb871cdee8c31-dirty #3 SMP PREEMPT Mon Jan 15 11:49:11 CST 2024 aarch64 aarch64
    aarch64 GNU/Linux
    root@am62xx-evm:/lib/modules/6.1.46-rt13-gb871cdee8c31-dirty/kernel/drivers/usb/gadget/legacy# insmod g_ether
    ko
    [  848.974869] g_ether: Unknown symbol usb_get_function_instance (err -2)
    [  848.974929] g_ether: Unknown symbol usb_string_ids_tab (err -2)
    [  848.974964] g_ether: Unknown symbol usb_get_function (err -2)
    [  848.974993] g_ether: Unknown symbol usb_composite_unregister (err -2)
    [  848.975041] g_ether: Unknown symbol gether_set_dev_addr (err -2)
    [  848.975069] g_ether: Unknown symbol usb_put_function (err -2)
    [  848.975111] g_ether: Unknown symbol rndis_borrow_net (err -2)
    insmod: ERROR: could not insert module g_ether.ko: Unknown symbo[  848.975140] g_ether: Unknown symbol usb_ad
    d_function (err -2)
    l in module
    [  848.975167] g_ether: Unknown symbol usb_composite_probe (err -2)
    [  848.975202] g_ether: Unknown symbol gether_register_netdev (err -2)
    [  848.975232] g_ether: Unknown symbol usb_composite_overwrite_options (err -2)
    [  848.975260] g_ether: Unknown symbol gether_set_qmult (err -2)
    [  848.975289] g_ether: Unknown symbol usb_otg_descriptor_alloc (err -2)
    [  848.975317] g_ether: Unknown symbol gether_set_gadget (err -2)
    [  848.975344] g_ether: Unknown symbol usb_put_function_instance (err -2)
    root@am62xx-evm:/lib/modules/6.1.46-rt13-gb871cdee8c31-dirty/ker[  848.975373] g_ether: Unknown symbol gether
    _set_host_addr (err -2)
    [  848.975400] g_ether: Unknown symbol usb_otg_descriptor_init (err -2)
    nel/drivers/usb/gadget/legacy# [  848.975429] g_ether: Unknown symbol usb_add_config (err -2)
    
    root@am62xx-evm:/lib/modules/6.1.46-rt13-gb871cdee8c31-dirty/kernel/drivers/usb/gadget/legacy#

    With modprobe g_ether command, can successfully enable RNIDS, and can be recognize on my Ubuntu 22.

    root@am62xx-evm:~# modprobe g_ether
    [   80.696108] using random self ethernet address
    [   80.696125] using random host ethernet address
    [   80.697098] usb0: HOST MAC 86:a5:80:d7:80:dc
    [   80.697115] usb0: MAC e6:8e:da:b3:a8:3e
    [   80.697180] using random self ethernet address
    root@am62xx-evm:~# [   80.697186] using random host ethernet address
    [   80.697290] g_ether gadget.0: Ethernet Gadget, version: Memorial Day 2008
    [   80.697298] g_ether gadget.0: g_ether ready
    [   80.938067] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready

    connect to Window laptop, can see detecting procedure and successfully on screen right bottom, but did not find it ipconfig and device manager.  can see a USB serial in device manager.

    BTW, my hardware setup: SK-AM62B USB1 type-A connect to PC. Latest Linux SDK

    root@am62xx-evm:~# uname -a
    Linux am62xx-evm 6.1.46-rt13-gb871cdee8c31-dirty #4 SMP PREEMPT Tue Jan 16 19:17:15 CST 2024 aarch64 aarch64 aarch64 GNU/Linux

  • Hi Tony,

    As customer's Ubantu under Vmware, it is not detected, but not sure due to PC system, or board.

    I have not used VMWare for a very long time, but I believe by default the PC USB controllers are not routed to the OS in VMWare, you would have to manually assign the USB controller to VMWare, so that Ubuntu in VMWare can see the USB controllers and attached USB devices.

    With modprobe g_ether command, can successfully enable RNIDS, and can be recognize on my Ubuntu 22.

    "modprobe g_ether" is the correct command, you shouldn't use insmod command. g_ether (and other USB gadget drivers) depends on other USB drivers. modprobe command would automatically loads all the dependent drivers, but insmod command doesn't.

    BTW, my hardware setup: SK-AM62B USB1 type-A connect to PC. Latest Linux SDK

    I guess you set USB1 dr_mode = "otg", then you need to set USB0 dr_mode = "host". Using both USB ports in "otg" mode is kind of complicated.

  • Hi, Bin,

    Connect SK-AM62B USB0 to PC, installed RNDIS Window 10 driver from customer which download from internet, WIN10 can detect RNDIS now.

    BTW, before install RNDIS driver, it will be recognized as COM on WIN10. 

  • Hi Tony,

    Thanks for the update and sharing the solution. It is helpful.

    I don't use Windows and didn't know it doesn't have RNDIS host driver installed out of the box.