stty -F /dev/ttyAMA5 9600 cs8 -cstopb -parenb Now cat /dev/ttyAMA5 showed garbage. Good—data was flowing.
Now $GPGGA sentences appeared cleanly.
Marta checked the datasheet. UG-353 defaults to 9600 baud , but the Linux kernel expected 115200 for the UART. She fixed the stty settings: ug-353 gps driver
sudo gpsd /dev/ttyAMA5 -F /var/run/gpsd.sock But cgps showed a blank screen. Zero satellites. Sky was clear. stty -F /dev/ttyAMA5 9600 cs8 -cstopb -parenb Now
The garbage was not NMEA sentences (which start with $GP or $GN ). It was random binary noise. Marta grabbed an oscilloscope: the UG-353’s TX was 3.3V, but the CM4’s RX was configured for 1.8V logic due to a broken device tree overlay. She fixed the config.txt : ug-353 gps driver