dragino_lora_gps_hat_ntp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dragino_lora_gps_hat_ntp [2019/03/17 18:38] – [Configure NTPd] admin | dragino_lora_gps_hat_ntp [2019/03/18 19:34] – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====Dragino LoRa / GPS hat - NTP PPS===== | + | =====Raspberry Pi, Dragino LoRa / GPS hat - NTP PPS===== |
- | Configure NTPd with PPS | + | Configure NTPd with PPS. Based on Raspbian Stretch. |
+ | |||
+ | **Notes: | ||
+ | * Had no luck with the new refclock driver 46, GPSD NG client protocol. Switched to PPS (22) and SHM (28). | ||
+ | |||
+ | **Sources: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
{{: | {{: | ||
Line 19: | Line 26: | ||
* Reboot | * Reboot | ||
* Test GPS output: '' | * Test GPS output: '' | ||
- | |||
- | ====Configure GPS==== | ||
- | * Install packages:< | ||
- | * Configure device in ''/ | ||
- | * Restart gpsd:< | ||
- | * Test GPS output with '' | ||
====Configure Pulse Per Second (PPS)==== | ====Configure Pulse Per Second (PPS)==== | ||
- | * Install PPS tools:< | + | * Install PPS tools:< |
* Configure GPIO for PPS:< | * Configure GPIO for PPS:< | ||
+ | * Configure udev rules in ''/ | ||
+ | KERNEL==" | ||
+ | KERNEL==" | ||
+ | KERNEL==" | ||
+ | </ | ||
* Reboot | * Reboot | ||
* There should be a ''/ | * There should be a ''/ | ||
Line 41: | Line 47: | ||
source 0 - assert 1552847116.000137416, | source 0 - assert 1552847116.000137416, | ||
</ | </ | ||
+ | ====Configure GPS==== | ||
+ | * Install packages:< | ||
+ | * Configure devices and options in ''/ | ||
+ | GPSD_OPTIONS=" | ||
+ | </ | ||
+ | * Reboot | ||
+ | * Test GPS output with '' | ||
+ | |||
====Configure NTPd==== | ====Configure NTPd==== | ||
* Disable systemd timesyncd:< | * Disable systemd timesyncd:< | ||
systemctl disable systemd-timesyncd</ | systemctl disable systemd-timesyncd</ | ||
- | * Install | + | * Install |
+ | * Install NTP:< | ||
+ | # Download latest from http:// | ||
+ | curl -OL http:// | ||
+ | tar zxvf ntp-4.2.8p13.tar.gz | ||
+ | cd ntp-4.2.8p13 | ||
+ | ./configure --enable-linuxcaps | ||
+ | make -j4 | ||
+ | sudo make install | ||
+ | |||
+ | sudo cp / | ||
+ | # Modify ntpd location in / | ||
+ | |||
+ | ### BEGIN INIT INFO | ||
+ | # Provides: | ||
+ | # Default-Start: | ||
+ | # Default-Stop: | ||
+ | # Short-Description: | ||
+ | ### END INIT INFO | ||
+ | |||
+ | |||
+ | groupadd ntp | ||
+ | useradd -d / | ||
+ | printf ' | ||
+ | install -v -o ntp -g ntp -d /var/lib/ntp | ||
+ | |||
+ | systemctl enable ntpd | ||
+ | |||
+ | </ | ||
* Add to ''/ | * Add to ''/ | ||
- | # GPS Serial | + | # PPS |
- | server 127.127.28.0 | + | server 127.127.22.0 minpoll 4 maxpoll 4 true |
- | fudge 127.127.28.0 time1 refid GPS | + | fudge 127.127.22.0 flag3 1 refid PPS |
- | # GPS PPS | + | # GPS Serial, GPSD SHM |
- | server 127.127.28.1 prefer | + | server 127.127.28.0 minpoll 4 maxpoll 4 iburst |
- | fudge 127.127.28.1 refid PPS | + | fudge 127.127.28.0 flag1 1 time1 0.200 refid SHM0 stratum 1 |
+ | |||
+ | # PPS, GPSD SHM | ||
+ | server 127.127.28.2 minpoll 4 maxpoll 4 | ||
+ | fudge 127.127.28.2 flag1 1 refid SHM2 | ||
+ | |||
+ | # GPSD JSON driver, to auto start GPSD | ||
+ | server 127.127.46.0 minpoll 4 maxpoll 4 noselect | ||
+ | |||
+ | # Fix False tickers | ||
+ | tos mindist 0.5 | ||
</ | </ | ||
* Enable and start ntpd:< | * Enable and start ntpd:< | ||
systemctl start ntp</ | systemctl start ntp</ | ||
* Comment ntp option in ''/ | * Comment ntp option in ''/ | ||
+ | * Reboot | ||
{{tag> | {{tag> |
dragino_lora_gps_hat_ntp.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1