Software

GPS from the expansion card (4G card or AIO)

Two receivers, two recipes: the 4G card's GNSS via AT+CGPS on /dev/ttyUSB3, or the AIO's GPS on the serial port (/dev/ttyS0 CM4, /dev/ttyAMA0 CM5) at 9600 baud.

Compatibility
CM4CM5A-06
Difficulty
Easy
Status
Available
Author
rikiwarren
Added
Source
ClockworkPi forum

What it takes

  • Software only
  • Config change
  • Purchase required

Difficulty 1 of 3 — easy.

Details

ClockworkPi's 4G card has a GNSS receiver behind the modem: send AT+CGPS=1 to /dev/ttyUSB3 (the wiki uses socat), wait a minute, then read fixes with AT+CGPSINFO or as NMEA on /dev/ttyUSB1. rikiwarren got it working without a SIM using AT+CVAUXS=0 and AT+CGPS=1,1 in minicom, while hyperyay's ModemManager route (mmcli -m any --location-enable-gps-nmea) needs a SIM inserted. It wants an active L1 GNSS antenna on the card's IPEX connector.

The HackerGadgets AIO's GPS is a plain 9600-baud serial receiver: enable the UART (enable_uart=1 on a CM4, dtparam=uart0 on a CM5), remove console=serial0,115200 from cmdline.txt on the CM4, then gpsd /dev/ttyS0 (CM4) or gpsd /dev/ttyAMA0 (CM5); PPS is on GPIO 6. Rex's AIO package installs PyGPSClient — on a CM5 pick the second serial device — and null's thread is where to look if PyGPSClient sees satellites but gpsd shows no SKY data (a 4G modem autostarting and grabbing the port was one cause).

Open at Forum thread
  • GPS
  • GNSS
  • serial
  • 4G
  • AIO

← Back to Software