OpenMarine
RPi 4 Serial UART for GPS input - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=3)
+--- Thread: RPi 4 Serial UART for GPS input (/showthread.php?tid=3717)



RPi 4 Serial UART for GPS input - crocks32 - 2021-10-02

Hi There,

I have a pi4 that I am trying to get a ublox 7m GPS module working on via the UART GPIO15 pins.

I am stumped regarding the primary and secondary UART serial connections. Apparently on the pi4 they are different (with a miniuart) to the earlier ones

There are a few overlay options one can specify in the config.txt file I have tried a few already, resulting in ttyAMA0, ttyAMA1, ttyS0,  but I still cannot get any of this data into signal k after aliasing the device and setting a connection in the serial dialog.

in my config.txt I have the following
dtoverlay=disable-bt
dtparam=spi=on
enable_uart=1
core_freq=250
dtoverlay=uart5,ctsrts

these values come from the https://www.raspberrypi.org/documentation/computers/configuration.html#configuring-uarts
documentation. But I still cant work it out. Has anyone else had to deal with this?

The easy option is aparently to go and get a USB GPS dongle. But I had this ublox NEO 7m by duinotech. It has an onboard antenna but also an sma to run an external antenna. I have previously read the nmea gps messages in sudo cat /dev/(serial port). but not through to signal k.

The module and guts of connecting this device I found in this video https://youtu.be/N8fH0nc9v9Q but i did not run the python scripts as I wish to use it with OP.

An help would be appreciated.

Thanks
C32


RE: RPi 4 Serial UART for GPS input - crocks32 - 2021-10-04

OK Update, as follows

I edited my config.txt file to include

dtoverlay=uart5,txd1_pin=08,rxd1_pin=10

re-ran 

sudo cat /dev/ttyAMA0

Got illegible GPS data.

Edited the serial device connection to signal K and set the baud to 9600.

Still no throughput to signal K.

hard Set the serial Baud rate to 9600 in terminal using 

stty -F /dev/serial0 raw 9600 cs8 clocal -cstopb

reboot

and...boom!

Problem solved. working like a charm. (5 total signal k throughput deltas/second and 15 signal k paths)

Big Grin Big Grin Big Grin Big Grin Big Grin Big Grin Big Grin Big Grin Big Grin Big Grin 

[url=https://www.raspberrypi.org/documentation/computers/configuration.html#primary-uart][/url]