RAK 10701 plus own back-end

Is there any information available for the 10701-plus on how to setup your own back-end if you don’t have an edge gateway.

I have and edge gateway at home but in the field there will be none.
I want to have the same functionality.

Or do I have to flash the 10701-L firmware to have this?

So far I hae the first 6 bytes as the same gps as the L firmware. but then it is different.

Last byte seems an counter and nog gps sats in view.

Also what does the plus ecpect back?

Egbert

Welcome to the forum @Windsurfice

No guide or tutorial, but I have setup a NodeRED flow as an endpoint for the FieldTester Plus.
The flow is for Chirpstack LNS, it will require some changes if you use other LNS.

Chirpstack uplink ==> CS MQTT => NodeRED => data parser & downlink generator ==> CS MQTT => Chirpstack downlink.

For the full functionality, Fieldtester mode has to be enabled first. Otherwise it works in LinkCheck mode.

If NodeRED is an option for you I can share the flow.

1 Like

I have a node red server to try.
But I can probably also use the flow to see what data is needed to make it work. I’m a bit stuck in what the data bytes mean and what the plus wants back for ti to work correctly.

Maybe this helps, it is an extract of my “FieldTester Plus Parser”.

Loss rate calculation is not working well, it depends on fCnt and an internal counter of the flow.

Switch Fieldtester from LinkCheck to Fieldtester Plus Function

By default the Fieldtester works in LinkCheck mode.
To switch to Fieldtester Plus functionality the Gateway Extension will send a downlink on fPort 10.
When using other back-ends, this downlink must be sent to force the Fieldtester into Fieldtester Plus mode;

Downlink (HEX) 76312E312E30
fPort 10

Uplink format

Byte 0 to 5 ==> Fieldtester location

// decode bytes    
var lonSign = (bytes[0] >> 7) & 0x01 ? -1 : 1;
var latSign = (bytes[0] >> 6) & 0x01 ? -1 : 1;
var encLat = ((bytes[0] & 0x3f) << 17) + (bytes[1] << 9) + (bytes[2] << 1) + (bytes[3] >> 7);
var encLon = ((bytes[3] & 0x7f) << 16) + (bytes[4] << 8) + bytes[5];

// get tester location
data.latitude = latSign * (encLat * 108 + 53) / 10000000;
data.longitude = lonSign * (encLon * 215 + 107) / 10000000;

Byte 6 & 7 ==> unused in this decoder

Byte 8 & 9 ==> packet number, used for calculation of packet loss rate

Downlink format

Byte 0 & 1 ==> packet loss rate (calculated from fCnt and counter of NodeRED flow, not accurate)

// Get packet loss rate
var packet_num = bytes[8] << 8;
packet_num = packet_num + bytes[9];
var loss_rate = getLossRate(packet_num);

Byte 2 ==> max RSSI

if (gateway.rssi > data.max_rssi) data.max_rssi = gateway.rssi;

Byte 3 ==> min distance
Byte 4 ==> max distance

if ((data.has_gps) && (gateway.location)) {
    var distance = parseInt(circleDistance(data, gateway.location));
    node.warn("Calc distance " + distance);
    if (distance < data.min_distance) data.min_distance = distance;
    if (distance > data.max_distance) data.max_distance = distance;
}

Byte 5 ==> number of gateways & sequenceID

((data.num_gateways << 4) & 0xFF) + (sequence_id >> 4),

Byte 6 ==> sequence ID

sequence_id & 0x0F,

Byte 7 ==> max SNR

if (gateway.snr > data.max_snr) data.max_snr = gateway.snr;

Byte 8 to 10 ==> last 3 digits of gateway ID. Normally the GW ID with the Fieldtester extension, here taken from the last gateway in the gateway list.

data.gw_id_1, data.gw_id_2, data.gw_id_3

Output buffer creation:

data.buffer = Buffer.from([
   (loss_rate >> 8) & 0x00FF,
   loss_rate & 0xFF,
   parseInt(data.max_rssi + 200, 10) & 0xFF,
   min_distance,
   max_distance,
   ((data.num_gateways << 4) & 0xFF) + (sequence_id >> 4), // create new GW number << 4 + sequenceID >> 4
   sequence_id & 0x0F,
   parseInt(data.max_snr, 10) & 0xFF,
   data.gw_id_1, data.gw_id_2, data.gw_id_3
])

I attached the whole flow here.

node-red-parse-uplink-flow.zip (2.3 KB)

From Chirpstack, the flow get’s its information from the MQTT broker of CS.
Here is an overview what fields it uses:

This is perfect thank you.
I can make this work with php and my database.