USBX RNDIS initialization

Hi,

I am trying to get into use the USBX RNDIS device class.

Th RNDIS is not supported by SSC while all the required code is supplied with SSP. So I try to use USBX and NETX API directly following the Express Logic X-Ware documentation.

1. USB descriptors I took from the USBX User Guide example as well as the example of the activation of the RNDIS class via call ux_device_stack_class_register(). 

2. Unfortunately the RNDIS_Template.inf provided does not correspond to the descriptor from the manual. And the inf file is not signed also, so I can't use it on Windows8.1 even if I adjust the descriptor to match the inf file. While we own PID and are able to sign drivers I would like to start with something proved to work. So I installed generic RNDIS driver bundled with Windows8.1 - the "USB RNDIS adapter". It uses rndisimpx.sys and usb8023x.sys binaries. The device is now gets enumerated by Windows host and Windows says (sometimes) that it is operating normally.

3. Initialization of NETX is done via calls:

nx_system_initialize();

nx_packet_pool_create(...);

_ux_network_driver_init();

nx_ip_create(... _ux_network_driver_entry, .....);

Windows creates network driver instance but places it in disabled state. After a while the yellow exclamation mark appears on top of the USB RNDIS adapter icon in Device Manager with device status "This device cannot start. (Code 10)". The error code may vary.

ipconfig /all says that "Media unoperational" for the RNDIS network interface.

My questions are:

1. Do I miss any steps in the initialisation? I feel that USB RNDIS class should be somehow binded to the ux_network_driver but I failed to find how.

2. Is it OK to use "USB RNDIS adapter"? There are several RNDIS drivers bundled with Windows. Do I need some particular version? Is any particular requirements to Windows driver version imposed by USBX RNDIS implementation.

3. In which order the RNDIS components have to be initialized? USB part first? Or ip_instanse first? Or else?

An example project for the RNDIS initialisation would be very useful. I do not need full project, just the key parts of the initialisation.

BR,

Mikhail

Parents
  • Hi Mikhail-
    Looks like the SSP 1.6.0 release notes, section 8.5, show the RNDIS module as experimental and not supported by Renesas at this time.

    Perhaps someone else on the forum can help you with this.

    Warren
  • Thanks Warren,

    Yes, I know RNDIS is not supported by SSP currently.

    I really hope for JanetC help :)

    Meanwhile I went through the topic little bit further and and now I am getting network interface mounted by Windows.

    From the statistic counters from NX_IP I see that the RNDIS instance gets some packets from Windows and then drops all of them. No any packet is sent to Windows host. So finally Windows says "media is unoperational" and disables the RNDIS network interface.

    BR,
    Mikhail
  • Attached is a project for SSP 1.6.0 using e2studio and GCC complier, that attaches a USB RNDIS network interface as a secondary interface to an IP instance. The Synergy end of the RNIS has a fixed IP address (192.168.1.5), there is an unsigned .INF file that corresonds to the setup included in the project. Once the driver has been installed, you should get a "Remote NDIS6 based Device" appear in Device manager :-

     

    Assign the PC end an IP address :-

    (The synergy end has a fixed IP address of 192.168.1.5 in the project). The project runs an HTTP server, with the files stored on a USB mass storage device (there is a simple test web page included in the project, just extract that on the USB mass storage device and insert into the S7G2-SK board). The primary interface for the IP instance is ethernet, that is assigned an IP address via DHCP.

    Once the primary interface has an ip address, the http server is started. Then you should be able to ping the Synergy device via the RNDIS network interface IP address, and load the HTTP page from the HTTP server running on Synergy device (http://192.168.1.5/index.htm):-

     

    I have tested this on Windows 10 64-bit.

    SSP_1_6_0_S7G2_SK_RNDIS_Device.zip

     

  • Big thanks Jeremy,

    Your example is exactly what I wanted to have.
    I was able to try it and it works perfect.
    To cut a corner I installed RNDIS driver bundled with Windows8.1 not yours.
    It is because Win8 I was not able to use your inf file, Win8 does not allow to install none-signed drivers (at least without headache).

    Your example is a good demonstration of Synergy power.
    In 200-300 lines of code there are USB device and host stacks, USB memory stick access, TCP/IP protocol stack, WEB server, Ethernet and RNDIS!

    Now I will try to get my own example working. I see that initialization sequence in your code is different from mine. Also I am using older 1.2 SSP. I do not need Ethernet support and would like to have RNDIS (not Ethernet) as primary. I think you included Ethernet as primary because RNDIS is not directly supported by SSP.

    BR,
    Mikhail
Reply
  • Big thanks Jeremy,

    Your example is exactly what I wanted to have.
    I was able to try it and it works perfect.
    To cut a corner I installed RNDIS driver bundled with Windows8.1 not yours.
    It is because Win8 I was not able to use your inf file, Win8 does not allow to install none-signed drivers (at least without headache).

    Your example is a good demonstration of Synergy power.
    In 200-300 lines of code there are USB device and host stacks, USB memory stick access, TCP/IP protocol stack, WEB server, Ethernet and RNDIS!

    Now I will try to get my own example working. I see that initialization sequence in your code is different from mine. Also I am using older 1.2 SSP. I do not need Ethernet support and would like to have RNDIS (not Ethernet) as primary. I think you included Ethernet as primary because RNDIS is not directly supported by SSP.

    BR,
    Mikhail
Children
No Data