Bluetooth GPS for timekeeping?

Frank Mayhar frank at exit.com
Tue Aug 9 20:49:14 GMT 2005


On Tue, 2005-08-09 at 15:19 -0400, David Gilbert wrote:
> >>>>> "Frank" == Frank Mayhar <frank at exit.com> writes:
> 
> Frank> On Tue, 2005-08-09 at 14:51 -0400, David Gilbert wrote:
> >> But ... since there are long patches of time where I'm not mobile,
> >> I was wondering if anyone had looked at using a Bluetooth GPS for
> >> timekeeping.  Has anyone also ever had an ntp server sometimes use
> >> a GPS and othertimes use other servers ... depending on the
> >> availability of the GPS?
> 
> Frank> The former would depend strongly on the characteristics of the
> Frank> Bluetooth protocols, at least when it comes to accuracy.
> Frank> Keeping time to the half-second or so would be pretty easy, I
> Frank> would guess.
> 
> Frank> The latter is the way it already works.  Just configure other
> Frank> peers in your ntp.conf along with your GPS, viz:
> 
> How might you determine the accuracy of the GPS ... or the
> "characteristics of the Bluetooth protocols" ?

First learn about the way Bluetooth works.  Pay attention to the various
delays that are built into the protocol and that might be forced by
transmission and reception conditions.

> The GPS docs "say" that the GPS chipset keep time to within 100ns.
> However (and I assume this is to save power) they also say that the
> position indication is only sent once per second.

The way this accuracy is typically transmitting outside the GPS unit
itself is via a (usually logic-level) pulse-per-second signal.  As it
happens, a lot of the older GPS units that do this have a 5V PPS, which
is enough to get it over the 3V RS232 threshold so it can be seen as CD.
(For those with a PPS of 3.3V or lower, you have to use another method;
PHK has a good mechanism on his website, using a Soekris box.)  While
the RS232 hardware is pretty sloppy, it is good enough to get within a
few microseconds of the real time; right now tock thinks he's within
about nine us of UTC and tick agrees to within +/- 2us.  Tick uses a
Motorola Oncore (instead of the GPSClock) but also gets the PPS via the
RS232 CD signal and he thinks he's within about a microsecond of UTC.

Since it's wired, the PPS signal is just degraded by propagation and by
the accuracy of the receiving system.  I'm no RF expert but I'll bet
that getting high accuracy via Bluetooth would be problematic.  On the
other hand, accuracy to within milliseconds should be doable and to
within hundreds of ms easy, since that's what the position indication
string gives you.

> In my case, the Bluetooth GPS would be talking to a Bluetooth dongle
> hanging directly out a port of the server in question.

Well, you wouldn't want to run a stratum 0 NTP server on this, but it's
probably plenty good enough for a human being.
-- 
Frank Mayhar frank at exit.com     http://www.exit.com/
Exit Consulting                 http://www.gpsclock.com/
                                http://www.exit.com/blog/frank/


More information about the freebsd-hackers mailing list