RNDIS driver architecture differences between Windows CE 4.2 and 5.0.

I have received some questions on the differences in RNDIS driver architecture between Windows CE 5.0 and 4.2 in the newsgroup.

Windows CE 5.0 introduces layered USB function bus driver architecture.

The software building block looks like the following:

       +----------------------------+
| |
| USB Function Client Driver |
| |
+------------+---------------+
|
|
+----------------+--------------------+
| |
| USB function driver controller MDD | <-- Platform independent portion provided by Microsoft.
| |
+ - - - - - - - - - - - - - - - - - - +
| |
| USB function driver controller PDD | <-- Platform dependent portion, typically provided by OEM.
| |
+-----------------+-------------------+
|
|

Harware

Refer to the following web site for detail description of USB function bus driver.
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk5/html/wce50howhowtodevelopusbfunctionclientdriver.asp

Windows CE (platform builder) 5.0 provides samples for 3 client drivers: Mass Storage, Serial, and RNDIS.
In typical implementation, an OEM just needs to implement the PDD portion of the USB function controller driver.

The Pocket PC platform for example uses the RNDIS client driver straight from Platform Builder.
The RNDIS client driver implementation can be found in:
%_WINCEROOT%\Public\Common\OAK\Drivers\USBFN\class\rndis

 

In CE 4.2, the RNDIS function driver is a monolithic driver with the following architecture:

   +-------------------------------+
| |
| RNDISMINI NDIS MDD library |
| |
+ - - - - - - - - - - - - - - - +
| |
| RNDIS PDD portion |
| |
+-------------------------------+

The platform builder 4.2 provides the Netchip 2890 sample RNDIS PDD portion and the platform independent RNDISMINI MDD library
which handles the RNDIS protocol and the miniport instantiation to NDIS.

The sample code can be found in the respective directories:

%_winceroot%\public\COMMON\oak\drivers\RndisFn\Net2890
%_winceroot%\public\COMMON\oak\drivers_McKendric_42\netcard\rndismini

One advantage of this architecture is that the PDD portion as KITL RNDIS driver.
The RNDIS KITL MDD library sample code is in the following directory:

%_winceroot%\public\COMMON\oak\drivers\ethdbg\rne_mdd

 

Summary:
In CE 5.0 the PDD driver provided by the platform OEM is designed specifically to handle
USB function controller hardware independent of different client drivers using it.
This architecture also provides flexibility in loading and unloading different client driver in run time.
One usage of this on Pocket PC platform is when using the device for Active Sync (RNDIS) or Modem Link (Serial).
One drawback from this architecture is that OEM needs to write a separate PDD driver for CE 4.2 driver model if KITL RNDIS is the chosen debug transport.

-- Soemin ---