RAK 7200 TTN Mapper tracking decoder

Hallo zusammen

Mit dem RAK 7200 ist es doch möglich eine Integration bei thethingsnetwork.org für ttnmapper.org zu machen, so das die gesendeten Pakete aufgezeichnet werden.
RAK 7200 und Handy App tracken ist möglich und geht auch. Wenn ich tracken möchte ohne Handy App, muss ich jetzt die JSON, bei thethingsnetwork, im Decoder anpassen. Ich verstehe nur nicht wie ich den Decoder schreiben kann bzw. wo ich den Decoder her bekommen.

Vielen Dank im Voraus für die Hilfe

Daniel

Hi Daniel

I doubt that you’ll get any responses in German on this forum. Rather try asking your questions in English. Luckily I get the most important part of your question.

For TTN Mapper you can use the default RAK7200 decoder as provided here:

When I tested this my device transmitted Cayenne LPP format, which allowed me to choose the default decoder provided on the TTN Console. This will work with TTN Mapper.

Also read how to set everything up here: https://doc.rakwireless.com/quick-start/rak7200-lora-tracker/analyzing-the-data-from-rak7200

My recommendation would also be to use the following settings:

Daniel didn’t want to use the app.

The RAK7200 doesn’t include the hdop in the payload so can’t be used on its own with TTNMapper, but as you suggest, the other settings are good to go as the radio element.

@nmcc I think you should do some research of your own before making statements like these. I’m the author of TTN Mapper, and I understood the original question quite well.

