Universal Serial Bus (USB)
is a low-cost, hot-pluggable device bus
that is supported by most modern motherboards and
is also available through add-in cards.
Any device that conforms to the protocol defined in the
USB Specification should work with this implementation.
Devices using proprietary protocols will not.
If you have, for example, a USB touch tablet that presents itself as
a conforming Human Interface Device, there is an excellent chance
that it can be configured and will work like a USB mouse.
The USB interface is implemented
via the Uniform Driver Interface (UDI).
Three USB Host Controller Interfaces (HCI) exist
and are supported by this implementation:
HCI name
USB standard
Speed
Universal Host Controller Interface (UHCI)
USB 1.1
12Mbps
Open Host Controller Interface (OHCI)
USB 1.1
12Mbps
Enhanced Host Controller Interface (EHCI)
USB 2.0
480Mbps
USB 1.1 devices are typically low-cost, low-bandwidth units.
USB 2.0 offers speeds up to 480 megabits per second,
which is comparable to mid-range IDE and SCSI bus speeds.
USB hubs and USB devices
(such as mice, keyboards, and mass storage devices)
may be plugged into the host.
A maximum of 128 devices may be nested up to 8 layers deep
using combinations of hubs and devices.
USB devices may be attached before
or after the host computer starts;
devices may be unplugged from the bus while the computer is running.
Mouse and keyboard devices send very little data
across the USB bus.
Other devices, such as mass storage, use bulk transfer mode
to move data blocks over the bus,
but the data rates achieved are typically less
than SCSI or IDE bus devices.
USB is an effective mechanism for adding devices to a host
that does not already have that functionality,
such as adding a mouse or trackball to a laptop
or adding supplementary storage such as a Zip® or CD-ROM drive.
USB can be used for hard disk storage
when top performance is not required.
Note the following when using these supported USB device types:
Hubs
Powered hubs are recommended over unpowered hubs.
Keyboards
USB keyboards work like AT and PS/2 keyboards.
The simultaneous use of multiple USB keyboards,
along with one AT or PS/2 keyboard, is supported.
LEDs and shift states are synchronized across
all keyboards physically attached to a system.
If you press the <Caps Lock> key on one keyboard,
the Caps Lock state (including the LEDs)
is active on all keyboards.
If you hot-add a USB keyboard,
it ``adopts'' the current LED and shift state.
Mice
USB mice work like keyboard mice
(also known as PS/2 mice).
Any USB Human Interface Device that is a pointing
device should work with the USB mouse driver.
Scrolling wheels are supported.
Three button mice are supported.
Additional buttons are ignored by the X server.
You can have more than one USB mouse attached
to the system at the same time.
However, all USB mice are channeled
through a single event channel.
It is not possible to separately associate one
USB mouse with one terminal and
another USB mouse with a different terminal.
Having multiple USB mice might be useful
if one of the devices is a joystick, graphics tablet,
touchscreen, or other pointing device.
For multiple mice, the inputs are effectively connected together.
It is possible, for example, to move the pointer with one USB mouse
and click a mouse button on a different mouse;
both operations are accepted as if they came from the same mouse.
If you have identical mice and you move them in
opposite directions at exactly the same speed,
the mouse pointer remains still.
Printers
Multiple printers can be used on a system.
Printers can be attached and removed from the
USB bus at any time.
In order for a printer to be supported, there must
be a user-level driver/filter specific to that printer available.
CD-ROM/DVD-ROM drives and CD/DVD writers
Multiple CD-ROM and DVD-ROM drives and writers
can be used on a system.
Removing an attached CD-ROM or DVD-ROM drive
(especially one that is mounted) may trigger a problem
elsewhere in the system.
Devices that support software media lock are locked
while they are in use by the operating system.
Devices with mechanical media releases
(for example, a CD-ROM drive with a hinged door instead of a tray)
cannot be locked.
Ejecting the media while the device is in use by the operating system
can cause data corruption or a system panic.
Tape drives
USB 2.0-conforming tape drives are supported.
Hardware
Root hub
The ``root hub'' refers to the USB ports configured
on the motherboard. Many systems allow built-in USB ports
to be disabled in BIOS setup. If USB is
not working, check that it is enabled in the BIOS.
Alternatively, if you do not wish to use USB,
you may want to disable it in the BIOS setup
since many motherboards use two to three interrupts
for USB HCIs.
Connectivity options
The root hub ports may be used for either a USB device
or a USB hub. Any combination of hubs and devices may be
connected, up to the maximum device limit and
the hub depth -- 128 devices nested 8 layers deep.
USB device configuration
In general, to connect a USB device, do the following:
As root, enter:
# usbprobe
This displays all currently connected USB devices.
Each line lists the USB device path, the device number on the bus, the
device type, and a device description.
Connect the USB device to a USB port on the system, or to a
port on a USB hub connected to the system.
No configuration should be necessary; auto-configuration has been
observed to fail in some cases.
If device nodes do not appear when the tape device is connected,
run sdimkdev -sfui to configure the device.
USB device IDs
When you attach a USB mass storage device,
the system assigns the device a USB device ID.
(USB device IDs are only assigned
to USB storage devices, not to non-storage
devices like mice and keyboards.)
USB device IDs are determined by the order
in which the system detects each device.
However, the enumeration of devices depends
on several factors and different circumstances
may result in different device ID assignments
on the same machine.
For example, devices that you attach to a running system are
enumerated in the order that you plug them in.
At boot time, however, the entire USB hub/device tree
is traversed and devices may be detected in
a different order, resulting in different device ID
assignments. In general, these guidelines apply:
if you attach all of your USB storage devices
while the system is turned off,
the enumeration order when the computer is
started will likely persist between system reboots.
if you hot-add or hot-remove USB storage devices,
device IDs may change when the system is rebooted.
if you add, remove, or change the order of
USB storage devices on a non-running system that
previously contained USB storage devices,
device IDs may be different when the system
is rebooted.
Device drivers in the USB protocol stack
HCI drivers
Controls I/O to the various USB host controllers
found on motherboards and add-in cards.
The HCI drivers include:
Host Controller UDI meta-language
Communications interface between the USB stack
and the HCI drivers.
usbd
USB stack manager
Communications interface between the USB stack
and the HCI drivers.
This driver maintains an internal representation
of the ``tree'' of USB hubs and devices,
and attaches/detaches device descriptors to corresponding
USB class drivers as USB
peripherals are added/removed.
usbdutil
USB stack utilities library
Utility functions used by usbd.
opnusbdi
OpenUSBDI UDI meta-language
USB ``tree'' management functions used by usbd.
usb_hub
Hub (USB class driver)
Class driver for managing USB hubs.
usb_prnt
Printer (USB class driver)
Class driver for managing USB printers.
usb_msto
Mass storage (USB class driver)
The pseudo Host Bust Adapter driver:
usb_hid
Human Interface Device (USB class driver)
Class driver for talking to Human Interface Devices
(mice, keyboards, and so forth.)
udihidpr
Human Interface Device parser library
Functions for decoding messages from HID devices.
udi_hid
Human Interface Device UDI meta-language
Functions for controlling HID devices.
udiMkb
SCO OpenServer keyboard mapper
Connects HID keyboard type devices
to the SCO OpenServer console driver.
udiMmse
SCO OpenServer mouse mapper
Connects HID ``pointing device'' type devices
to the SCO OpenServer event driver.
usbprobe
USB probe tool
Displays connected devices on all USB busses.
Files
/dev/usb*
USB device nodes
/usr/lib/event/*
device files for mice
Notes
USB keyboards do not work with kdb.
You must use a serial console or a PS/2 keyboard for kernel debugging.
Compatibility
Users of the USB implementation in earlier releases should note the
following:
USB device names
In the previous USB subsystem, device nodes were created under
/dev/usb or /etc/usb when a USB device was connected.
In the new USB subsystem, device nodes are created under
/dev.
Use usbprobe to list currently connected USB devices.
USB floppy device names
USB floppy drives no longer use the /dev/fdXX device names
that were used in previous releases, and that are still used for
ISA floppy drives.
USB floppy drives now use device nodes in the style of hard disk drive
device nodes (e.g. /dev/rhdXX, /dev/hdXX, and
so forth).
Use usbprobe to list currently connected USB devices.