Not decode payload

Dear all,
I have problem with some device that not decode the payload so I can’t see data, see the attached:

I have this problem with Moko LW004-PM and Milesight EM300-TH

How can I resolve it?

Thank you and best regards,
D

Hi,

take a look of these link;

Regards.

I try to paste code on codec device profile but not decode payload. It’s right to paste code on codec? I need to remove device before?

thanks
D

Sorry, I paste code of Milesight EM300-TH and now decode data correctly but for MOKO LW004 I try all code but I can’t see decoded data.

Hi,

No you don’t have to remove the device… you just have to complete your mods under codec in the device profile.

If you use ChirpStack V4…

Here’s what I did.

  1. copy the codec V3: MOKOSMART-LoRaWAN-Product-Decoder/LW004-PB/V3 Version/LW004-PB V3 on Chirpstack.js at main · LoRaWAN-Product-Decoder/MOKOSMART-LoRaWAN-Product-Decoder · GitHub

  2. modifications to the codec must be done for V4 just before line 63 add;

function decodeUplink(input) {
const decodedInput = {
data: Decode(input.fPort, input.bytes),
warnings: ,
errors:
};
return {data: decodedInput.data};
}

image

and then you should have something like this under Events

image

This changes is only for V4 … I haven’t tested V3

Regards