From the wikipedia:

"An atomic clock is a clock that uses an electronic transition frequency in the microwave region[citation needed] of the electromagnetic spectrum of atoms as a frequency standard for its timekeeping element. Atomic clocks are among the most accurate time and frequency standards known."

"The principle of operation of an atomic clock is not based on nuclear physics, but rather on atomic physics and using the microwave signal that electrons in atoms emit when they change energy levels. Early atomic clocks were based on masers at room temperature. Currently, the most accurate atomic clocks first cool the atoms to near absolute zero temperature by slowing them with lasers and probing them in atomic fountains in a microwave-filled cavity."

see http://en.wikipedia.org/wiki/Atomic_clock for more information

 

Anyway, atomic clock devices are expensive peices of equipment mainly confined to national laboratories. However, there are a number of atomic clock references available free to air for computer time synchronisation.

 

The GPS satellite system has on-board atomic clock units that can be received and utilised to synchronise computers and computer networks. The GPS atomic clock system is available world-wide. Any GPS antenna with a good view of the sky can synchronise with the GPS satellite system.

 

To use the Bluetooth GPS antenna with our linux box we will need the following items:

 

  1. A bluetooth antenna: naturally
  2. hcitool: it is used to configure Bluetooth connections and send some special command to Bluetooth devices. You can have more info typing man hcitool
  3. sdptool: it provides the interface for performing SDP queries on Bluetooth devices, and administering a local sdpd.
  4. gpsd   : interface daemon for GPS receivers
  5. rfcomm : it is used to set up, maintain, and inspect the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.

 

First of all we need to locate the Bluetooth GPS receiver, to do this we will use the hcitool application

:~$ hcitool scan 

Scanning ...


00:30:04:0A:B2:35 Haicom BT GPS


Now that we have found the receiver we need more information about it:

:~$ sudo sdptool browse 00:30:04:0A:B2:35

[sudo] password for gg1: 

Browsing 00:30:04:0A:B2:35 ...

Service Name: Serial Port0

Service RecHandle: 0x10000

Service Class ID List:

  "Serial Port" (0x1101)

Protocol Descriptor List:

  "L2CAP" (0x0100)

  "RFCOMM" (0x0003)

    Channel: 1

Language Base Attr List:

  code_ISO639: 0x656e

  encoding:    0x6a

  base_offset: 0x100


and now that we know the Channel (Number 1), we can edit the /etc/bluetooth/rfcomm.conf configuration file, remember to obtain root privileges and add the following code:

rfcomm0 {

# Automatically bind the device at startup

bind yes;


# Bluetooth address of the device

device 00:30:04:0A:B2:35;


# RFCOMM channel for the connection

channel 1;


# Description of the connection

comment "Haicom BT GPS";

}

 

the device value is the one obtained by the hcitool scan, while the channel is the one obtained by the sdptool.

 

now run the rfcomm app

:~$ sudo rfcomm connect 0


and then the gpsd daemon

:~$ gpsd /dev/rfcomm0


Now all is working, to verify you can read the rfcomm0 serial device:

:~$ cat /dev/rfcomm0

 

$GPGGA,073513.000,4202.9499,N,01325.5714,E,1,9,1.05,752.9,M,44.7,M,,*57

$GPGSA,A,3,19,03,06,22,21,07,18,16,30,,,,1.35,1.05,0.86*0B

$GPGSV,3,1,10,06,70,319,18,16,61,214,24,03,56,308,25,18,55,091,21*76

$GPGSV,3,2,10,22,52,154,25,30,44,190,23,21,35,059,20,19,26,298,39*7D

$GPGSV,3,3,10,15,09,060,,07,06,319,16*7E

$GPRMC,073513.000,A,4202.9499,N,01325.5714,E,0.06,73.48,270111,,,A*5C

$GPVTG,73.48,T,,M,0.06,N,0.11,K,A*03

$GPGGA,073514.000,4202.9499,N,01325.5714,E,1,9,1.12,752.9,M,44.7,M,,*56

$GPGSA,A,3,19,03,06,22,21,07,18,16,30,,,,2.02,1.12,1.68*0B

$GPGSV,3,1,10,06,70,319,19,16,61,214,24,03,56,308,25,18,55,091,21*77

$GPGSV,3,2,10,22,52,154,25,30,44,190,23,21,35,059,20,19,26,298,39*7D

$GPGSV,3,3,10,15,09,060,,07,06,319,16*7E

$GPRMC,073514.000,A,4202.9499,N,01325.5714,E,0.06,73.48,270111,,,A*5B

$GPVTG,73.48,T,,M,0.06,N,0.11,K,A*03

$GPGGA,073515.000,4202.9500,N,01325.5714,E,1,9,1.05,752.9,M,44.7,M,,*50

$GPGSA,A,3,19,03,06,22,21,07,18,16,30,,,,1.35,1.05,0.86*0B

$GPGSV,3,1,10,06,70,319,20,16,61,214,24,03,56,308,25,18,55,091,21*7D

$GPGSV,3,2,10,22,52,154,25,30,44,190,23,21,35,059,20,19,26,298,39*7D

$GPGSV,3,3,10,15,09,060,,07,06,319,16*7E

$GPRMC,073515.000,A,4202.9500,N,01325.5714,E,0.06,73.48,270111,,,A*5B

$GPVTG,73.48,T,,M,0.06,N,0.11,K,A*03


 

Now that all is working, you can use your rfcomm0 serial device to configure your own ntp server (man ntpd)

 

Naturally you can use the GPS as a Navigator System just install gpsdrive and Navit and download maps….

 

Gg1