Jump to content

OPi Zero GPS ntpserver


Recommended Posts

I use the OrangePi Zero.  But it is similar to other model.

 

It's very simple:

 

1) use the mainline 4.11.x kernel 

2) enable the uart1 and pps-gpio in /boot/armbianEnv.txt  like this :

  

overlays=uart1 pps-gpio
param_pps_pin=PA7

 

3) edit /etc/default/gpsd  to use ttyS1 as gps device

# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyS1"
# Other options you want to pass to gpsd
GPSD_OPTIONS="-G -n "

 

4) If you use ntpd,  edit /etc/ntpd.conf like this:

# GPS Serial data reference
server 127.127.28.0 minpoll 4 maxpoll 4 prefer
fudge 127.127.28.0 time1 0.135 refid GPS

server 127.127.22.0 maxpoll 4         # ATOM(PPS)
fudge 127.127.22.0 flag3 1            # enable PPS API

 

5) Or if you prefer crony rather than ntp, install chrony instead of ntp, edit /etc/chrony/chrony.conf , add this to end of it:

refclock SHM 0 refid GPS precision 1e-1 offset 0.134 delay 0.2 noselect
refclock PPS /dev/pps0 lock GPS

6) connect GPS module to UART1 

    GPS      Zero

---------------------

   TXD        UART1_RX PIN10

   RXD        UART1_TX  PIN8

  PPS          IO-1  PIN12

 

7)  use ntpq -p  or chrony sources. to check it.

 

IMG_8535.JPG

Edited by zador.blood.stained
Moved to the tutorials section
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines