d8888888b    888 .d8888b.888888888888888888888Y88b   d88P  .d8888b. 8888b
       d888888888b   888d88P  Y88b   888    888        Y88b d88P  d88P  Y88b88888b
      d88P88888888b  888Y88b.        888    888         Y88o88P   888    888888?88b
     d88P 888888Y88b 888 "Y888b.     888    8888888      Y888P    888       888 ?88b
    d88P  888888 Y88b888    "Y88b.   888    888           888     888       888  ?8bb
   d88P   888888  Y88888      "888   888    888           888     888    888888   ?8bb
  d8888888888888   Y8888Y88b  d88P   888    888           888  d8bY88b  d88P8888888888b
 d88P     888888    Y888 "Y8888P"    888    8888888888    888  Y8P "Y8888P" 888     ?88b

Raspberry Pi Stratum 1 Time Server

Before we begin, be sure that you have your GPS hardware connected correctly. I assume that you are using a GPS module that interfaces with your RPI via TTL and offers a dedicated PPS output. If you have a USB or a GPS module without a PPS output, you'll need to look elsewhere for help.

For reference, I have tried this with two GPS modules: the Adafruit Ultimate GPS and a Reyax RYN25AI module with a UBlox MAX-7C (although the MAX-7Q would be a better choice)

Wire your GPS module to your RPI like so: GND -> pin 6, VCC -> pin 4, RX -> pin 8, TX -> pin 10, PPS -> pin 12

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
sudo reboot
sudo apt-get remove -y chrony ntp
sudo apt-get install -y pps-tools libcap-dev bison libtomcrypt0 libtommath0 timelimit \
libtomcrypt-dev libedit-dev libeditline-dev libreadline-dev lsof git vnstat htop
sudo vim /boot/config.txt

Add the following lines:

sudo vim /etc/modules

Add the following line:

vim /boot/cmdline.txt

Edit the line and remove any references to the serial console, eg:

sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service

Note: on the RPI3, you will need to use ttyS0.service instead of ttyAMA0.service

And reboot

sudo reboot

Make sure PPS is working

ppstest /dev/pps0

trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1483403850.000001320, sequence: 14846 - clear  0.000000000, sequence: 0
source 0 - assert 1483403851.000001652, sequence: 14847 - clear  0.000000000, sequence: 0
source 0 - assert 1483403852.000000984, sequence: 14848 - clear  0.000000000, sequence: 0

Test GPS

cat /dev/ttyAMA0
 Previous Page12

Home - Geocaching - PHP Scripts - Articles - Music - Programming - Hot Sauce Review
About This Site - Site Search - About Me - Link Directory - Contact Me

This site was constructed entirely by hand { more info }
Modified Tuesday, January 3rd 2017 UTC

(C) Copyright 2000-2018 Marty Anstey ~~ I didn't rip you off, so don't rip me off.