Payload codec api

Hello,

The LoRa Alliance has written a standard about the payload codec api : TS013-1.0.0 Payload Codec API

Is Chirpstack compatible with this payload encoding/deconding specification? If not, when do you think implement it?

best regards,

Mathieu

Yes, ChirpStack uses the same API :slight_smile:

Great, where could we find the documentation to use this APi in chirpstack ?

The only thing you need to do is configuring a JavaScript code and paste in the encode / decode functions. See: Device profiles - ChirpStack open-source LoRaWAN® Network Server documentation

Hello,

in the code APi from lorawan the UlplinDecode is :

the documentation of chirpstack gives:
// Decode uplink function.
//
// Input is an object with the following fields:
// - bytes = Byte array containing the uplink payload, e.g. [255, 230, 255, 0]
// - fPort = Uplink fPort.
// - variables = Object containing the configured device variables.
//
// Output must be an object with the following fields:
// - data = Object representing the decoded payload.
function decodeUplink(input) {
return {
data: {
temp: 22.5
}
};
}

so it seems recvTime argument is not present to be compatible with API from lorawan.

best regards,

2 Likes

I need to look into this, could you create a GitHub issue for this: Issues · chirpstack/chirpstack · GitHub?