These programs drive USB devices of specific classes via usb(3).
Usually they are started by usbd(4) upon attachment of the device
to the bus. Less often, users start them manually, depending on
usbd(4)'s configuration. Usually, kb and disk are started by usbd
and other programs are started by hand.
Without arguments, the drivers handle all the devices (of the
appropriate USB class) found on the bus. To make a driver handle
only certain devices, supply as arguments the paths for the directories
of the devices (actually of their zero endpoints).
Drivers that provide file systems accept options –s and –m to instruct
them to post a 9P connection at srv(3) with the given name and/or
to mount themselves at mnt. When embedded into usbd these options
may not be used. In this case, the file tree supplied by the device
driver is available through the file system
provided by usbd, usually mounted at /dev and reachable through
the 9P connection posted at /srv/usb.
Options –d and –D present on most drivers trigger debug diagnostics
and file system debugging diagnostics. Repeating any one of these
may increase verbosity.
To help locate devices of interest, probe lists all the USB devices
available, including those with no driver started.|
Keyboards and mice
The following options are understood:
Kb supports USB keyboards and mice either as separate USB devices
or as a single combined USB device. Scan codes from the keyboard
are sent to /dev/kbin to let the kernel process them. Mouse events
are sent to /dev/mousein in the same way.
–a Accelerate the mouse to level n (similar to the kernel mouse
–k Serve just the keyboard (and not the mouse).
–m Serve just the mouse (and not the keyboard).
The storage device directory contains the usual files served by
sd(3): data, raw, and ctl.
The ctl file supplies the device geometry when read.
The script usbfat: mounts the FAT file systems in the DOS partitions
of the named disks; if none, it mounts those file systems found
at /dev/sdU*.*/data. When more than one partition is found, a
suffix is appended to the disk name to identify the partition
number. The script usbeject undoes the effect. If
no argument is given, it unmounts all USB disks. An argument sdUN
unmounts all partitions from disk with USB target N. The script
usbsd uses sdloop(3) to present a USB disk as a sd(3) device and
partition it as per prep(8).
Disk configures and manages USB mass storage devices. It provides
a file system (usually seen at /dev) that includes one directory
per storage device, named sdUN.M in correspondence with the usb
device number and the storage unit number (or LUN). For example,
LUN number 2 on /dev/usb/ep3.0 can be
accessed through /dev/sdU3.2.
Print provides a single file can be written to print on a USB
printer. Options are similar to those of disk. The file is also
bound at /dev/lp as is customary.
Ether provides a file interface similar to that of ether(3) for
each USB Ethernet adapter found. The name of an Ethernet device
is etherUN where N is the device name. When started manually,
the file interface is mounted at /net as is customary.
Serial and JTAG ports
JTAG ports are similar but the files are named jtag and jtagctl.
Serial provides a file system (usually mounted at /dev) that includes
one directory per USB serial port, named eiaUN or eiaUN.M. In
this directory there are two files, eiaU, similar to eiaN in uart(3),
and eiaUctl, which admits writes in the same format as eiaNctl
in uart(3). Reading from eiaUctl gives
the serial port's settings in the same format as eiaNstatus in
uart(3). Options are similar to those of disk.
The –V option (verbose) causes audio to print information about
the device on startup. The –s option specifies a name for a file
descriptor to be posted in /srv. The –v options sets initial volume.
Reading volume or audioctl yields the device's settings. The data
format of volume is compatible with the Soundblaster and produces
output in this format:
Usbaudio configures and manages a USB audio device. It implements
a file system, normally mounted on /dev, but this can be changed
with –m, containing files volume, audioctl, audio, and audioin.
The names volume and audio maintain backward compatibility with
the Soundblaster driver.
This file can be written using the same syntax. The keyword out
may be omitted. Settings are given as percentages of the range,
except for speed which is in Hz.
The file audioctl provides more information, using up to 6 columns
of 12 characters each. From left to right, the fields are: control
name, in or out, current value, minimum value, maximum, and resolution.
There are 3, 5, or 6 columns present. Maxima and resolution are
omitted when they are not available or not
applicable. The resolution for speed is reported as 1 (one) if
the sampling frequency is continuously variable. It is absent
if it is settable at a fixed number of discrete values only.
When all values from audioctl have been read, a zero–length buffer
is returned (the usual end–of–file indication). A new read will
then block until one of the settings changes, then report its
The file audioctl can be written like volume.
Audio data is written to audio and read from audioin. The data
format is little–endian, samples ordered primarily by time and
secondarily by channel. Samples occupy the minimum integral number
of bytes. Read and write operations of arbitrary size are allowed.
audio out 65|
treb out 0
bass out 0
speed out 44100