2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
5 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH USBFTDI 7D "Apr 13, 2009"
8 usbftdi \- FTDI USB to serial converter driver
12 \fB#include <fcntl.h>\fR
13 \fB#include <sys/termio.h>\fR
20 The \fBusbftdi\fR driver is a loadable STREAMS and USBA (Solaris USB
21 Architecture) compliant client driver that provides basic asynchronous
22 communication support for FTDI USB-to-serial converters. Serial device streams
23 are built with appropriate modules that are pushed atop the \fBusbftdi\fR
24 driver by the \fBautopush\fR(1M) facility.
25 .SS "Application Programming Interface"
28 The \fBusbftdi\fR module supports the \fBtermio\fR(7I) device control functions
29 specified by flags in the \fBc_cflag\fR word of the \fBtermios\fR structure,
30 and by the \fBIGNBRK, IGNPAR, PARMRK\fR, and \fBINPCK\fR flags in the
31 \fBc_iflag\fR word of the \fBtermios\fR structure. All other \fBtermio\fR(7I)
32 functions must be performed by STREAMS modules pushed atop the driver. When a
33 device is opened, the , \fBldterm\fR(7M) and \fBttcompat\fR(7M) STREAMS modules
34 are automatically pushed on top of the stream, providing the standard
35 \fBtermio\fR(7I) interface.
38 Use device logical names \fB/dev/term/[0-9]*\fR to access the serial ports for
39 a dial-in line that is used with a modem.
42 Use device logical names \fB/dev/cua/[0-9]*\fR to access the serial ports for
43 other applications. These names are also used to provide a logical access point
47 Device hot-removal is functionally equivalent to a modem disconnect event, as
48 defined in \fBtermio\fR(7I).
51 Input and output line speeds can be set to the following baud rates: 300, 600,
52 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800 or 921600.
53 Input and output line speeds can not be set independently. For example, when
54 the output speed is set, the input speed is automatically set to the same
56 .SS "Soft Carrier Capabilities"
59 Many devices that use this USB serial interface component are not, in fact
60 dial-in lines connected to carefully configured RS-232 modems. They are often
61 intelligent peripherals whose manufacturers want to present a serial port
62 interface to application software. Some applications use only three wire
63 connections, or are otherwise somewhat casual about the state of the Carrier
64 Detect (electrical) signal, and the other modem control lines.
67 The configuration file delivered with this driver, \fBusbftdi.conf\fR,
68 acknowledges this by setting the driver property \fBignore-cd\fR to 1. This
69 enables \fBsoft carrier\fR mode where the kernel does \fBnot\fR block opens
70 waiting for DCD to be asserted.
73 This behavior also matches the default \fBignore carrier detect\fR behavior of
74 the onboard serial ports of machines that have them. See \fBeeprom\fR(1M) for
78 The \fBhardware carrier\fR behavior (the driver's internal default) can be
79 selected by either unsetting (commenting out) the \fBignore-cd\fR property, or
80 by setting the value of the property to zero.
83 More sophisticated selection of which devicesl ignore or obey the DCD signal
84 can be effected using \fBport-%d-ignore-cd\fR properties.
85 .SS "Dial-In and Dial-Out Support"
88 A related feature is available for traditional usage that enables a single tty
89 line to be connected to a modem and used for incoming and outgoing calls. By
90 accessing through device logical name \fB/dev/cua/[0-9]*\fR, you can open a
91 port without the carrier detect signal being asserted, either through hardware
92 or an equivalent software mechanism. These devices are commonly known as
96 A dial-in line can be opened only if the corresponding dial-out line is closed.
97 A blocking \fB/dev/term\fR open waits until the \fB/dev/cua\fR line is closed,
98 which drops Data Terminal Ready, after which Carrier Detect usually drops as
99 well. When the carrier is detected again with the \fB/dev/cua\fR device
100 remaining closed, this indicates an incoming call and the blocking open seizes
101 exclusive use of the line.
104 A non-blocking \fB/dev/term\fR open returns an error if the \fB/dev/cua\fR
108 If the \fB/dev/term\fR line is opened successfully (usually only when carrier
109 is recognized on the modem, though see \fBSoft Carrier Capabilities\fR section
110 of this manual page), the corresponding \fB/dev/cua\fR line can not be opened.
111 This allows a modem and port to be used for dial-in (enabling the line for
112 login in \fB/etc/inittab\fR) or dial-out (using \fBtip\fR(1) or \fBuucp\fR(1C))
113 when no-one is logged in on the line.
117 An \fBopen()\fR fails under the following conditions:
124 The unit being opened does not exist.
133 The \fB/dev/cua\fR (dial-out) device is being opened while the \fB/dev/term\fR
134 (dial-in device) is open, or the dial-in device is being opened with a no-delay
135 open while the dial-out device is open.
144 The unit has been marked as exclusive-use by another process with a
145 \fBTIOCEXCL\fR \fBioctl()\fR call.
154 USB device I/O error.
161 \fB\fB/usr/kernel/drv/usbftdi\fR\fR
165 32-bit x86 ELF kernel module
171 \fB\fB/usr/kernel/drv/usbftdi.conf\fR\fR
175 Kernel module configuration file
181 \fB\fB/usr/kernel/drv/amd64/usbftdi\fR\fR
185 64-bit x86 ELF kernel module
191 \fB\fB/usr/kernel/drv/sparcv9/usbftdi\fR\fR
195 64-bit SPARC ELF kernel module
201 \fB\fB/dev/cua/[0-9]*\fR\fR
211 \fB\fB/dev/term/[0-9]*\fR\fR
221 See \fBattributes\fR(5) for a description of the following attribute:
229 ATTRIBUTE TYPE ATTRIBUTE VALUE
231 Architecture SPARC, x86, PCI-based systems
237 \fBstrconf\fR(1), \fBtip\fR(1), \fBuucp\fR(1C), \fBautopush\fR(1M),
238 \fBeeprom\fR(1M), \fBioctl\fR(2), \fBopen\fR(2), \fBtermios\fR(3C),
239 \fBusba\fR(7D), \fBtermio\fR(7I), \fBldterm\fR(7M), \fBttcompat\fR(7M),
240 \fBeeprom\fR(1M), \fBattributes\fR(5),
244 In addition to being logged, the following messages might appear on the system
245 console. All messages are formatted in the following manner:
249 Warning: \fIdevice_path\fR usbftdi\fIinstance num\fR): Error Message ...
257 \fB\fBDevice was disconnected while open. Data may have been lost.\fR\fR
261 The device has been hot-removed or powered off while it was open and a possible
262 data transfer was in progress. The job might be aborted.
268 \fB\fBDevice is not identical to the previous one on this port. Please
269 disconnect and reconnect.\fR\fR
273 The device was hot-removed while open. A new device was hot-inserted which is
274 not identical to the original device. Please disconnect the device and
275 reconnect the original device to the same port.
281 \fB\fBDevice has been reconnected, but data may have been lost.\fR\fR
285 The device that was hot-removed from its USB port has been re-inserted again to
286 the same port. It is available for access but data from a previous transfer
293 \fB\fBCannot access \fIdevice\fR. Please reconnect.\fR\fR
297 This device has been disconnected because a device other than the original one
298 has been inserted. The driver informs you of this fact by displaying the name
299 of the original device.
304 The following messages might be logged into the system log. They are formatted
305 in the following manner:
309 \fIdevice_path\fR usbftdi\fIiinstance number\fR): message ...
317 \fB\fBInput overrun.\fR\fR