Address Management and Device Discovery

Overview

This paper describes how to build and manage a TCP/IP network for USB devices.
Ethernet-style networking  can very simply be  extended to attached USB devices. Belcarra’s USBLAN for Window’s built-in DHCP server for address assignment, management and device discovery solutions has been implemented to fit within the network paradigm requirements. USBLAN for Window’s implements USB-IF (www.usb.org) Communications Device Class protocols (CDC-NCM, EEM, ECM and others) and will create an Ethernet-style networking segment for each attached USB device.
Networking over USB protocols such as CDC-ECM, Microsoft RNDIS, CDC-NCM, were originally designed to provide USB-mediated access to an external network, and address management werre seen as a matter for the external network segment.  On such external segments, a DHCP server was usually available.
Now, however, the great majority of USB devices using these protocols are smart devices which use a network style command channel, but do not provide access to an external network medium.  Therefore, the network segment terminates at the device, and there are only two nodes on the network: the USB host (Windows) and the device.  The DHCP service within Belcarra USBLAN for Window’s is a special service for such network segments.
The following describes how the network layer (IP) addresses can be seamlessly set up on top of the link layer and some pointers and strategies on OEM software running on Windows co-operating with the device to enable network-based device discovery.

Link Layer

At lowest level, a Windows network interface is an NDIS interface, using Ethernet-like (IEEE 802.3) framing.  The associated network segment consists of the new interface and the device.   The two devices (Windows and the attached USB device) can send network (Ethernet/802.3) frames between each other but that traffic will not be routed or bridged to anywhere else (unless the user takes action to bridge the new interface with others).IP address assignment and management

USBLAN v2.4.6 released

An evaluation version of Belcarra's USBLAN is now available from Windows Update for Windows 8/8.1 users.

To use this demo version of USBLAN for Windows the device will need to offer Vendor and Product ID’s as follows:
  • Vendor ID 0x15ec (Belcarra)
  • Product ID 0xd041 (DHCP on for all protocols, overriding the DHCPDType flag), or 0xd042 (DHCP always off, see section 5.4.1 of the OEM manual)
To get the driver, simply ensure that the Windows system is connected to the Internet, plug the device in (configured with the correct VID/PID) and let Windows search Windows Update.  The protocol (CDC-ECM, CDC-EEM, CDC-NCM, RNDIS) is automatically detected. The INF file of the USBLAN evaluation driver creates global variables in the registry using Service name BelcarraDemoUSBLAN. These parameters can be modified later using RegEdit (see Section 5.2ff in the OEM Manual).  As noted above, the parameter DHCPDType in the demo is inferred from the Product ID and in particular setting it in the registry has no effect.

Please note this is an evaluation version only and will run for one hour at a time. It must be re-plugged to continue use after the one hour expires.

Windows Embedded Standard 7

Windows Embedded Standard 7 (WES7), is a componentized version of Microsoft’s Windows 7 operating system that can be easily configured to use Belcarra's USBLAN Networking over USB solutions.

The Belcarra USBLAN driver  is available from Windows  Update for evaluation (see manual).  Whereas for a standard Windows 7 system connected to the Internet, simply attach a device that offers the appropriate Hardware ID's (VID: 0x15ec / PID: 0xd031), allow the system to search Windows Update and install.  For WES7, the driver must be downloaded separately from Windows Update (download also available) and added to the WES7 image.  

Note: the evaluation version will run for only one hour and then must be replugged to continue use.

Should you need assistance acquiring the .cab file or wish to receive an evaluation version that does not have the time limitation please contact us.

Microchip PIC32 USBLAN Demo

The Microchip PIC32 Microcontroller allows for implementation of a Full Speed USB Device.

Implementing a Networking over USB solution allows a PIC32 based design to connect to a Microsoft Windows system and use TCP/IP network connections using the Belcarra Windows USBLAN Class driver



Belcarra’s implementation of Networking over USB for the Microchip PIC32 is a very low cost networking solution for PIC32 projects, eliminating the need to add an Ethernet chip while using less Flash and RAM resources.

Full details (.pdf) and demonstration kit download link available here.

Using a data proxy for web access

Belcarra USBLAN for Windows allows a small 2-node private network to be established over a USB link from a device to a Windows host.

If the device has a need to access the Internet for WEB requests, then the simplest solution to satisfy the competing concerns of security and ease-of-use is a proxy server on the Windows machine. After a link is established, the device sends web requests to the Proxy Service on the Windows machine. The Proxy Service on the Windows side listens for such requests, and acts and an agent for the USB Device fetching the web pages and content and returning them to the USB Device.

Where is the proxy?

From the viewpoint of the device, the Windows server is the Proxy Server (implemented as a Windows Service). We assume that the application on the device can discover the IP address of the Windows side of the USB link.
For example the Windows System might be at 192.168.100.1 whereas the device itself is at 192.168.100.2. To avoid conflicts an alternate port is used for the Proxy Service, e.g. 8080.

Microsoft Operating Systems,Versions and NDIS Versions

Windows operating system,major and minor version numbers of the operating system support for NDIS versions, are described in the following table.

Operating System
Version Number
NDIS version

Windows 8
6.2
6.3
Windows 7
6.1
6.2
Windows Vista SP1
6.1
6.1
Windows Vista
6.0
6.0
Windows XP
5.1
5.1



Favourites