I’m using the Lilygo T-Beam GPS-Tracker (T-Beam Meshtastic – LILYGO®).
For the software I make use of the MCCI LoRaWAN LMIC library (V4.1.1).
My software is based on the ttn-otaa example provided with the library.
Basically everything works:
- I get position data
- the board is connected to TTN
- the board transmits position data via LoRaWAN
Now I would achieve the following and didn’t find a solution up to now:
I want the board to join TTN, but then send no position data before a gps fix is made and correct position data is available.
If I don’t call the do_send()
function (that contains a call to the LMIC_setTxData2()
function) no uplink message with position data is sent, but the board does also not join the network.
If I call the do_send()
function at least one (wrong) position message is sent after joining prior to the gps fix. I can suppress subsequent uplink message but I can’t get rid of this one 1st message.
Does someone know a way to join but send uplink message only after gps fix (or more general: controlled by the application software)?