usb-serial.rst 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. ==========
  2. USB serial
  3. ==========
  4. Introduction
  5. ============
  6. The USB serial driver currently supports a number of different USB to
  7. serial converter products, as well as some devices that use a serial
  8. interface from userspace to talk to the device.
  9. See the individual product section below for specific information about
  10. the different devices.
  11. Configuration
  12. =============
  13. Currently the driver can handle up to 256 different serial interfaces at
  14. one time.
  15. The major number that the driver uses is 188 so to use the driver,
  16. create the following nodes::
  17. mknod /dev/ttyUSB0 c 188 0
  18. mknod /dev/ttyUSB1 c 188 1
  19. mknod /dev/ttyUSB2 c 188 2
  20. mknod /dev/ttyUSB3 c 188 3
  21. .
  22. .
  23. .
  24. mknod /dev/ttyUSB254 c 188 254
  25. mknod /dev/ttyUSB255 c 188 255
  26. When the device is connected and recognized by the driver, the driver
  27. will print to the system log, which node(s) the device has been bound
  28. to.
  29. Specific Devices Supported
  30. ==========================
  31. ConnectTech WhiteHEAT 4 port converter
  32. --------------------------------------
  33. ConnectTech has been very forthcoming with information about their
  34. device, including providing a unit to test with.
  35. The driver is officially supported by Connect Tech Inc.
  36. http://www.connecttech.com
  37. For any questions or problems with this driver, please contact
  38. Connect Tech's Support Department at [email protected]
  39. HandSpring Visor, Palm USB, and Clié USB driver
  40. -----------------------------------------------
  41. This driver works with all HandSpring USB, Palm USB, and Sony Clié USB
  42. devices.
  43. Only when the device tries to connect to the host, will the device show
  44. up to the host as a valid USB device. When this happens, the device is
  45. properly enumerated, assigned a port, and then communication _should_ be
  46. possible. The driver cleans up properly when the device is removed, or
  47. the connection is canceled on the device.
  48. NOTE:
  49. This means that in order to talk to the device, the sync button must be
  50. pressed BEFORE trying to get any program to communicate to the device.
  51. This goes against the current documentation for pilot-xfer and other
  52. packages, but is the only way that it will work due to the hardware
  53. in the device.
  54. When the device is connected, try talking to it on the second port
  55. (this is usually /dev/ttyUSB1 if you do not have any other usb-serial
  56. devices in the system.) The system log should tell you which port is
  57. the port to use for the HotSync transfer. The "Generic" port can be used
  58. for other device communication, such as a PPP link.
  59. For some Sony Clié devices, /dev/ttyUSB0 must be used to talk to the
  60. device. This is true for all OS version 3.5 devices, and most devices
  61. that have had a flash upgrade to a newer version of the OS. See the
  62. kernel system log for information on which is the correct port to use.
  63. If after pressing the sync button, nothing shows up in the system log,
  64. try resetting the device, first a hot reset, and then a cold reset if
  65. necessary. Some devices need this before they can talk to the USB port
  66. properly.
  67. Devices that are not compiled into the kernel can be specified with module
  68. parameters. e.g. modprobe visor vendor=0x54c product=0x66
  69. There is a webpage and mailing lists for this portion of the driver at:
  70. http://sourceforge.net/projects/usbvisor/
  71. For any questions or problems with this driver, please contact Greg
  72. Kroah-Hartman at [email protected]
  73. PocketPC PDA Driver
  74. -------------------
  75. This driver can be used to connect to Compaq iPAQ, HP Jornada, Casio EM500
  76. and other PDAs running Windows CE 3.0 or PocketPC 2002 using a USB
  77. cable/cradle.
  78. Most devices supported by ActiveSync are supported out of the box.
  79. For others, please use module parameters to specify the product and vendor
  80. id. e.g. modprobe ipaq vendor=0x3f0 product=0x1125
  81. The driver presents a serial interface (usually on /dev/ttyUSB0) over
  82. which one may run ppp and establish a TCP/IP link to the PDA. Once this
  83. is done, you can transfer files, backup, download email etc. The most
  84. significant advantage of using USB is speed - I can get 73 to 113
  85. kbytes/sec for download/upload to my iPAQ.
  86. This driver is only one of a set of components required to utilize
  87. the USB connection. Please visit http://synce.sourceforge.net which
  88. contains the necessary packages and a simple step-by-step howto.
  89. Once connected, you can use Win CE programs like ftpView, Pocket Outlook
  90. from the PDA and xcerdisp, synce utilities from the Linux side.
  91. To use Pocket IE, follow the instructions given at
  92. http://www.tekguru.co.uk/EM500/usbtonet.htm to achieve the same thing
  93. on Win98. Omit the proxy server part; Linux is quite capable of forwarding
  94. packets unlike Win98. Another modification is required at least for the
  95. iPAQ - disable autosync by going to the Start/Settings/Connections menu
  96. and unchecking the "Automatically synchronize ..." box. Go to
  97. Start/Programs/Connections, connect the cable and select "usbdial" (or
  98. whatever you named your new USB connection). You should finally wind
  99. up with a "Connected to usbdial" window with status shown as connected.
  100. Now start up PIE and browse away.
  101. If it doesn't work for some reason, load both the usbserial and ipaq module
  102. with the module parameter "debug" set to 1 and examine the system log.
  103. You can also try soft-resetting your PDA before attempting a connection.
  104. Other functionality may be possible depending on your PDA. According to
  105. Wes Cilldhaire <[email protected]>, with the Toshiba E570,
  106. ...if you boot into the bootloader (hold down the power when hitting the
  107. reset button, continuing to hold onto the power until the bootloader screen
  108. is displayed), then put it in the cradle with the ipaq driver loaded, open
  109. a terminal on /dev/ttyUSB0, it gives you a "USB Reflash" terminal, which can
  110. be used to flash the ROM, as well as the microP code.. so much for needing
  111. Toshiba's $350 serial cable for flashing!! :D
  112. NOTE: This has NOT been tested. Use at your own risk.
  113. For any questions or problems with the driver, please contact Ganesh
  114. Varadarajan <[email protected]>
  115. Keyspan PDA Serial Adapter
  116. --------------------------
  117. Single port DB-9 serial adapter, pushed as a PDA adapter for iMacs (mostly
  118. sold in Macintosh catalogs, comes in a translucent white/green dongle).
  119. Fairly simple device. Firmware is homebrew.
  120. This driver also works for the Xircom/Entrega single port serial adapter.
  121. Current status:
  122. Things that work:
  123. - basic input/output (tested with 'cu')
  124. - blocking write when serial line can't keep up
  125. - changing baud rates (up to 115200)
  126. - getting/setting modem control pins (TIOCM{GET,SET,BIS,BIC})
  127. - sending break (although duration looks suspect)
  128. Things that don't:
  129. - device strings (as logged by kernel) have trailing binary garbage
  130. - device ID isn't right, might collide with other Keyspan products
  131. - changing baud rates ought to flush tx/rx to avoid mangled half characters
  132. Big Things on the todo list:
  133. - parity, 7 vs 8 bits per char, 1 or 2 stop bits
  134. - HW flow control
  135. - not all of the standard USB descriptors are handled:
  136. Get_Status, Set_Feature, O_NONBLOCK, select()
  137. For any questions or problems with this driver, please contact Brian
  138. Warner at [email protected]
  139. Keyspan USA-series Serial Adapters
  140. ----------------------------------
  141. Single, Dual and Quad port adapters - driver uses Keyspan supplied
  142. firmware and is being developed with their support.
  143. Current status:
  144. The USA-18X, USA-28X, USA-19, USA-19W and USA-49W are supported and
  145. have been pretty thoroughly tested at various baud rates with 8-N-1
  146. character settings. Other character lengths and parity setups are
  147. presently untested.
  148. The USA-28 isn't yet supported though doing so should be pretty
  149. straightforward. Contact the maintainer if you require this
  150. functionality.
  151. More information is available at:
  152. http://www.carnationsoftware.com/carnation/Keyspan.html
  153. For any questions or problems with this driver, please contact Hugh
  154. Blemings at [email protected]
  155. FTDI Single Port Serial Driver
  156. ------------------------------
  157. This is a single port DB-25 serial adapter.
  158. Devices supported include:
  159. - TripNav TN-200 USB GPS
  160. - Navis Engineering Bureau CH-4711 USB GPS
  161. For any questions or problems with this driver, please contact Bill Ryder.
  162. ZyXEL omni.net lcd plus ISDN TA
  163. -------------------------------
  164. This is an ISDN TA. Please report both successes and troubles to
  165. [email protected]
  166. Cypress M8 CY4601 Family Serial Driver
  167. --------------------------------------
  168. This driver was in most part developed by Neil "koyama" Whelchel. It
  169. has been improved since that previous form to support dynamic serial
  170. line settings and improved line handling. The driver is for the most
  171. part stable and has been tested on an smp machine. (dual p2)
  172. Chipsets supported under CY4601 family:
  173. CY7C63723, CY7C63742, CY7C63743, CY7C64013
  174. Devices supported:
  175. - DeLorme's USB Earthmate GPS (SiRF Star II lp arch)
  176. - Cypress HID->COM RS232 adapter
  177. Note:
  178. Cypress Semiconductor claims no affiliation with the
  179. hid->com device.
  180. Most devices using chipsets under the CY4601 family should
  181. work with the driver. As long as they stay true to the CY4601
  182. usbserial specification.
  183. Technical notes:
  184. The Earthmate starts out at 4800 8N1 by default... the driver will
  185. upon start init to this setting. usbserial core provides the rest
  186. of the termios settings, along with some custom termios so that the
  187. output is in proper format and parsable.
  188. The device can be put into sirf mode by issuing NMEA command::
  189. $PSRF100,<protocol>,<baud>,<databits>,<stopbits>,<parity>*CHECKSUM
  190. $PSRF100,0,9600,8,1,0*0C
  191. It should then be sufficient to change the port termios to match this
  192. to begin communicating.
  193. As far as I can tell it supports pretty much every sirf command as
  194. documented online available with firmware 2.31, with some unknown
  195. message ids.
  196. The hid->com adapter can run at a maximum baud of 115200bps. Please note
  197. that the device has trouble or is incapable of raising line voltage properly.
  198. It will be fine with null modem links, as long as you do not try to link two
  199. together without hacking the adapter to set the line high.
  200. The driver is smp safe. Performance with the driver is rather low when using
  201. it for transferring files. This is being worked on, but I would be willing to
  202. accept patches. An urb queue or packet buffer would likely fit the bill here.
  203. If you have any questions, problems, patches, feature requests, etc. you can
  204. contact me here via email:
  205. [email protected]
  206. (your problems/patches can alternately be submitted to usb-devel)
  207. Digi AccelePort Driver
  208. ----------------------
  209. This driver supports the Digi AccelePort USB 2 and 4 devices, 2 port
  210. (plus a parallel port) and 4 port USB serial converters. The driver
  211. does NOT yet support the Digi AccelePort USB 8.
  212. This driver works under SMP with the usb-uhci driver. It does not
  213. work under SMP with the uhci driver.
  214. The driver is generally working, though we still have a few more ioctls
  215. to implement and final testing and debugging to do. The parallel port
  216. on the USB 2 is supported as a serial to parallel converter; in other
  217. words, it appears as another USB serial port on Linux, even though
  218. physically it is really a parallel port. The Digi Acceleport USB 8
  219. is not yet supported.
  220. Please contact Peter Berger ([email protected]) or Al Borchers
  221. ([email protected]) for questions or problems with this
  222. driver.
  223. Belkin USB Serial Adapter F5U103
  224. --------------------------------
  225. Single port DB-9/PS-2 serial adapter from Belkin with firmware by eTEK Labs.
  226. The Peracom single port serial adapter also works with this driver, as
  227. well as the GoHubs adapter.
  228. Current status:
  229. The following have been tested and work:
  230. - Baud rate 300-230400
  231. - Data bits 5-8
  232. - Stop bits 1-2
  233. - Parity N,E,O,M,S
  234. - Handshake None, Software (XON/XOFF), Hardware (CTSRTS,CTSDTR) [1]_
  235. - Break Set and clear
  236. - Line control Input/Output query and control [2]_
  237. .. [1]
  238. Hardware input flow control is only enabled for firmware
  239. levels above 2.06. Read source code comments describing Belkin
  240. firmware errata. Hardware output flow control is working for all
  241. firmware versions.
  242. .. [2]
  243. Queries of inputs (CTS,DSR,CD,RI) show the last
  244. reported state. Queries of outputs (DTR,RTS) show the last
  245. requested state and may not reflect current state as set by
  246. automatic hardware flow control.
  247. TO DO List:
  248. - Add true modem control line query capability. Currently tracks the
  249. states reported by the interrupt and the states requested.
  250. - Add error reporting back to application for UART error conditions.
  251. - Add support for flush ioctls.
  252. - Add everything else that is missing :)
  253. For any questions or problems with this driver, please contact William
  254. Greathouse at [email protected]
  255. Empeg empeg-car Mark I/II Driver
  256. --------------------------------
  257. This is an experimental driver to provide connectivity support for the
  258. client synchronization tools for an Empeg empeg-car mp3 player.
  259. Tips:
  260. * Don't forget to create the device nodes for ttyUSB{0,1,2,...}
  261. * modprobe empeg (modprobe is your friend)
  262. * emptool --usb /dev/ttyUSB0 (or whatever you named your device node)
  263. For any questions or problems with this driver, please contact Gary
  264. Brubaker at [email protected]
  265. MCT USB Single Port Serial Adapter U232
  266. ---------------------------------------
  267. This driver is for the MCT USB-RS232 Converter (25 pin, Model No.
  268. U232-P25) from Magic Control Technology Corp. (there is also a 9 pin
  269. Model No. U232-P9). More information about this device can be found at
  270. the manufacturer's web-site: http://www.mct.com.tw.
  271. The driver is generally working, though it still needs some more testing.
  272. It is derived from the Belkin USB Serial Adapter F5U103 driver and its
  273. TODO list is valid for this driver as well.
  274. This driver has also been found to work for other products, which have
  275. the same Vendor ID but different Product IDs. Sitecom's U232-P25 serial
  276. converter uses Product ID 0x230 and Vendor ID 0x711 and works with this
  277. driver. Also, D-Link's DU-H3SP USB BAY also works with this driver.
  278. For any questions or problems with this driver, please contact Wolfgang
  279. Grandegger at [email protected]
  280. Inside Out Networks Edgeport Driver
  281. -----------------------------------
  282. This driver supports all devices made by Inside Out Networks, specifically
  283. the following models:
  284. - Edgeport/4
  285. - Rapidport/4
  286. - Edgeport/4t
  287. - Edgeport/2
  288. - Edgeport/4i
  289. - Edgeport/2i
  290. - Edgeport/421
  291. - Edgeport/21
  292. - Edgeport/8
  293. - Edgeport/8 Dual
  294. - Edgeport/2D8
  295. - Edgeport/4D8
  296. - Edgeport/8i
  297. - Edgeport/2 DIN
  298. - Edgeport/4 DIN
  299. - Edgeport/16 Dual
  300. For any questions or problems with this driver, please contact Greg
  301. Kroah-Hartman at [email protected]
  302. REINER SCT cyberJack pinpad/e-com USB chipcard reader
  303. -----------------------------------------------------
  304. Interface to ISO 7816 compatible contactbased chipcards, e.g. GSM SIMs.
  305. Current status:
  306. This is the kernel part of the driver for this USB card reader.
  307. There is also a user part for a CT-API driver available. A site
  308. for downloading is TBA. For now, you can request it from the
  309. maintainer ([email protected]).
  310. For any questions or problems with this driver, please contact
  311. [email protected]
  312. Prolific PL2303 Driver
  313. ----------------------
  314. This driver supports any device that has the PL2303 chip from Prolific
  315. in it. This includes a number of single port USB to serial converters,
  316. more than 70% of USB GPS devices (in 2010), and some USB UPSes. Devices
  317. from Aten (the UC-232) and IO-Data work with this driver, as does
  318. the DCU-11 mobile-phone cable.
  319. For any questions or problems with this driver, please contact Greg
  320. Kroah-Hartman at [email protected]
  321. KL5KUSB105 chipset / PalmConnect USB single-port adapter
  322. --------------------------------------------------------
  323. Current status:
  324. The driver was put together by looking at the usb bus transactions
  325. done by Palm's driver under Windows, so a lot of functionality is
  326. still missing. Notably, serial ioctls are sometimes faked or not yet
  327. implemented. Support for finding out about DSR and CTS line status is
  328. however implemented (though not nicely), so your favorite autopilot(1)
  329. and pilot-manager -daemon calls will work. Baud rates up to 115200
  330. are supported, but handshaking (software or hardware) is not, which is
  331. why it is wise to cut down on the rate used is wise for large
  332. transfers until this is settled.
  333. See http://www.uuhaus.de/linux/palmconnect.html for up-to-date
  334. information on this driver.
  335. Winchiphead CH341 Driver
  336. ------------------------
  337. This driver is for the Winchiphead CH341 USB-RS232 Converter. This chip
  338. also implements an IEEE 1284 parallel port, I2C and SPI, but that is not
  339. supported by the driver. The protocol was analyzed from the behaviour
  340. of the Windows driver, no datasheet is available at present.
  341. The manufacturer's website: http://www.winchiphead.com/.
  342. For any questions or problems with this driver, please contact
  343. [email protected].
  344. Moschip MCS7720, MCS7715 driver
  345. -------------------------------
  346. These chips are present in devices sold by various manufacturers, such as Syba
  347. and Cables Unlimited. There may be others. The 7720 provides two serial
  348. ports, and the 7715 provides one serial and one standard PC parallel port.
  349. Support for the 7715's parallel port is enabled by a separate option, which
  350. will not appear unless parallel port support is first enabled at the top-level
  351. of the Device Drivers config menu. Currently only compatibility mode is
  352. supported on the parallel port (no ECP/EPP).
  353. TODO:
  354. - Implement ECP/EPP modes for the parallel port.
  355. - Baud rates higher than 115200 are currently broken.
  356. - Devices with a single serial port based on the Moschip MCS7703 may work
  357. with this driver with a simple addition to the usb_device_id table. I
  358. don't have one of these devices, so I can't say for sure.
  359. Generic Serial driver
  360. ---------------------
  361. If your device is not one of the above listed devices, compatible with
  362. the above models, you can try out the "generic" interface. This
  363. interface does not provide any type of control messages sent to the
  364. device, and does not support any kind of device flow control. All that
  365. is required of your device is that it has at least one bulk in endpoint,
  366. or one bulk out endpoint.
  367. To enable the generic driver to recognize your device, provide::
  368. echo <vid> <pid> >/sys/bus/usb-serial/drivers/generic/new_id
  369. where the <vid> and <pid> is replaced with the hex representation of your
  370. device's vendor id and product id.
  371. If the driver is compiled as a module you can also provide one id when
  372. loading the module::
  373. insmod usbserial vendor=0x#### product=0x####
  374. This driver has been successfully used to connect to the NetChip USB
  375. development board, providing a way to develop USB firmware without
  376. having to write a custom driver.
  377. For any questions or problems with this driver, please contact Greg
  378. Kroah-Hartman at [email protected]
  379. Contact
  380. =======
  381. If anyone has any problems using these drivers, with any of the above
  382. specified products, please contact the specific driver's author listed
  383. above, or join the Linux-USB mailing list (information on joining the
  384. mailing list, as well as a link to its searchable archive is at
  385. http://www.linux-usb.org/ )
  386. Greg Kroah-Hartman
  387. [email protected]