How to decode payload data on Chirpstack?

I am using the example code, LoraWan_HDC1080, which is successfully sending data to Chirpstack. The payload is on base64: data:“pHDFQc3Mg0IQmQ==”

unsigned char *puc;

puc = (unsigned char *)(&temperature);
appDataSize = 10;
appData[0] = puc[0];
appData[1] = puc[1];
appData[2] = puc[2];
appData[3] = puc[3];

puc = (unsigned char *)(&humidity);
appData[4] = puc[0];
appData[5] = puc[1];
appData[6] = puc[2];
appData[7] = puc[3];

appData[8] = (uint8_t)(batteryVoltage>>8);
appData[9] = (uint8_t)batteryVoltage;

Can anyone give some advice on what kind of encoding this is or how I would decode the data?

You can refer to this decoding method.

Yes I saw it but for chirpstack the image is cropped so I can’t see all the code.

I don’t understand what you mean, take a screenshot.

I am following this steps:

but I think that the picture miss other part.

True, there’s something missing, but that’s not very important. The main thing is to know the setting position of the decoding. The decoded code needs to correspond to the code of the node by itself.

1 Like

go through this and you will understand it…


1 Like

Thank you I will read that.