M
X
800 SERIES PROGRAMMERS GUIDE 201
CHAPTER 8
USB - Device / Host
The M
x
800 series supports two USB ports. One port (on the multi-port cable)
supports either the host or device function. The multi-port cable determines the
type of USB port. The second USB port is always the host and is available on the
I/O module interface.
USB Device
When acting as a USB device, the M
x
800 series of terminals conforms to the
Linux USB gadget framework. See http://www.linux-usb.org/gadget/
The two devices that the M
x
800 series of terminals will emulate are:
Serial This exposes a tty style serial line interface, usable with Minicom and
similar tools. (There’s no serial console support at this time.) Most Linux
hosts can talk to this using the generic usb-serial driver. The latest versions
of this driver implement the CDC ACM class, as might be implemented by
cell phones or other modems. This driver works with the MS Windows
usbser.sys driver, the Linux cdc-acm driver, and many other USB Host
systems.
The M
x
800 series terminal SDK includes an .inf file and usbser.sys
required by Windows 2000/XP to interface with the USB serial device. On
the M
x
800 series terminal, the application can open COM5 or /dev/ttygser
device. DDL supports application download over serial USB. To enable the
USB Serial driver on the M
x
800 series terminal, use the System Mode
Configure USB display or set the environment variable *USBDEVICE=1.
RNDIS When talking to MS Windows hosts, RNDIS is used. RNDIS is Microsoft’s
analogue of CDC Ethernet, with complex frame capsulation and its own
internal RPC protocol. (Clicking on this link, http://www.microsoft.com/
whdc/device/network/NDIS/usbrndis.mspx
, may help you and a partial
protocol specification is available. For example, some requests from
Windows 2000 and XP are undocumented.) Use the Documentation/
usb/linux.inf file (convert to DOS CRLF format) to install the driver.
The driver is bundled in XP and the URL in linux.inf says where to get
Microsoft’s drivers for older Windows releases. For some step-by-step
instructions with WinXP screenshots, see http://
www.gumstix.org/tikiwiki/tiki-index.php?page=Windows_XP_usbn showing
one way to use that “linux.inf” file. Do not forget to read the comments there,
explaining how to shortcut past some needless complications in those
instructions.