Send GPS position from Seeeduino LoRaWAN GPS node

Hi,
Working around the same issue, I wonder whether there is a command to tell the GPS it should issue NMEA messages at a chosen period of time. For example every minute instead of continuously?

Yes/no/may-be. It depends on the module used. Also cheap china clones of reputable modules usually don’t store settings if you are able to set anything at all.

What would be the benefit of that ?

To be fair, I try and tell the uBlox to shut the heck up and only give me position when I ask for it - so that I don’t end up with a random interrupt processing loop raining all over the rest of the code or twiddling characters until we get to the start of an actually useful sentence.

Doesn’t stop me asking for position every 10 seconds if I so desire and/or if the accelerometer interrupt says that the thing in question in on the move.

I’ve got a fair collection but none marked “the GPS” so hunting down it’s manual, possibly called “the Manual” will be pretty hard. But you could …

In the context of a TTN node, I see no need for extra interrupts or making changes to the GPS.

Sure you can turn off the normal NMEA sentence stream and then request navigation data, but then the node code has to have all the setup stuff.

If you leave the GPS as is you can get a new location fix within 1 second, no special config needed.

Sure there are some applications when you need faster updates etc, but for a TTN node ?

Probably the easiest bet is leaving the GPS module untouched, but do either of these on your MCU once a minute (or whatever your interval):

a) flush whatever is in the UART buffer (clearing all old messages) - then wait for a second to get the newest message and parse that

b) or after reading a message, deinit UART (depending on the platform it may also be best to set the MCU’s RX-pin as an output), and only re-init UART once you want to read a message, and then wait for a second for a message and parse that

On Arduino this is quite easy, use Serial.end() when finished with the GPS and Serial.begin() when you want to read it again.

The end and begin is definetly needed if your using software serial, since the interupts there can interfere with SPI to the LoRa device, but I have not had a problems with hardware serial ports.

For my initial question on NMEA messages, I partially manage to do it with
Serial2.print(“$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n”);
After that RMC NMEA message only is issued. Apparently, on L76 Quectel GNSS receiver, the period between issues cannot be given in second. In “fixed position” only. I am not sure of what it means for the position is always invalid (which is normal inside my office) but it keeps issuing RMC message all the time.

Can you explain why you want to specifically change the GPS configuration ?

It seems so unecessary for a TTN node, just leave the GPS config as is and read it in the standard way.

I usually work reference stations as GNSS receivers, on which I choose which messages I want to issue and at what rate. I am just exploring the possibilities of GNSS cards.I found it too talkative on the serial port when looking at it.
I grant you that is not a problem when working in stand alone mode. I assume it does not make much of a difference on its power consumption.