The RAK7200 does work with TTN Mapper, even though it does not send HDOP. You can also see it in the TTN Mapper FAQ (https://ttnmapper.org/faq/):

When using the Cayenne LPP data format, the GPS coordinates will be decoded into a different JSON format, but this format is also supported. Cayenne LPP does not contain a GPS accuracy, and therefore this data will be considered as inferior and will carry less weight in calculation of coverage, and will be deleted first during data cleanup.

@jpmeijers, I have in the past built devices for the express purpose of driving around mapping community gateways I’ve deployed at my own expense, so I have done some research in the past. In this instance, I apologise profusely for not having recognised your name or memorised all of your FAQ. Sadly I can’t afford the time to revisit every site before answering questions.

Keep up the good work, a useful resource.

Hi, I also have two RAK7200 and want to use them on TTN Mapper as well (love your work @jpmeijers).

The issue I’m facing is that I do get GPS details in my application and in Cayenne, but the GPS coordinates in TTN Mapper are only zeros. That is probably why no data is showing up on TTN Mapper. I did create an experiment today and data is showing up there (experiment=rak-test)

TTN Mapper:

lat lon alt accuracy hdop sats
0.000000 0.000000 0.0 0.00 0.0 0
0.000000 0.000000 0.0 0.00 0.0 0

Data in TTN Console - data:

{
“acceleration_x”: “0.041g”,
“acceleration_y”: “0.013g”,
“acceleration_z”: “0.985g”,
“altitude”: “0.5m”,
“battery”: “3.86V”,
“gyroscope_x”: “-0.26°/s”,
“gyroscope_y”: “1.44°/s”,
“gyroscope_z”: “-0.02°/s”,
“latitude”: “52.0727°”,
“longitude”: “4.4059°”,
“magnetometer_x”: “-8.4μT”,
“magnetometer_y”: “-76.5μT”,
“magnetometer_z”: “16.65μT”
}

I am using OTAA, SF7 and the default RAK TTN Decoder

What could I be doing wrong?

The problem with your data is the degree sign in:

“latitude”: “52.0727°”,
“longitude”: “4.4059°”,

Try removing the unit signs from all your values, as those don’t change and are always known. Thus only put numbers into the json fields, ex:

“latitude”: 52.0727,
“longitude”: 4.4059,

Thank you, that indeed did the trick.

That does mean however that the default RAK decoder isn’t compatible with TTN Mapper.

For others reading this topic, try replacing the GPS section with the following:

case 0x0188:// GPS
myObj.latitude = parseFloat((parseTriple(str.substring(4, 10), 16) * 0.0001).toFixed(4));//unit:°
myObj.longitude = parseFloat((parseTriple(str.substring(10, 16), 16) * 0.0001).toFixed(4));//unit:°
myObj.altitude = parseFloat((parseTriple(str.substring(16, 22), 16) * 0.01).toFixed(1));//unit:m
str = str.substring(22);
break;

That is what did the trick for me.

should be this for 6 digits precision I think

    myObj.latitude = parseFloat((parseTriple(str.substring(4, 10), 16) * 0.000001).toFixed(6));//unit:°
    myObj.longitude = parseFloat((parseTriple(str.substring(10, 16), 16) * 0.000001).toFixed(6));//unit:°
    myObj.altitude = parseFloat((parseTriple(str.substring(16, 22), 16) * 0.01).toFixed(1));//unit:m
    str = str.substring(28);

Just got two RAK7200 devices going here in the room against a RAK7249 on the bench.

I’m actually getting a GPS lock at the window (it’s below freezing outside) if I extend the GPS timeout to 300s so good for testing.

However sometimes it doesn’t work yet the TTN mapper Integration in TTN grabs payloads without GPS data (just battery since I’ve disabled the other sensors) and interprets the lack of data as lat-lon-alt 0,0,0 and puts a dot outside Africa.

What the trick to NOT add a datapoint in TTN mapper Integration if the payload doesn’t have the GPS data?

I think the trick is not to use TTN Mapper for something that’s not moving, or at least, unlikely to get a fix. The mapper is for mapping coverage, it’s not really suitable for knowing where something is, particularly if it’s on the other side of the room.

You could mark the data as experimental, which would help.

You are not alone in this, hence the huge number of datapoints at that location. You can’t stop the RAK7200 uploading it but you may be able to give your office co-ordinates for when it hasn’t got a fix.

A search of the forum yields this:

I’m planning for these to be mobile but I wanted to get a basic test going that allows me to trust the setup. Even in great, outside conditions, there will be times I won’t get a GPS lock. I’d like a setup that can handle that.

Yes, I am marking it as an experiment but I’d like a resilient setup so I can move off the experiment phase and truly show the range of my gateway.

So, I see a few options that I can’t find and I’d like help with:

  1. Find a setting that prevents the RAK7200 from sending anything at all if it can’t get a lock. This is unlikely since I’ve spent some time already, and not ideal since I still like the battery heartbeats.
  2. Change the decoder to flag the JSON payload as invalid if there is no GPS data.
  3. Modify the TTN Mapper integration to ignore datapoints with GPS 0,0.

This is what I’m dealing with:
TTN Mapper Experiment: range-test-7x

Any ideas?

I’m not aware of such a setting and RUI isn’t available for this device, so unlikely.

Possible - you could try not including the lat & long which I’d presume TTN Mapper would then ignore the data point. Or you could use another random point on the globe, perhaps one at the centre of your test area so that you don’t end up with lines going off in some odd direction.

You could ask the author / maintainer of TTN Mapper to do this - it would be at the TTN Mapper end as nothing is being changed on the TTN v2 stack anymore.

Or you could roll your own mapper.

I’d try #2 first, one that borks the payload so it can’t be ingested and if that upsets the system, then use a central point.

Yes you can, when you disable all other sensors including batt voltage, the 7200 will only transmit when it has a lock.
I’m using this situation in 1 of my 7200…

1 Like

This is great, thank you!. Not perfect, since it would have been nice to have a heartbeat, but good enough to get going. Will try today and pick back here with an update.

Just a note that disabling all sensors, including voltage, and only leaving GPS on does indeed stop the RAK7200 from sending anything except when it has a GPS lock. This was tested using the 3.1.0.13 firmware so YMMV.

Just as I already reported :wink:

Just as I reported that I would report :slight_smile: