Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Enabling RNDIS over USB on the Beaglebone Black (am335x) 6.6.0 BSP: (4 Items)
   
Enabling RNDIS over USB on the Beaglebone Black (am335x) 6.6.0 BSP  
Hello,

I've attempted to get RNDIS running on the Beaglebone Black BSP by cloning the usbndm descriptor configuration and 
changing it to include the RNDIS-specific descriptor include file, unmodified (hw/usbdc_desc_rndis.h). This approach 
seemed to work to some extent, as Windows enumerated the device, loaded the standard usb8023x.sys driver, and attempted 
to start it. The usbdnet.so component on the QNX side segfaulted:

Process 8204 (io-pkt-v4-hc) terminated SIGSEGV code=1 fltno=11 ip=7802b506(/proc/boot/devnp-usbdnet.so@nic_strtomac+
0x11) mapaddr=0000b506. ref=00000000

Looks like it's possible it may have been trying to form a mac address for the interface from some other information. 
This is a QNX component, delivered in object form, so I'm not able to debug into it. Has anyone else faced this hurdle 
and overcome it? Is there additional instrumentation I can enable to narrow down the issue? Are there additional issues 
with the rndis implementation in usbdnet.so that I need to be aware of? 

Many Thanks,
Tim Meese
Re: Enabling RNDIS over USB on the Beaglebone Black (am335x) 6.6.0 BSP  
For added information, here are the snippets from the lua startup script:

    # Step 1 - Start USB device stack
    io-usb-dcd -dusbrndis-am335x-musbmhdrc ioport=0x47401400,irq=18,nodma,force_device_mode,inherit_cfg
    waitfor /dev/io-usb-dcd/io-usb 4
    waitfor /dev/io-usb-dcd/devu-usbrndis-am335x-musbmhdrc.so 4

    # Step 2 - Start USB RNDIS function driver
    # For best performance attach the usbdnet driver to an existing io-pkt stack. Alternatively multiple
    # io-pkt stacks can be used (see SDP documentation for more details). 
    mount -Tio-pkt -o mac=123456789abc,protocol=rndis devnp-usbdnet.so
    ulink_ctrl -l1

    # Step 3 - Assign IP address to ncm interface using DHCP OR any static IP.
    if_up -p rndis0
    
    ifconfig rndis0 192.168.10.100

Again, usbrndis-am335x is a clone of the ndm driver replacing the descriptor header file with the published rndis header
 file. Any help would be appreciated. 

Best Regards,
Tim Meese
Re: Enabling RNDIS over USB on the Beaglebone Black (am335x) 6.6.0 BSP  
Hello QNX Community,

For anyone interested, there is an issue with the argument processing in io-pkt. For RNDIS, both device and host side 
MAC addresses have to be specified in the mount -Tio-pkt command like so:

    ##### Example of RNDIS device (Ethernet over USB) #####
    # Step 1 - Start USB device stack
    io-usb-dcd -dusbrndis-mx6sabrelite-ci ioport=0x02184000,irq=75
    waitfor /dev/io-usb-dcd/io-usb 4
    waitfor /dev/io-usb-dcd/devu-usbrndis-mx6sabrelite-ci.so 4

    # Step 2 - Start USB RNDIS function driver
    # For best performance attach the usbdnet driver to an existing io-pkt stack. Alternatively multiple
    # io-pkt stacks can be used (see SDP documentation for more details). 
    mount -Tio-pkt -o mac=123456789abc,usbdnet_mac=123456789abd,protocol=rndis devnp-usbdnet.so 
    ulink_ctrl -l

Also, note that the MAC address must use a valid OUI, or the network stack will silently ignore the interface. 

Tim
ethernet over USB on the Beaglebone Black (am335x) 6.6.0 BSP  
 
Pleas help me 

Can I use Ethernet over USB while booting QNX on beagle-bone 
regards 
Divin