Empty field "objectJSON"

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

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.

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

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.