If you wish to use HW UART instead of the USB cable, it's perfectly possible - you just need to do a bit more work to free the UART up on your Pi.
To get started, hook the GPS module up to your Pi as follows, cross-connecting the TX and RX pins (TX on one device goes to RX on the other and vice versa), and supply 5V from the Pi to the VIN pin on the GPS module:
- GPS Vin to 3.3V (red wire)
- GPS Ground to Ground (black wire)
- GPS RX to TX (green wire)
- GPS TX to RX (white wire)
Once complete you should have no console and yes on serial interface:
Then reboot
Once you've rebooted, you can use the built in UART via /dev/ttyS0
or /dev/serial0
.
Reboot your Pi
After rebooting the Pi for the above changes to take effect, you can proceed with running gpsd
Restart GPSD with HW UART
Restart gpsd and redirect it to use HW UART instead of the USB port we pointed it to earlier. Simply entering the following two commands.
For the Raspberry Pi 1 or 2 (but NOT the 3!) run these commands:
$ sudo killall gpsd $ sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
And for the Raspberry Pi 3 or the Pi Zero W, run these commands to use the different serial port:
sudo killall gpsd sudo gpsd /dev/serial0 -F /var/run/gpsd.sock
$ cgps -s
Page last edited March 08, 2024
Text editor powered by tinymce.