konovalovMV
(Maksim Konovalov)
September 12, 2022, 9:46am
1
the device connects to the server. The message from the device has no data in the field “objectJSON”
In the device test firmware https://github.com/RAKWireless/WisBlock/blob/master/examples/RAK4630/communications/LoRa/LoRaWAN/LoRaWAN_OTAA_ABP/LoRaWAN_OTAA_ABP.ino
please tell me what is the problem
carlrowan
(Carl Rowan)
September 15, 2022, 4:30am
2
Hi @konovalovMV ,
It seems you have data value. But the the objectJSON: might be the decoded output so maybe you need to create a payload decoder? I just guessing here. I am not sure what network server you are using.
beegee
(Bernd Giesecke)
September 15, 2022, 4:50am
3
The payload says “Hello>ESC<”
A simple decoder like this
function Decode(fPort, bytes, variables) {
var result_string = ""; // = String.fromCharCode(...bytes);
for(var i = 0; i < bytes.length; ++i){
result_string+= (String.fromCharCode(bytes[i]));
}
var decoded = {};
decoded.String = result_string;
return decoded;
}
will give you the decoded string.
Where to place the decoder depends on the LoRaWAN server.
In Chirpstack you add the decoder to the Device-profile
1 Like
system
(system)
Closed
September 20, 2022, 5:44am
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.