Page 1 of 1

Getting time from GNSS receiver

Posted: Thu Jul 07, 2016 3:48 pm
by Annu006
Hello guys, I am using Raspberry pi with GNSS Ublox receiver, as there is no Real time clock with RPi so I want to update its time with GNSS time. Can anyone tell me that how can I update my RPi time with GNSS time whenever I restart it without LAN or wifi dongle.
Thanks in advance

Re: Getting time from GNSS receiver

Posted: Thu Jul 07, 2016 7:21 pm
by FlexibleSigmoid

Re: Getting time from GNSS receiver

Posted: Thu Jul 07, 2016 8:45 pm
by beta-tester
you may take a look to:
https://github.com/beta-tester/RPi-GPS-PPS-StratumOne

you have to adjust the PPS pin at line number 156 in the script. (your module is using pin 12, my is using pin 4)

Code: Select all

dtoverlay=pps-gpio,gpiopin=4
and you should delete the custom baud rate + update rate of the GPS receiver line number 99..102, because i don't think that the commands are compatible with your GPS device

Code: Select all

stty -F /dev/ttyAMA0 9600
printf \x27\x24PMTK251,115200*1F\x5Cr\x5Cn\x27 \x3E /dev/ttyAMA0
stty -F /dev/ttyAMA0 115200
printf \x27\x24PMTK220,100*2F\x5Cr\x5Cn\x27 \x3E /dev/ttyAMA0