Definition of a USB Gold Standard Networking Device
By: Stuart Lynne
0. Overview
What is the Gold Standard for a Networking over USB implementation for non-infrastructure devices?
What will provide the most robust and useable networking solution for USB connected devices?
This is an overview of what could be considered the minimal and optional features of a well designed and implemented Networking over USB solution.
This is targeted at non-infrastructure devices such as:
- portable devices wanting temporary network connections via a proxy service
- smart handheld devices wanting to synchronize against host information
- devices needing to network between themselves
Attention needs to be paid to:
- how seamless is the usage?
The user should not have to do much more than plug the device in and if necessary select the device from a list of connected devices - devices should allow themselves to be named by the end user so that they can be distinguished when multiple devices are attached
- IP address management should be automatic and invisible
- neither the device nor the host applications should require use of static IP addresses
- host and device applications should be able to automatically connect (when appropriate) without end user intervention
Optionally, by implementing a Composite USB Device that contains multiple USB Functions it is possible to bundle the Networking Function with one or more other USB functions, including:
- Mass Storage
- Serial over USB
A Mass Storage Function can be used to make available any required host drivers.
A Serial over USB function may be an appropriate way to provide a separate channel for device monitoring and configuration.
1. USB Host
Requirements
- bridged network allows all devices to see each other
- integrated DHCP server for IP address managment
- IP network usage
- any private address (192.168.N, 172.16.N, 10.0)
- Auto IP assignment (169.254 ) use optional
- mDNS services installed
- Bonjour for Windows
- Avahi for Linux
- Bonjour always installed for MacOS
- mDNS responder broadcasting name (and services if appropriate for your application)
- optional
- permanent network interface
2. USB Device
Requirements
- composite device
- mass storage
- network cdc-eem
- serial cdc-acm (optional)
- windows and mac drivers for network in mass storage
- mDNS responder broadcasting name and service
- optional
- can synchronize system time from host
- can auto-config network IP
- can use DHCP client to get network IP
- end user configuration
- mDNS name
- composite or network only
- usb enable / disable
- usb bus_request / bus_request/
3. Device
Application Requirements
- use mDNS to lookup host services
- use mDNS to map host service to IP
- be able to re-connect if TCP connection is reset
- allow end user of that device to select from list of services or names to connect to for services
- be able to control the USB connection
- enable / disable USB
- enable / disable connection
4. Host
Application
Requirements
- use mDNS to lookup device services
- use mDNS to map device service to IP
- be able to re-connect if TCP connection is reset
- allow end user to select from list of services or names to connect to for services
- allow starting of your application with ip address so any mDNS browsers can start your application for an end user on that host
