From: esr@thyrsus.com (Eric S. Raymond)
To: thumbgps-devel@lists.bufferbloat.net
Subject: [Thumbgps-devel] USB handshake signals and Linux
Date: Wed, 14 Mar 2012 06:49:20 -0400 (EDT) [thread overview]
Message-ID: <20120314104920.697EA40617@snark.thyrsus.com> (raw)
Since the Plane Jane design concept depends on the host system being
able to see USB events corresponding to serial handshaking state
changes, I went looking for information on which handshake signals
from which serial-to-USB adapters actually propagate these signals
through. I focused on Linux becase that's the kernel for the
bufferbloat deployment.
My list of adapters is taken from the gpsd udev rules file. This
enumerates all the USB-to-serial chips we've observed in the wild
since 2005. Note that the PL2303 is by far the most common, with
15 of 20 device types for which we know the USB chip using
it. Weighted by device volume the PL2303's share would be far higher.
PL2303: From source/linux/drivers/usb/serial/pl2303.c in 2.6.11.8,
there are defines UART_DCD, UART_RING, UART_CTS and UART_DSR and code
to implement looking at these signals in the TIOCMGET and TIOCMIWAIT
ioctl handlers. A bug fix for TIOCMIWAIT was merged in 2006.
FTDI SIO: (8U232AM / FT232): There is a comment in the kernel source
file drivers/usb/serial/ftdi_sio.c from 2.6, in the implementation of
TIOCMIWAIT, that specifically says "Wait for any of the 4 modem inputs
(DCD,RI,DSR,CTS) to change". I found no bug reports or fixes relating
to this feature.
Cypress M8/CY7C64013: Like the FTDI; TIOCMIWAIT is implemented for
all four handshake lines. I found no bugs relating to this feature.
Cygnal Integrated Products, Inc. CP210x: Like the FTDI and Cypress M8;
TIOCMIWAIT is implemented for all four handshake lines. The code was
reworked in 2010.
Note: there is a known TIOCMIWAIT bug in the *device-independent* part
of the serial-device layer: speed or other serial-parameter changes
during a TIOCMIWAIT call will hang it. GPSD has had to work around
this.
Conclusion: if we can get 1PPS to the input side of any of these
adapters, the Linux host will be able to see it.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Rifles, muskets, long-bows and hand-grenades are inherently democratic
weapons. A complex weapon makes the strong stronger, while a simple
weapon -- so long as there is no answer to it -- gives claws to the
weak.
-- George Orwell, "You and the Atom Bomb", 1945
next reply other threads:[~2012-03-14 10:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 10:49 Eric S. Raymond [this message]
2012-03-14 12:55 ` Ron Frazier (NTP)
2012-03-14 12:58 ` Ron Frazier (NTP)
2012-03-14 18:13 ` Patrick Maupin
2012-03-14 18:42 ` Eric S. Raymond
2012-03-14 18:57 ` Dave Taht
2012-03-14 20:09 ` Patrick Maupin
2012-03-15 3:33 ` Patrick Maupin
2012-03-15 4:23 ` Eric S. Raymond
[not found] <CAFv7OigTLhw24i+jRshv0YgLogyx_GEREAOkP7tieeH1Nr5WzA@mail.gmail.com>
2012-03-15 14:37 ` tz
2012-03-15 14:52 ` Ron Frazier (NTP)
2012-03-15 17:57 ` Eric S. Raymond
2012-03-15 18:31 ` Eric S. Raymond
2012-03-15 18:54 ` Patrick Maupin
2012-03-15 19:36 ` Eric S. Raymond
2012-03-15 19:55 ` Patrick Maupin
2012-03-15 19:14 ` tz
2012-03-15 19:50 ` Eric S. Raymond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120314104920.697EA40617@snark.thyrsus.com \
--to=esr@thyrsus.com \
--cc=thumbgps-devel@lists.bufferbloat.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox