I used this code but with Chirpstack as my server instead of TTN so it's not an issue per-se, but just in case anyone else does the same thing. It gave me a decoder error when I checked the device log, and I found that Chirpstack V4 needs the decoder in a bit of a different format. When I used the format below it worked perfectly!
`function decodeUplink(input) {
return {
data: Decoder(input.bytes, input.fPort)
};
}
I used this code but with Chirpstack as my server instead of TTN so it's not an issue per-se, but just in case anyone else does the same thing. It gave me a decoder error when I checked the device log, and I found that Chirpstack V4 needs the decoder in a bit of a different format. When I used the format below it worked perfectly! `function decodeUplink(input) { return { data: Decoder(input.bytes, input.fPort) }; }
function Decoder(bytes) { var decoded = {};
}`