USB Component  Version 6.13.7
MDK Middleware for USB Device and Host Communication
 All Data Structures Functions Variables Enumerations Enumerator Groups Pages
USB Device RNDIS to Ethernet Bridge

The USB Device RNDIS to Ethernet Bridge example connects a Windows host via USB to a Cortex-M system that provides an Ethernet interface for network connectivity.

The following picture shows an exemplary connection of the development board (in this case a MCB4300) to a host PC.


The Abstract.txt file contained in the Documentation group of the Project window gives you more information on the general setup.

Build the "RNDIS to Ethernet Bridge" project

Open the example project in MDK. The ┬ÁVision Project window should display a similar project structure:

Typical project structure of the RNDIS bridge example

Source Files

  • main.c contains the main C function that initializes the Keil RTX real-time operating system.
  • RNDIS.c contains the app_main C function that initializes the GLCD and the USB Device Component.
  • The files USBD_User_CDC_ACM_RNDIS_ETH_0.c implements the application specific functionality of the CDC ACM class using the RNDIS protocol and is used to implement a Network Interface Card (NIC) to Ethernet Bridge to the USB Host. Refer to CDC: Communication Device Class (ACM) for details about these template functions.

If you are using RTOS other than CMSIS-RTOS2 RTX5 for your project please make sure to satisfy USB Device Resource Requirements.

You may now build and download the example project to the development board using the ┬ÁVision commands:

  • Project –> Build target (F7)
  • Flash –> Download (F8)

After these steps, the project should start executing on your development kit. In case of errors, refer to the development board user's guide for configuration information.

Using the "RNDIS to Ethernet Bridge" Project

Hardware Setup

The setup of the development board hardware is described in the Abstract.txt file.

  • Verify all jumper settings on the target hardware.
  • Power your development board externally.
  • Connect a USB cable between your development board and the host PC.
  • You should see new "Ethernet" connection with a "Remote NDIS compatible device" in your network control panel: