[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gpsd-dev
Subject:    Re: [Gpsd-dev] Potential problem with 1pps code during startup
From:       "Rob Janssen" <gpsd () xs4all ! nl>
Date:       2007-07-08 7:43:22
Message-ID: 12176.213.84.187.156.1183880602.squirrel () webmail ! xs4all ! nl
[Download RAW message or body]

> Guys,
>
> I have been able to pin down a problem with the 1pps code, but I need a
> bit of
> help with it. I am not sure if it is caused by a bug, or by the way the
> serial port works on a fundamental level.

When I originally added that 1pps monitoring thread, the function
gpsd_activate only called gpsd_open to open the line, and gpsd_open did
all the protocol and speed determination.
When gpsd_open returned, the speed had already been decided on.

From what I read in your report, apparently that has changed in the
current gpsd.  In that case you are right that it is better to start the
pps monitor only after the protocol and speed have been determined and the
device identified and initialized.

What probably happens is that the pps monitor hangs indefinitely in the
TIOCMIWAIT ioctl waiting for a state change on the DCD line, that is no
longer detected after the port has been re-programmed.  But that probably
depends very much on the serial port driver.

(back when I worked on this, it already became apparent that not all
drivers implement the TIOCMIWAIT ioctl, and those that did not implement
it not always behaved in a sane way.  especially USB serial ports had
trouble, that is why the PPS code was not enabled by default)

Rob

_______________________________________________
Gpsd-dev mailing list
Gpsd-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/gpsd-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic