Raspberry Pi - GPS interfacing notes: Difference between revisions
Created page with "You may be binding to the wrong serial. You discover the serial for your GPS device by navigating to the folder below without the device plugged in, then refreshing with the d..." |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Find the serial port the GPS is interfacing. | |||
cd /dev/ | cd /dev/ | ||
ls | ls | ||
or | |||
dmesg | tail | |||
The device maybe called "ttyACM0" or "ttyUSB0" | |||
Install the requisite packages. | Install the requisite packages. | ||
Line 15: | Line 17: | ||
Expose Service to public ports and localhost | Expose Service to public ports and localhost | ||
nano /lib/systemd/system/gpsd.socket | |||
Change 127.0.0.1 to 0.0.0.0 | Change 127.0.0.1 to 0.0.0.0 | ||
Line 27: | Line 29: | ||
gpsmon | gpsmon | ||
To create a GPS log file: | |||
str2str -in serial://ttyXXX0:ubx -out rover.ubx -c /home/pi/gps/m8n_gpsglo_5hz.cmd |
Latest revision as of 01:33, 9 October 2019
Find the serial port the GPS is interfacing.
cd /dev/ ls
or
dmesg | tail
The device maybe called "ttyACM0" or "ttyUSB0"
Install the requisite packages.
sudo apt-get install gpsd gpsd-clients python-gps
Stop Daemons
sudo systemctl stop gpsd.socket sudo systemctl disable gpsd.socket
Expose Service to public ports and localhost
nano /lib/systemd/system/gpsd.socket
Change 127.0.0.1 to 0.0.0.0
Stop GPSD services
sudo kilall gpsd
Bind service to serial device
sudo gpsd /dev/ttyACM0 -F /var/run/gpsd.sock
Show GPS Data
gpsmon
To create a GPS log file:
str2str -in serial://ttyXXX0:ubx -out rover.ubx -c /home/pi/gps/m8n_gpsglo_5hz.cmd