LoRaWAN GPS Tracker Dragino LGT-92 and OwnTracks

The Dragino LGT-92 LoRaWAN GPS tracker is a very cool Open Source device to do some experiments with LoRaWAN. I always wanted to have a real-life example for LoRaWAN to try out and see how good the coverage is in Switzerland, with this device I found it. It can be bought f.e. at bastelgarage.ch.

Getting the data out of the tracker needs some work though. By default the device connects to The Things Network (TTN) which is a network of gateways all around the world (I contribute to the network by sharing my LoRaWAN gateway).

The data from LGT-92 is sent via LoRaWAN to a gateway which relays it into the TTN network. A custom JavaScript function decodes the received binary data in TTN and makes it available for easy consumption f.e. over MQTT. For getting the data into OwnTracks I wrote a hacky Python script to subscribe to the TTN MQTT broker, transform the data and publish it to my OwnTrack MQTT broker. It can be found on my Git repo server for inspiration: lgt92.py (won't win a price though). Besides storing the data in OwnTracks the scripts also writes data into InfluxDB to have some nice graphs about other aspects than just location data. I've deployed this script to Kubernetes (what else?), the according deployment files can be found in my public GitOps repository under /ioteer.

While I'm a fan of LGT-92, it also has some drawbacks: It only reports latitude and longitude while I would also like f.e. accuracy or altitude data. Configuring the device over AT commands needs serial adapter and some fiddling until it works. Firmware upgrade is only possible via an ST-Link v2 adapter which I don't own (yet - bastelgarage.ch should have it in stock soon(ish)). My device currently runs version 1.4 of the firmware and I'm looking forward to upgrade it to 1.5 once I get the adapter.

Some references which helped me during implementation and learning:

You've successfully subscribed to Tobias Brunner aka tobru
Great! Next, complete checkout to get full access to all premium content.
Error! Could not sign up. invalid link.
Welcome back! You've successfully signed in.
Error! Could not sign in. Please try again.
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.