How to: gpsd on pi4

I am using an old Adafruit Ultimate GPS Breakout -- you may have to adjust for whatever you are using. I wired up its rx,tx,vcc,gnd,pps pins to the gpio bus (you can find info about it elsewhere).
  1. pkg Install u-boot-tools
  2. Rename the attached boot.txt to boot.cmd and create a boot.scr like so: mkimage -C none -A arm -T script -d boot.cmd /boot/msdos/boot.scr -- this is needed as u-boot stops booting if there is any traffic on the serial line.
  3. From /boot/msdos/config.txt, edit out dtoverlay=disable-bt or prefix with a #. Add dtoverlay=pps, and enable_uart=1.
  4. Rename the attached pps.txt file to pps.dts and compile with dtc -@ -o /boot/msdos/pps.dtbo pps.dts.
  5. reboot
  6. as root kldmon gpiopps
  7. Now you should see /dev/cuau0 and /dev/cuau1.
  8. stty -f /dev/cuau1.init 4800 raw cs8 clocal cstopb
  9. gpsd -n /dev/cuau1
  10. Monitor with gpsmon -n or xgps
Next step: get a stratum 1 ntp server up!
 

Attachments

Back
Top