Need to know how to get base64 string from UDP packet

The ASCII string of “QLf6fgCARgACmxIa94UrV0S8+DRRAUxV” was extracted from Dragino LoRA sensor LHT65, and I get string of “y7IJAwCaAQIgf/8=” from local chirpstack applicatino server webGUI. How do I calculate ASCII string to “y7IJAwCaAQIgf/8=”?

Since LoRaWAN has end-to-end encryption between the LNS and LoRa node, you cannot get the plaintext data at the gateway side. In both cases, the data is Base64-encoded. So you need to decode the data first, before you can get the bytes to start working on.

Chirpstack’s LoRaWAN frames section will show the encrypted FRMPayload.

Depending on what the software in the Dragino gateway was displaying, this could be either the GWMP (the protocol used by UDP Packet Forwarder) messages or the LoRaWAN messages. GWMP can be seen as the gateway’s protocol, which will transfer LoRaWAN messages over some other medium like 4G.