NTP-Server with Raspberry Pi and Sure Electronics GPS Eval board
Inhaltsverzeichnis
1 Scope
It was already a few years ago when I bought a Sure Electronics GPS timing receiver. Though, there was never enough time to complete and deploy it. I have done it now.
The Sure receiver is nice because it has 3,3V IO pins, and this matches perfectly with a Raspberry Pi. So it's a good point using it.
Obviously many people have problems with the NTPD that comes with the recent raspian distributions: ntp 4.2.6p5. It does not support PPS...
It is rather easy to make the kernel PPS aware, but ntp still is not capable of using it. I needed to recompile the ntp package so that I was able to use it. The symptom therefore is:
- The tool ppstest does report the reception of a pulse, but even if you configure NTP correctly, it won't give you an output with PPS using the command ntpq -p.
2 References
- http://www.satsignal.eu/ntp/Sure-GPS.htm Here the board is described very well
- http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html
- https://store.uputronics.com/index.php?route=product/product&path=60_64&product_id=81
- http://rdlazaro.info/compu-Raspberry_Pi-RPi-stratum0.html
- http://mythopoeic.org/pi-ntp/
- https://raspberry.tips/raspberrypi-tutorials/raspberry-pi-uhrzeit-ueber-gps-beziehen-zeitserver/
3 Implementation
3.1 OS choice and preparation
First of all I decided to use a minibian image:
https://sourceforge.net/projects/minibian/files/2016-03-12-jessie-minibian.tar.gz
because I don't want to create a really big thing. I just want to have an NTP server.
- Unpack, write it to the SD card, as described so often everywhere on almost every RPI page.
- Use gparted to resize the root partition to the rest of your SD card. We should not waste space.
- Log in using uid root pwd raspberry (default). Note that opposed to Raspian, there is no user "pi".
- apt-get update; apt-get upgrade and update the minibian image.
- Give it a nice hostname, editing the file /etc/hostname and reboot.
- Edit /boot/config.txt - Add dtoverlay=pps-gpio,gpiopin=18 on a new line. - Connect the PPS signal of the Sure board to this pin. Don't get the pin wrong :-)