Your "One-Stop-Shop" for your next Embedded Project

Stacks Image pp8020_n8016_n7993

SEGGER emUSB RNDIS class


emUSB-RNDIS allows a USB device to act as a virtual network adapter. This can be used to run any TCP/IP based application via USB. The most noteworthy application is a USB based webserver. The USB webserver allows users to configure their device and to view data using a webbrowser. This saves development costs as there is no need to develop an application for every major operating system which would allow the user to interact with the USB device.

The hardware costs can also be reduced as an Ethernet interace is not required.

The following diagram describes shows RNDIS and other components involved:

Here is a browser page opened via emUSB-RNDIS:


Other applications of emUSB-RNDIS include, but are not limited to:

  • USB-Terminal (e.g. Telnet)
  • USB-FTP-Server

IP addresses

The RNDIS device requires two IP addresses. One IP address is used for the RNDIS virtual network interface, the second one for the actual device. IP addresses are defined by configuration. The default configuration uses 10.0.0.10 for the virtual host running the servers and 10.0.0.11 for the RNDIS virtual network interface.


Working with RNDIS

An emUSB-RNDIS device connected to a PC running the Windows operating system is listed as a separate network interface in the "Network Connections" window as shown in this screenshot:


The  ping  command line utility can be used to test the connection to target as shown below.  If  the  connection  is  correctly  established  the  number  of  the  lost  packets should be 0. 


Here is a screenshot of the popular Linux destribution Ubuntu:


This shows emUSB-RNDIS being used on Mac OS X:


emUSB-RNDIS comes as a whole packet and contains the following:

  • •Generic USB handling
  • •RNDIS device class implementation
  • •Network interface driver which uses embOS/IP as a TCP/IP stack.
  • A sample application demonstrating how to work with RNDIS.

The Remote Network Driver Interface Specification (RNDIS) is a USB class protocol created by Microsoft. A TCP/IP stack like embOS/IP is required on the USB device side to handle the actual IP communication. Any available IP protocol (UDP, TPC, FTP, HTTP, etc.) can be used to exchange data.

USB RNDIS is supported by all Windows operating systems starting with Windows XP, as well as by Linux with kernel versions newer than 2.6.34. An .inf file is required for the  installation  on  Microsoft  Windows  systems  older  than  Windows  7.  The  emUSB-RNDIS  package includes .inf files for Windows versions older than Windows 7. OS X will require a third-party driver to work with RNDIS, which can be downloaded from here.

One Bulk IN, one Bulk OUT and one Interrupt IN endpoint are required for emUSB-RNDIS.

emUSB-RNDIS can be used in combination with other intrfaces (Bulk, CDC, MSD, MTP, HID) without any issues.

On a typical Cortex-M CPU running at 120MHz a transfer speed of about 5 MByte/sec can be achieved when using a high-speed USB connection.


Additional Information

For more technical details about RNDIS follow the link below: