Lines Matching +full:usb +full:- +full:to +full:- +full:serial

2 Linux Gadget Serial Driver v2.0
7 (updated 8-May-2008 for v2.3)
11 ----------------------
23 License along with this program; if not, write to the Free
25 MA 02111-1307 USA.
27 This document and the gadget serial driver itself are
35 -------------
36 Versions of the gadget serial driver are available for the
38 version 2.3 or later of the gadget serial driver in a 2.6
42 Windows and know how to configure and build Linux kernels, run
44 USB and serial devices. It also assumes you configure the Linux
45 gadget and usb drivers as modules.
49 sysfs in /sys, and use "mdev" (in Busybox) or "udev" to make the
55 --------
56 The gadget serial driver is a Linux USB gadget driver, a USB device
57 side driver. It runs on a Linux system that has USB device side
59 with a USB development card.
61 The gadget serial driver talks over USB to either a CDC ACM driver
62 or a generic USB serial driver running on a host PC::
65 --------------------------------------
66 | Host-Side CDC ACM USB Host |
67 | Operating | or | Controller | USB
68 | System | Generic USB | Driver |--------
69 | (Linux or | Serial | and | |
70 | Windows) Driver USB Stack | |
71 -------------------------------------- |
76 -------------------------------------- |
77 | Gadget USB Periph. | |
78 | Device-Side | Gadget | Controller | |
79 | Linux | Serial | Driver |--------
81 | System USB Stack |
82 --------------------------------------
84 On the device-side Linux system, the gadget serial driver looks
85 like a serial device.
87 On the host-side system, the gadget serial device looks like a
90 to other serial devices.
93 or any driver that can talk to a device with a simple bulk in/out
94 interface. Gadget serial has been tested with the Linux ACM driver,
95 the Windows usbser.sys ACM driver, and the Linux USB generic serial
98 With the gadget serial driver and the host side ACM or generic
99 serial driver running, you should be able to communicate between
101 serial cable.
103 The gadget serial driver only provides simple unreliable data
105 features of normal serial devices.
108 Installing the Gadget Serial Driver
109 -----------------------------------
110 To use the gadget serial driver you must configure the Linux gadget
111 side kernel for "Support for USB Gadgets", for a "USB Peripheral
112 Controller" (for example, net2280), and for the "Serial Gadget"
113 driver. All this are listed under "USB Gadget Support" when
117 Then you must load the gadget serial driver. To load it as an
122 To load it as a vendor specific bulk in/out device, do this::
128 side Linux system. You can add this to the start up scripts, if
131 Your system should use mdev (from busybox) or udev to make the
135 # ls -l /dev/ttyGS0 | cat
136 crw-rw---- 1 root root 253, 0 May 8 14:10 /dev/ttyGS0
139 Note that the major number (253, above) is system-specific. If
140 you need to create /dev nodes by hand, the right numbers to use
144 you may want to set up an /etc/inittab entry to run "getty" on it.
145 The /dev/ttyGS0 line should work like most any other serial port.
148 If gadget serial is loaded as an ACM device you will want to use
150 serial is loaded as a bulk in/out device, you will want to use the
151 Linux generic serial driver on the host side. Follow the appropriate
152 instructions below to install the host side driver.
156 --------------------------------------
157 To use the Windows ACM driver you must have the "linux-cdc-acm.inf"
161 When the gadget serial driver is loaded and the USB device connected
162 to the Windows host with a USB cable, Windows should recognize the
163 gadget serial device and ask for a driver. Tell Windows to find the
164 driver in the folder that contains the "linux-cdc-acm.inf" file.
166 For example, on Windows XP, when the gadget serial device is first
170 path or browse to the folder containing the "linux-cdc-acm.inf" file.
171 Windows will complain that the Gadget Serial driver has not passed
177 should see "Gadget Serial" listed as the driver for one of the COM
180 To uninstall the Windows XP driver for "Gadget Serial", right click
181 on the "Gadget Serial" entry in the "Device Manager" and select
186 ------------------------------------
187 To use the Linux ACM driver you must configure the Linux host side
188 kernel for "Support for Host-side USB" and for "USB Modem (CDC ACM)
191 Once the gadget serial driver is loaded and the USB device connected
192 to the Linux host with a USB cable, the host system should recognize
193 the gadget serial device. For example, the command::
195 cat /sys/kernel/debug/usb/devices
203 S: Product=Gadget Serial
217 Installing the Linux Host Generic USB Serial Driver
218 ---------------------------------------------------
219 To use the Linux generic USB serial driver you must configure the
220 Linux host side kernel for "Support for Host-side USB", for "USB
221 Serial Converter support", and for the "USB Generic Serial Driver".
223 Once the gadget serial driver is loaded and the USB device connected
224 to the Linux host with a USB cable, the host system should recognize
225 the gadget serial device. For example, the command::
227 cat /sys/kernel/debug/usb/devices
235 S: Product=Gadget Serial
238 I: If#= 0 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=serial
243 to configure it to recognize the gadget serial device, like this::
245 echo 0x0525 0xA4A6 >/sys/bus/usb-serial/drivers/generic/new_id
247 The legacy way is to use module parameters::
252 system log saying something like "Gadget Serial converter now
253 attached to ttyUSB0".
257 -------------------------------------
258 Once the gadget serial driver and the host driver are both installed,
259 and a USB cable connects the gadget device to the host, you should
260 be able to communicate over USB between the gadget and host systems.
261 You can use minicom or HyperTerminal to try this out.
263 On the gadget side run "minicom -s" to configure a new minicom
264 session. Under "Serial port setup" set "/dev/ttygserial" as the
265 "Serial Device". Set baud rate, data bits, parity, and stop bits,
266 to 9600, 8, none, and 1--these settings mostly do not matter.
270 but use "/dev/ttyACM0" as the "Serial Device". (If you have other
273 On a Linux host running the USB generic serial driver, configure
274 minicom similarly, but use "/dev/ttyUSB0" as the "Serial Device".
275 (If you have other USB serial devices connected, change the device
278 On a Windows host configure a new HyperTerminal session to use the
279 COM port assigned to Gadget Serial. The "Port Settings" will be
280 set automatically when HyperTerminal connects to the gadget serial
281 device, so you can leave them set to the default values--these
286 you should be able to send data back and forth between the gadget