USBX RNDIS initialization


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_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.