9srv Manual Collection/plan9/usb(4) | 9srv Manual Collection/plan9/usb(4) |
---|
usb/disk [ -Dd ] [ -m mnt ] [ -s srv ] [ dev ... ]
usbfat: [ disk ... ]
usbeject [ disk ... ]
usb/audio [ -dpV ] [ -m mnt ] [ -s srv ] [ -v vol ] [ dev ]
usb/ether [ -Dd ] [ -m mnt ] [ -s srv ] [ dev ... ]
usb/serial [ -Dd ] [ -m mnt ] [ -s srv ] [ dev ... ]
usb/print [ -d ] [ dev ... ]
usb/ccid [ -d ]
usb/ibuddy [ -Dd ] [ -m mnt ] [ -s srv ] [ dev ... ] usb/probe
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.
The following options are understood:
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. An argument sdUN.M or sdUN.M.P
JTAG ports are similar but the files are named jtag and jtagctl.
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:
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 new value.
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.
The driver takes care of powering the card adequately, based on its ATR, and tunnelling the RPCs through the USB device. Only slot 0 is supported.
When the smartcard disappears, all reads and write fail until the file is reopened and a new ATR is written to it.
Each line describes the status of one feature. Red, blue, and green are the different leds in the head of the toy. Heart represents the red led in the chest of the toy. Wings represents the status of the wings, which can be closed or open. Hips represents the orientation of the toy (left or right, from the figure's point of view).
Lines can be written to the ctl file to command the device. Multiple lines (six at most) can be written at once, with one action per line.
USB ATA storage devices are not supported.
The Ethernet device works only for certain ASIX-based cards and for CDC devices. Both the Ethernet and printer drivers have not been tested and it is likely they will fail.
The serial driver works only for the Prolific chip and Ftdi, and control of the dcd and dsr signals and some of the extra features are unimplemented. For Ftdi, only the Sheevaplug and Guruplug have been tried. There is support for the EHCI debug port, but it loses bytes.
9srv Manual Collection/plan9/usb(4) | Rev: Tue Mar 29 22:46:39 BST 2011 |