Last active
November 10, 2016 17:53
-
-
Save walduino/1af19e098f806cac0284dec39ed5bae1 to your computer and use it in GitHub Desktop.
working setup on an odroid c1 for PPS gps setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default settings for the gpsd init script and the hotplug wrapper. | |
# Start the gpsd daemon automatically at boot time | |
START_DAEMON="true" | |
# Use USB hotplugging to add new USB devices automatically to the daemon | |
USBAUTO="true" | |
# Devices gpsd should collect to at boot time. | |
# They need to be read/writeable, either by user gpsd or the group dialout. | |
DEVICES="/dev/ttyS2" | |
# Other options you want to pass to gpsd | |
GPSD_OPTIONS="-n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help | |
driftfile /var/lib/ntp/ntp.drift | |
# Enable this if you want statistics to be logged. | |
#statsdir /var/log/ntpstats/ | |
statistics loopstats peerstats clockstats | |
filegen loopstats file loopstats type day enable | |
filegen peerstats file peerstats type day enable | |
filegen clockstats file clockstats type day enable | |
# Specify one or more NTP servers. | |
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board | |
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for | |
# more information. | |
server ntp.scarlet.be | |
server ptbtime1.ptb.de | |
ntp1.teambelgium.net | |
server 3.be.pool.ntp.org | |
server 3.europe.pool.ntp.org | |
server 2.europe.pool.ntp.org | |
pool 0.ubuntu.pool.ntp.org iburst | |
pool 1.ubuntu.pool.ntp.org iburst | |
pool 2.ubuntu.pool.ntp.org iburst | |
pool 3.ubuntu.pool.ntp.org iburst | |
# Use Ubuntu's ntp server as a fallback. | |
pool ntp.ubuntu.com | |
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for | |
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions> | |
# might also be helpful. | |
# | |
# Note that "restrict" applies to both servers and clients, so a configuration | |
# that might be intended to block requests from certain clients could also end | |
# up blocking replies from your own upstream servers. | |
# By default, exchange time with everybody, but don't allow configuration. | |
restrict -4 default kod notrap nomodify nopeer noquery limited | |
restrict -6 default kod notrap nomodify nopeer noquery limited | |
# Local users may interrogate the ntp server more closely. | |
restrict 127.0.0.1 | |
restrict ::1 | |
# Needed for adding pool entries | |
restrict source notrap nomodify noquery | |
# Clients from this (example!) subnet have unlimited access, but only if | |
# cryptographically authenticated. | |
#restrict 192.168.123.0 mask 255.255.255.0 notrust | |
# If you want to provide time to your local subnet, change the next line. | |
# (Again, the address is an example only.) | |
#broadcast 192.168.123.255 | |
# If you want to listen to time broadcasts on your local subnet, de-comment the | |
# next lines. Please do this only if you trust everybody on the network! | |
#disable auth | |
#broadcastclient | |
#Changes recquired to use pps synchonisation as explained in documentation: | |
#http://www.ntp.org/ntpfaq/NTP-s-config-adv.htm#AEN3918 | |
# GPS Serial data reference (NTP0) | |
#server 127.127.28.0 | |
#fudge 127.127.28.0 refid GPS | |
# Kernel-mode PPS ref-clock for the precise seconds | |
#server 127.127.22.0 minpoll 1 maxpoll 4 prefer | |
#fudge 127.127.22.0 flag1 1 flag3 1 refid PPS | |
# coarse time ref-clock | |
server 127.127.28.0 minpoll 4 maxpoll 4 prefer | |
fudge 127.127.28.0 time1 +0.435 flag1 1 refid GPSD stratum 5 | |
# PPS fine time ref | |
server 127.127.22.0 minpoll 1 maxpoll 4 prefer | |
fudge 127.127.22.0 refid PPS | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -s | |
apt-get install device-tree-compiler pps-tools gpsd ntp | |
fdtput -c /media/boot/meson8b_odroidc.dtb /pps | |
fdtput -t s /media/boot/meson8b_odroidc.dtb /pps compatible "pps-gpio" | |
fdtput -t s /media/boot/meson8b_odroidc.dtb /pps gpios "GPIOY_3" | |
GPS PPS pin attached to GPIOY_3 | |
http://odroid.com/dokuwiki/doku.php?id=en:c1_gpio_pps | |
test commands | |
ppstest /dev/pps0 | |
apt-get install gpsd-clients ==> cgps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment