phyPayload decryption method

Issue: Find a way to decode phyPayload without using TTN and ChirpStack

Setup: Using LoRa Gateway MQTT bridge protocol

LoRa® Server: loraserver 3.x (JSON-V3)

Details: I have successfully sent data through Lora gateway by uplink topic to my MQTT broker address. From the MQTT I have sent the data to database through http. Below is an example of the data:

{“phyPayload”:“QAEAAAKAQAAIcOtyV9HTTrZBwn2x”,“txInfo”:{“frequency”:923600000,“modulation”:“LORA”,“loRaModulationInfo”:{“bandwidth”:125,“spreadingFactor”:10,“codeRate”:“4/5”,“polarizationInversion”:false}},“rxInfo”{“gatewayID”:“YMWo//5xqe8=”,“rssi”:-15,“loRaSNR”:12,“channel”:2,“rfChain”:0,“board”:0,“antenna”:0,“location”:null,“fineTimestampType”:“NONE”,“context”:“fMZuQg==”,“uplinkID”:“sCERXyJcRHSchK4mPIPaYg==”}}

From the data, I have converted the phyPayload (in base 64) to hex by using PHP code.

For example from the above data, QAEAAAKAQAAIcOtyV9HTTrZBwn2x convert to 40010000028040000870EB7257D1D34EB641C27DB1

My problem is, I want to get sensor data (Humidity, Temperature, Pressure, etc) from the above phyPayload data to display on my application web. I try to decode it using PHP but not successfully.

Can anyone give me an example or documentation about it? Thank you.

Refer this document:https://doc.rakwireless.com/rak7204-lora-environmental-sensor/analyzing-the-data-from-rak7204
You can share your detailed analysis,we can work together on this great project.
My E-mail:[email protected]

That’s a LoRaWAN air packet, containing headers, encrypted application payload, and a cryptographic checksum.

It won’t make any sense or be able to be parsed into measurement fields, until you first parse the LoRaWAN packet structure and decrypt the contents using the appropriate application session key (probably you also want to verify the checksum using the network session key).

This is normally what a LoRaWAN server like chirpstack/lorasever (or TTN’s server) does for you. If you want to temporarily do it offline there are various LoRaWAN packet decoding libraries floating around.

But really, what is your goal? To use a LoRaWAN node you need a LoRaWAN server, while you can write your own server (been there, done that) there’s no point in doing so until you have identified something you need which existing offerings do not supply.