gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] Hunt loop delays


From: Eric S. Raymond
Subject: [gpsd-dev] Hunt loop delays
Date: Wed, 6 Jan 2016 11:52:54 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

Oliver Jowett <address@hidden>:
> > > (on a slightly related topic, I couldn't get the hunt loop to work
> > > usefully; how fast is this meant to converge? it was taking minutes per
> > > speed setting..)
> >
> > That varies for reasons I don't understand and which seem to relate to
> > quirks in the OS tty layer. It's very fast under Linux, we typically
> > get sync in less than a second and the worst I've seen is around three
> > seconds.  It's slower on BSDs.
> 
> This is on Linux (specifically, on a Raspberry Pi talking to the Trimble
> via a CP2105 usb-serial port) but it was still taking minutes.
> 
> When I looked at it briefly the problem seemed to be that the hunt loop
> would only advance after seeing this many bytes (or reads? I'm not clear, I
> didn't dig too far) from the serial device:
> 
> #define SNIFF_RETRIES   (MAX_PACKET_LENGTH + 128)
> 
> which is quite a large value (644?) and if you are on the wrong baud rate
> then you might only be seeing 5-10 bytes per second so it takes ages.
> 
> It seems like there should be a realtime timeout here too, so the hunt loop
> advances if it hasn't seen a valid packet within a couple of seconds.

I don't think your theory can be a complete explanation.  If it were,
the hunt loop would be dog-slow on all systems, and we can observe
that it is not.

There's something else more OS-dependent going on, but I don't know
whatr it is.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]