AGPS on Tlera Gnat (CMWX1ZZABZ-078 / STM32L0 Arduino core) - Help needed

Hi,

I’m working on a GPS tracker using the Tlera Gnat in a hybrid FSK/TTN mode. The idea is to use a transponder/beacon in known locations, and GPS/TTN on the move. This means the node is sleeping most of the time, and when close to a beacon only needs to be awake a few ms for a FSK ping and occasionally a TTN message.

I’m using the STM32L0 Arduino core developed for this board, and got most of functionality I want in place. What would really help to cut down on the battery drain is to let the beacon serve GPS assistance data so that the GPS fixes are quicker when the node moves away from the beacon.

I have infrastructure set up with Node-Red to serve the beacon AGPS data via MQTT. I can also make the node switch between FSK and Lora to receive data from the beacon, after slight tweaking of the Lora library. What I’m failing at is supplying the assistance data to the GPS module. I can’t figure out how to get data through to the module while still using the nice GNSS library provided with this Arduino core. I have tried accessing the GPS module via Serial1, but that stops the GPS library from working afterwards, and re-initializing seems to reset the module making it forget the assistance data. I have also tried to tweak the library to implement some way to just pass data from a function down to the UART interface, but my C/C++ skills are not yet at the level needed to make that work. The module just halts in one function call, and I don’t know how to debug that.

Anyways, I was hoping that this functionality would be interesting to someone else out there, and that someone would be willing to give me some help on how to move forward with this problem.