]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/nusb
audio(1), hget(1), nusb(4), page(1): fix spelling, typos
[plan9front.git] / sys / man / 4 / nusb
1 .TH NUSB 4
2 .SH NAME
3 audio,
4 disk,
5 ether,
6 kb,
7 serial,
8 ptp,
9 usbd - Universal Serial Bus drivers
10 .SH SYNOPSIS
11 .B nusb/audio
12 .I devid
13 .PP
14 .B nusb/disk
15 [
16 .B -d
17 ]
18 .I devid
19 .PP
20 .B nusb/ether
21 [
22 .B -dD
23 ] [
24 .B -t
25 .I ethertype
26 ] [
27 .B -a
28 .I addr
29 ]
30 .I devid
31 .PP
32 .B nusb/kb
33 [
34 .B -d
35 ]
36 .I devid
37 .PP
38 .B nusb/serial
39 [
40 .B -d
41 ]
42 .I devid
43 .PP
44 .B nusb/ptp
45 [
46 .B -dD
47 ]
48 .I devid
49 .PP
50 .B nusb/usbd
51 [
52 .B -dD
53 ]
54 .SH DESCRIPTION
55 These programs drive USB devices of specific classes via
56 .IR usb (3).
57 Usually they are started by
58 .IR nusbrc (8)
59 upon attachment of the device to the bus. All drivers except
60 .I usbd
61 take the decimal usb 
62 .I devid
63 of the device they should handle as ther last argument. A
64 driver's instance handles only one device at a time.
65 .PP
66 Drivers that provide file systems make them available as shares under
67 .B /shr
68 (see
69 .IR shr (3))
70 or
71 .BR /shr/usb
72 (wich is bound after
73 .BR /dev
74 by
75 .IR nusbrc (8)). 
76 .PP
77 Options
78 .B \-d
79 and
80 .B \-D
81 trigger debug diagnostics and file system debugging
82 diagnostics for most drivers. Repeating any one of these may
83 increase verbosity.
84 .SS Hubs
85 .I Usbd
86 enumerates the tree of USB hubs and configures the device on
87 attachment. It provides a filesystem with the the file
88 .B usbevent
89 (usually seen as
90 .BR /dev/usbevent )
91 which, when read, returns a 5 column, space separated line of
92 text, one for each event. The columns are:
93 .B attach
94 or
95 .B detach
96 .I devid
97 .I vid
98 .I did
99 and
100 .I csp .
101 All but
102 .I devid
103 are formatted as 4 digit hexadecimal. This file is read by
104 .IR nusbrc (8)
105 and the
106 .I devid
107 is passed to a suitable driver.
108 .SS Keyboards and mice
109 .I Kb
110 supports USB keyboards and mice either as separate USB devices
111 or as a single combined USB device.
112 Scan codes from the keyboard are sent to
113 .B /dev/kbin
114 to let
115 .IR kbdfs (8)
116 process them.
117 Mouse events are sent to
118 .BR /dev/mousein
119 in the same way.
120 .SS Disks
121 .I Disk
122 configures and manages USB mass storage devices. It
123 provides a file system (usually seen under
124 .BR /dev )
125 that includes one directory per storage device, named
126 .BI sdU N . M
127 in correspondence with the usb device number and the storage
128 unit number (or LUN).
129 For example, LUN number 2 on
130 .B /dev/usb/ep3.0
131 can be accessed through
132 .BR /dev/sdU3.2 .
133 .PP
134 The storage device directory contains the usual files
135 served by
136 .IR sd (3):
137 .BR data ,
138 .BR raw ,
139 and
140 .BR ctl .
141 .PP
142 The
143 .B ctl
144 file supplies the device geometry and partitions when read.
145 .SS Ethernet
146 .I Ether
147 handles USB ethernet devices. The file system provided is
148 compatible to
149 .IR ether (3)
150 and added to the share
151 .B usbnet
152 (see
153 .IR shr (3))
154 wich is bound after
155 .B /net
156 by
157 .IR nusbrc (8)
158 so the device will appear as
159 .BI /net/etherU N .
160 Without specifying the
161 .B -t
162 option, the device is assumed to be a CDC compliant ethernet
163 communication device. Other devices might require setting an
164 explicit
165 .IR ethertype
166 such as
167 .BR smsc ,
168 .B a88772
169 or
170 .B a88178
171 see
172 .IR nusbrc (8).
173 On devices that support it, the mac address can be set using
174 the
175 .B -a
176 .IR addr
177 option.
178 .SS Serial and JTAG ports
179 .I Serial
180 provides a file system (usually seen under
181 .BR /dev )
182 that includes one directory per USB serial port, named
183 .BI eiaU N
184 or
185 .BI eiaU N . M.
186 In this directory there are two files,
187 .BR eiaU ,
188 similar to
189 .BI eia N
190 in
191 .IR uart (3),
192 and
193 .BR eiaUctl ,
194 which admits writes in the same format as
195 .BI eia N ctl
196 in
197 .IR uart (3).
198 Reading from
199 .B eiaUctl
200 gives the serial port's settings in the same format as
201 .BI eia N status
202 in
203 .IR uart (3).
204 Options are similar to those of
205 .IR disk .
206 .PP
207 JTAG ports are similar
208 but the files are named
209 .B jtag
210 and
211 .BR jtagctl .
212 .
213 .SS Audio devices
214 .I Audio
215 configures and manages a USB audio device.
216 It implements a file system, (normally seen under
217 .BI /dev )
218 compatible to
219 .IR audio (3).
220 .SH SOURCE
221 .B /sys/src/cmd/nusb
222 .SH "SEE ALSO"
223 .IR audio (3),
224 .IR ether (3),
225 .IR mouse (3),
226 .IR sd (3),
227 .IR uart (3),
228 .IR usb (3),
229 .IR shr (3),
230 .IR nusbrc (8),
231 .IR kbdfs (8)
232 .SH BUGS
233 The various device drivers are generic USB drivers and
234 may work only for certain devices of each class.
235 .PP
236 USB ATA storage devices are not supported.
237 .PP
238 The serial driver works only for the Prolific chip and Ftdi,
239 and control of the
240 .B dcd
241 and
242 .B dsr
243 signals and some of the extra features are not implemented.
244 For Ftdi, only the Sheevaplug and Guruplug have been tried.
245 There is support for the EHCI debug port, but it loses bytes.