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