LoRa Tracker for TTN mapper

In TTNv2 I used my mobile phone and a LoRa Node to check the reception and range of my gateway. In TTNv3 (The Stack) this is also available for Android phones not for my iPhone yet. So I took an effort to make a LoRa Tracker with GPS module. The results of this journey are here available.

I used the earlier project: a LoRa Node with button and added a GPS module (GY-NEO6MV2). It took a little while to get the timing, serial communication right.

Here is the physical result of the GPS Extension. The GPS module is not integrated in a new enclosure yet.

And the results of the measurements with SF7 and 125kHz (DR3)

The code is available at: https://gitlab.com/iot-lab-org/minipill_lora_lmic_low_power_node_button_wakeup_gps

To get the connection to TTN mapper https://ttnmapper.org (Great project!) you have to follow the documentation. On one point you have to add a payload formatter. I added this on the End device. You can use this script to decode the information send to TTNv3 Stack.

The javascript code for the formatter:

function decodeUplink(input) {
var decoded = {};

decoded.lat = (input.bytes[2]<<24) +
(input.bytes[3]<< 16) +
(input.bytes[4]<<8) +
decoded.lat = decoded.lat / 1000000;

decoded.lon = (input.bytes[6]<<24) +
(input.bytes[7]<< 16) +
(input.bytes[8]<<8) +
decoded.lon = decoded.lon / 1000000;

decoded.alt = (input.bytes[10]<<8) +
decoded.alt = decoded.alt/100;

decoded.hdop = (input.bytes[12]<<8) +
decoded.hdop = decoded.hdop/100;

// number of sattelites used as accuracy.
decoded.sats = (input.bytes[14]);

return {
data: decoded

The tests I have done are with DR3.

Overview of Data Rate (from lora-developer.semtech.com)

While other trackers have reached my Antenna (8dB) and Gateway (iC880A-SPI with Orange Pi) from almost 14 km.

Almost 14 km reach with DR9

The next idea is to develop a tracker where you can manually change the DR and power settings.

Leave a Reply

Your email address will not be published. Required fields are marked *