
Documentation Center
Figure 72: Chirpstack downlink configuration
In this guide, the downlink is only created when the Field Tester is connected through a Chirpstack server. When
TTN or Helium is used, the downlink would be created by the original backend server.
This is controlled by the “Fields used” where you can see the IS_CHIRPSTACK.
The Payload Encoder is preparing a downlink packet that will be sent back to the RAK10701 Field Tester. The
downlink packet is only 6 bytes large to avoid problems in LoRaWAN regions with limited downlink packet sizes.
This is the complete decoder script. The first byte is usually a counter, but it works well if the counter is ignored
and always set to 1.
so that the proper EUIs and KEY will match the one in the
network server.
Configuration of RAK10701-P Using WisToolBox
function
Encoder
(
measurements
,
port
)
{
var
buf
=
[];
buf
[
0
]
=
1
;
buf
[
1
]
=
measurements
.
MINRSSI
.
value
+
200
;
buf
[
2
]
=
measurements
.
MAXRSSI
.
value
+
200
;
// var temp = parseInt(measurements.MINMOD.value,10);
if
(
measurements
.
MINMOD
.
value
==
0
)
{
measurements
.
MINMOD
.
value
=
1
;
}
console
.
log
(
measurements
.
MINMOD
.
value
);
buf
[
3
]
=
measurements
.
MINMOD
.
value
;
if
(
measurements
.
MAXMOD
.
value
==
0
)
{
measurements
.
MAXMOD
.
value
=
1
;
}
buf
[
4
]
=
measurements
.
MAXMOD
.
value
;
buf
[
5
]
=
measurements
.
NUM_GW
.
value
;
return
buf
;
}
js