From: "Eric S. Raymond" <esr@thyrsus.com>
To: Dave Hart <davehart_gmail_exchange_tee@davehart.net>
Cc: thumbgps-devel@lists.bufferbloat.net
Subject: Re: [Thumbgps-devel] Article -- Macx-1: GPS receiver with standard USB connector and PPS support
Date: Thu, 10 May 2012 02:31:25 -0400 [thread overview]
Message-ID: <20120510063125.GC12435@thyrsus.com> (raw)
In-Reply-To: <CAMbSiYBhODK1HunqMAhPpEH5FwMrpRK-9Wqv_oRkPkV+P+3=Lw@mail.gmail.com>
Dave Hart <davehart_gmail_exchange_tee@davehart.net>:
> While I appreciate GPSD's flexibility, I advise against exercising it
> needlessly. All of the PPSAPI implementations which support serial
> port control line input that I'm aware of want to see it on the
> carrier detect line. If you know you'll only ever care about using
> the hardware with GPSD, any control line will do for PPS, but to use
> it directly with ntpd, the PPSAPI implementations dictate using the
> DCD line.
>
> I had a vague recollection GPSD could use PPSAPI where it's available.
> If that's true, when GPSD is using PPSAPI, isn't it restricted to
> using carrier detect in practice?
Which line the PPS arrives on is a hardware feature of the GPS completely
decoupled from anything PPSAPI has any control over.
There's no code-complexity cost for being flexible. Here's what the
code looks like:
#define PPS_LINE_TIOC (TIOCM_CD|TIOCM_CAR|TIOCM_RI|TIOCM_CTS)
/*
* Wait for status change on any handshake line. The only assumption here
* is that no GPS lights up more than one of these pins. By waiting on
* all of them we remove a configuration switch.
*/
while (1) {
int ok = 0;
char *log = NULL;
char *log1 = NULL;
if (ioctl(session->gpsdata.gps_fd, TIOCMIWAIT, PPS_LINE_TIOC) != 0) {
gpsd_report(LOG_ERROR, "PPS ioctl(TIOCMIWAIT) failed: %d %.40s\n"
, errno, strerror(errno));
break;
}
That definition of PPS_LINE_TIOC is quite literally the only place in
GPSD where the identity of the PPS pin matters. It used to not include
TIOCM_CTS, but we got a bug report from someone using sonething called
an "Xtreme104 12 port serial board" which actually mungs all the
handshake lines into CTS.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
next prev parent reply other threads:[~2012-05-10 6:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 6:43 Jau-Yang Chen
2012-05-09 15:23 ` tz
2012-05-09 16:39 ` Dave Taht
2012-05-09 16:47 ` Eric S. Raymond
2012-05-09 16:55 ` Dave Taht
2012-05-09 17:02 ` Eric S. Raymond
2012-05-09 17:12 ` tz
2012-05-09 17:50 ` Ron Frazier (NTP)
2012-05-09 18:21 ` tz
2012-05-09 18:35 ` Dave Taht
2012-05-09 20:41 ` Ron Frazier (NTP)
2012-05-09 20:46 ` Dave Taht
2012-05-09 20:58 ` Ron Frazier (NTP)
2012-05-09 20:59 ` Dave Taht
2012-05-09 22:57 ` Ron Frazier (NTP)
2012-05-09 21:14 ` Eric S. Raymond
2012-05-09 22:30 ` tz
2012-05-09 19:43 ` Dave Hart
2012-05-09 20:37 ` Eric S. Raymond
2012-05-09 21:03 ` Dave Hart
2012-05-09 21:18 ` Ron Frazier (NTP)
2012-05-09 21:38 ` Eric S. Raymond
2012-05-09 22:02 ` Dave Hart
2012-05-10 6:31 ` Eric S. Raymond [this message]
2012-05-10 7:28 ` Dave Hart
2012-05-10 14:55 ` tz
2012-05-10 17:59 ` Eric S. Raymond
2012-05-09 21:20 ` 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=20120510063125.GC12435@thyrsus.com \
--to=esr@thyrsus.com \
--cc=davehart_gmail_exchange_tee@davehart.net \
--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