Hi
I’m trying to add GPS to a DIY Pi Pico node I have been working on.
I have added pin definitions to the appropriate variant.h file as follows:
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define GPS_RX_PIN 7
#define GPS_TX_PIN 6
Despite the module appearing to have a GPS lock, I’m seeing no sign of this from the node.
I also tried adding various combinations of the following but without success
#define HAS_GPS 1
#define GPS_UBLOX
(it isn’t actually a UBLOX however the datasheet says it is directly swappable with one)
I have also tried swapping the RX and TX pin definitions as I know it can sometimes be confusing whether it is asking from the perspective of the GPS module or the MCU.
I’m very much out of ideas at this point, the only other clue I have is this line from the debug but it could be a red herring:
DEBUG | ??:??:?? 2 Running without GPS.
Is anyone able to offer any help please?
I have a Waveshare L76B GPS running with a Waveshare Pico module.
See this branch https://github.com/Mictronics/meshtastic_firmware/tree/pico_waveshare
The variant is rpipico_waveshare
.
GPS is on GPIO0=TxD0=to GPS Rx and GPIO1=RxD0=from GPS Tx
PPS input is on GPIO16.
The Meshtastic firmware expects NMEA input at 9600 Baud.
Be aware that the GPS is identified by specific strings from GPS.
See https://github.com/Mictronics/meshtastic_firmware/commit/54a43481150622671df950276c727d9240aac481
Thanks, I have tried a few variations including configuring as if it were a L76K but still no luck.
The module I’m using is an ATGM336H, which, according to the datasheet puts out NMEA0183 sentences at a default 9600 baud. I’ve used these modules before as a direct swap for UBLOX modules without issue.
Looking at other hardware, the nano series also uses this module and would appear to only require the TX and RX pins to be defined.
I did also find an old Ublox neo6m module lying around and tried connecting that to see if it would work any better but I’m still getting nothing so I’m wondering if there’s something more fundamental stopping it working for me.
I assume my GPIO choices aren’t going to be a problem? I just picked 2 spare ones in a convenient location.
Same here I have raised an issue, the UART1/ UART0 may not be specified in the code for Pi Pico. Pin Schematic for waveshare sx126x shows 0,1 , 8,9 and a few others as being free, but no data is pulled from the tx and rx/ serial or hardware monitor. I have tested on Thonny using py code and 3d lock NMEA info is being pulled to all the pins, but not via the meshtastic firmware.
There is some provision for this by the looks of it.
In GPS.h there is the following:
#if defined(RPI_PICO_WAVESHARE)
static SerialUART *_serial_gps;
#else
static HardwareSerial *_serial_gps;
There doesn’t however appear to be a variant for RPI_PICO_WAVESHARE yet.
I’m not great with the coding side of things but I did get it going with a few tweaks to GPS.h, variant.h and platformio.ini.
Sorry, I don’t have the specifics recorded but the changes were minimal. Mostly just a case of defining the GPS connections in variant.h and replacing RPI_PICO_WAVESHARE with RPI_PICO.
I’m sure someone a bit more clued in could fill in the blanks for you.
I believe it’s currently unsupported. I requested it as a enhancement and was closed and moved to discussion.