emUSB

emUSB Device is a high speed USB device stack specifically designed for embedded systems. The software is written in ANSI "C" and can run on any platform. emUSB can be used with embOS or any other supported RTOS. A variety of target drivers are already available. Support for new platforms can usually be added for no extra charge. 

Features

  • High speed
  • Optimized to be used with embOS but works with any other supported RTOS.
  • Easy to use
  • Easy to port
  • No custom USB host driver necessary
  • Start / test application supplied
  • Highly efficient, portable, and commented ANSI C source code
  • Hardware abstraction layer allows rapid addition of support for new devices.

emUSB components

Target emUSB Components



emUSB consists of three layers: A driver for hardware access, the emUSB core and at least one USB class driver or the bulk communication component.


USB class drivers (MSD, CDC, HID, MTP, RNDIS), Bulk communication component, and hardware drivers, they are separate packages, which can be combined and ordered to suit the requirements of the project.

Component Description
USB protocol layer
Bulk emUSB bulk component.
(emUSB-Bulk)
MSD emUSB Mass Storage Device class component.
(emUSB-MSD).
CDC emUSB Communication Device Class component.
(emUSB-CDC)
HID emUSB Human Interface Device Class component.
(emUSB-HID)
MTP emUSB Media Transfer Protocol component.
(emUSB-MTP)
Printer emUSB Printer component.
(emUSB-Printer)
RNDIS emUSB RNDIS component.
(emUSB-RNDIS)
Core layer
emUSB Core The emUSB core is the intrinsic USB stack.
Hardware layer
Driver USB controller driver.


emUSB Bulk

emUSB Bulk

The emUSB-Bulk stack consists of an embedded side, which is shipped in source code form, and a driver for the PC, which is typically shipped as executable (.sys). (The source of the PC driver can also be ordered.) emUSB-Bulk allows developers to quickly and painlessly develop software for an embedded device that communicates with a PC via USB. The communication is like a single, high speed, reliable channel (very similar to a TCP connection). It basically allows the PC to send data to the embedded target, the embedded target to receive these bytes and reply with any number of bytes. The PC is the USB host, the target is the USB client. The USB standard defines 4 types of communication: Control, isochronous, interrupt and bulk. Experience shows, that for most embedded devices bulk mode is the communication mode of choice. It allows usage of the full bandwidth of the Universal Serial Bus.


emUSB-MSD

The Mass Storage Device (MSD) is a USB class protocol defined by USB Implementers Forum. The class itself is used to get access to one storage medium or multiple storage mediums. As the USB mass storage device class is well standardized, every major OS supports it out of the box, therefore there is no need to develop any drivers.


emUSB-CDC

The USB Communications Device Class (CDC) allows to convert the USB device into a serial communication device. Under Windows the device will show up as a COM port, under Linux as a /dev/ACMx device. This allows the user to use host software which was not designed to be used with USB, such as a terminal program or a datalogger.


emUSB-HID

The Human Interface Device class (HID) is an abstract class protocol defined by USB Implementers Forum. This protocol was defined for the handling of devices which are used by humans to control the operation of computer systems. An installation of a custom-host USB driver is not necessary, because the USB human interface device class is standardized and every major OS already provides host drivers for it. emUSB device also allows “Vendor specific HIDs”. These are HID devices communicating with an application program. The host OS loads the same driver loaded for any “true HID” and automatically enumerate the device. This allows the creation of non-standard HID devices which can be handled through the host's HID API.


emUSB-MTP

The Media Transfer Protocol (MTP) is a USB class protocol which can be used to transfer files to and from storage devices. MTP is an official extension of the Picture Transfer Protocol (PTP) designed to allow digital cameras to exchange image files with a computer. MTP extends this by adding support for audio and video files. MTP is an alternative to Mass Storage Device (MSD) and it operates at the file level in contrast to MSD which reads and writes sector data.


emUSB-Printer

The USB class protocol for printers was defined for the handling of output devices like printers and plotters. emUSB printer receives data from the host and forwards the data to a parser. The printer component provides automatic error handling routines, if events occur like the device running out of paper. The USB protocol is completely hidden for the developer and he can concentrate on developing the parser.


emUSB-RNDIS

The Remote Network Driver Interface Specification (RNDIS) is a Microsoft proprietary USB class protocol which can be used to create a virtual Ethernet connection between a USB device and a host PC. 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.