]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/nusb
nusb(4): fix spelling
[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 (which 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 which 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 rndis ,
168 .BR smsc ,
169 .BR a88772
170 or
171 .BR a88178
172 (see
173 .IR nusbrc (8)).
174 On devices that support it, the mac address can be set using
175 the
176 .B -a
177 .IR addr
178 option.
179 .SS Serial and JTAG ports
180 .I Serial
181 provides a file system (usually seen under
182 .BR /dev )
183 that includes one directory per USB serial port, named
184 .BI eiaU N
185 or
186 .BI eiaU N . M.
187 In this directory there are two files,
188 .BR eiaU ,
189 similar to
190 .BI eia N
191 in
192 .IR uart (3),
193 and
194 .BR eiaUctl ,
195 which admits writes in the same format as
196 .BI eia N ctl
197 in
198 .IR uart (3).
199 Reading from
200 .B eiaUctl
201 gives the serial port's settings in the same format as
202 .BI eia N status
203 in
204 .IR uart (3).
205 Options are similar to those of
206 .IR disk .
207 .PP
208 JTAG ports are similar
209 but the files are named
210 .B jtag
211 and
212 .BR jtagctl .
213 .
214 .SS Audio devices
215 .I Audio
216 configures and manages a USB audio device.
217 It implements a file system, (normally seen under
218 .BI /dev )
219 compatible to
220 .IR audio (3).
221 .SH SOURCE
222 .B /sys/src/cmd/nusb
223 .SH "SEE ALSO"
224 .IR audio (3),
225 .IR ether (3),
226 .IR mouse (3),
227 .IR sd (3),
228 .IR uart (3),
229 .IR usb (3),
230 .IR shr (3),
231 .IR nusbrc (8),
232 .IR kbdfs (8)
233 .SH BUGS
234 The various device drivers are generic USB drivers and
235 may work only for certain devices of each class.
236 .PP
237 USB ATA storage devices are not supported.
238 .PP
239 The serial driver works only for the Prolific chip and Ftdi,
240 and control of the
241 .B dcd
242 and
243 .B dsr
244 signals and some of the extra features are not implemented.
245 For Ftdi, only the Sheevaplug and Guruplug have been tried.
246 There is support for the EHCI debug port, but it loses bytes.