Hi guys, I set up my loraserver successfully and it works perfect.
The problem is when I am using my own custom js Encoder and Decoder as follows:
function Decode(fPort, bytes) {
var result = “”;
for (var i = 0; i < bytes.length; i++) {
result += String.fromCharCode(parseInt(bytes[i]));
}
return { “myValue”: result };
}
function Encode(fPort, obj) {
var str1 = obj.myValue;
var bytes = [];
for (var i = 0; i < str1.length; i++) {
var code = str1.charCodeAt(i);
bytes = bytes.concat([code]);
}
return bytes;
}
I can read my payload and string value using mosquitto_sub,
But my device not receiving the DOWNLINK payload, I can check this also on loraserver:
But If I remove my custom javascript Encoder & Decoder:
I still can read my payload using mosquitto_sub (but not seeing the real value),
My device is now getting the right DOWNLINK payload, I can check this on device, also on loraserver:
In am using the same payload values with UPLINK when I am setting DOWNLINK payload.
I created the same procedure on other lora server websites like ttn, everything works fine.
Please help me, guys, thanks.