<p>But this requires a recompile to change lines, not a command line option, or some detection method. If gpsd is compiled for RI, it wont respond to DCD.</p>
<div class="gmail_quote">On May 10, 2012 2:31 AM, "Eric S. Raymond" <<a href="mailto:esr@thyrsus.com">esr@thyrsus.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dave Hart <<a href="mailto:davehart_gmail_exchange_tee@davehart.net">davehart_gmail_exchange_tee@davehart.net</a>>:<br>
> While I appreciate GPSD's flexibility, I advise against exercising it<br>
> needlessly. All of the PPSAPI implementations which support serial<br>
> port control line input that I'm aware of want to see it on the<br>
> carrier detect line. If you know you'll only ever care about using<br>
> the hardware with GPSD, any control line will do for PPS, but to use<br>
> it directly with ntpd, the PPSAPI implementations dictate using the<br>
> DCD line.<br>
><br>
> I had a vague recollection GPSD could use PPSAPI where it's available.<br>
> If that's true, when GPSD is using PPSAPI, isn't it restricted to<br>
> using carrier detect in practice?<br>
<br>
Which line the PPS arrives on is a hardware feature of the GPS completely<br>
decoupled from anything PPSAPI has any control over.<br>
<br>
There's no code-complexity cost for being flexible. Here's what the<br>
code looks like:<br>
<br>
#define PPS_LINE_TIOC (TIOCM_CD|TIOCM_CAR|TIOCM_RI|TIOCM_CTS)<br>
<br>
/*<br>
* Wait for status change on any handshake line. The only assumption here<br>
* is that no GPS lights up more than one of these pins. By waiting on<br>
* all of them we remove a configuration switch.<br>
*/<br>
while (1) {<br>
int ok = 0;<br>
char *log = NULL;<br>
char *log1 = NULL;<br>
<br>
if (ioctl(session->gpsdata.gps_fd, TIOCMIWAIT, PPS_LINE_TIOC) != 0) {<br>
gpsd_report(LOG_ERROR, "PPS ioctl(TIOCMIWAIT) failed: %d %.40s\n"<br>
, errno, strerror(errno));<br>
break;<br>
}<br>
<br>
That definition of PPS_LINE_TIOC is quite literally the only place in<br>
GPSD where the identity of the PPS pin matters. It used to not include<br>
TIOCM_CTS, but we got a bug report from someone using sonething called<br>
an "Xtreme104 12 port serial board" which actually mungs all the<br>
handshake lines into CTS.<br>
--<br>
<a href="<a href="http://www.catb.org/~esr/" target="_blank">http://www.catb.org/~esr/</a>">Eric S. Raymond</a><br>
_______________________________________________<br>
Thumbgps-devel mailing list<br>
<a href="mailto:Thumbgps-devel@lists.bufferbloat.net">Thumbgps-devel@lists.bufferbloat.net</a><br>
<a href="https://lists.bufferbloat.net/listinfo/thumbgps-devel" target="_blank">https://lists.bufferbloat.net/listinfo/thumbgps-devel</a><br>
</blockquote></div>