I purchased a raspberry pi and will be experimenting with it.
The comments are quick notes.
Raspberry PI default login information:
Keeping the raspberry pi updated”
sudo apt-get update
sudo apt-get upgrade
and sometimes you need:
sudo apt-get dist-upgrade
and also, but this does not work for me:
sudo apt-get rpi-update
Adafruit Ultimate GPS tutorial for raspberry pi:
Aafruit Ultimate GPS Tutorial link
Making gpsd start on boot:
Run the following command to add the boot script:
sudo dpkg-reconfigure gpsd
It will as the question of whether you want gpsd to start on boot, say YES. It will ask if you want it to seach for usb gps devices, say NO. We are connecting the gps via hardware UART. The device to use is /dev/ttyAMA0. The status is /var/run/gpsd.sock.
To verify the gps is working and locked:
You should see a curses like screen showing the gps readings.
The raspberry pi I was using died and the memory card has errors and is not worth recovering. It looks like it is time for a rebuild!
As of the time of me writing this. raspberrypi.org website has newer version of raspbian than I was running. The new version is codenamed “Jessie”. It has some additions that make using the gps for time synchronization much easier. Here we go….
This was a pain. The dhcp client overwrites your interfaces including ntp.conf even though I am using a static IP address. Here is the command to remove it from startup:
sudo update-rc.d dhcpd5 remove
This does remove the package, just from the startup.
Modify the /boot/cmdline.txt by adding:
This is from:
In section “Prerequisite settings”
The section on reducing ethernet latency
Getting ntp source:
( Always get the latest source! )
tar zxvf ntp-4.2.8p3.tar.gz
Commands to compile ntp from source:
./configure -enable-linuxcaps -disable-all-clocks -disable-parse-clocks -enable-NMEA -enable-ATOM -enable-ntpdate-step
sudo make install
Stop ntpd if necessary: sudo service ntp stop
Copy some files around: sudo cp /usr/local/bin/ntp* /usr/bin/ && sudo cp /usr/local/sbin/ntp* /usr/sbin/
Create a startup script to automatically create the devices:
sudo vi /etc/udev/rules.d/55-ntp-gps.rules
Add these lines:
SUBSYSTEM==”pps”, KERNEL==”pps0″, SYMLINK+=”gpspps0″
KERNEL==”pps0″, OWNER=”root”, GROUP=”tty”, MODE=”0660″, SYMLINK+=”gpspps0″
This is from the section: Enabling PPS/ATOM support in NTPD
Alot more to come. Gotta take a break.
mpeer@raspberrypi ~ $ ntpq -pn
remote refid st t when poll reach delay offset jitter
o127.127.20.0 .GPS. 0 l 2 16 377 0.000 0.006 0.009
The lower case “o” at the beginning of the line shows that it is PPS discplined and locked.
Update my pi to Jessie using the sudo apt-get commands below.
Doing a netstat -l4n I found the pi listening on ports 68, 5353 and 55340. I only need ssh and eventually ntpd. So I have turned off those services on startup.
The ports 5353 and 55340 are mdns. The command to turn those off is:
sudo systemctl disable avahi-daemon
The port 68 is dhcp client. The command to turn that off on is:
sudo systemctl disable dhcpcd
Comments are closed.