Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: MLR-HB REV1.0

...

Encoder/Decoder Application

Download

mlrt-hb-p-payload-decoder.png

 

NOTES:
Following the download of the respective exe payload tool, you may have to grant Windows access to use the tool.
Nach dem Download des entsprechenden Exe-Payload-Tools müssen Sie möglicherweise Windows-Zugriff gewähren, um das Tool verwenden zu können.

WidowsSicherheit-ZugriffZulassen-20240305-130153.png

MLR-HB-PiEU-AR REV 01.0

.exe Application

View file
nameMLR-HB-P_payload_tool_mlr_hb_2024.0406.1920.0403.exe

MLR-HB-PiEU-AR REV 0.0

Javascript file

View file
namemlr-hb-p-decoder.js

Use the above script (mlr-hb-p-decoder.js) to decode the packets coming from Multitech Gateway

Eg. The MULTITECH Gateway sends the following JSON Output via MQTT

Code Block
languagejson
{    "tmst":1032057036,
     "chan":6,
     "rfch":1,
     "freq":867.7,
     "stat":1,
     "modu":"LORA",
     "datr":"SF10BW125",
     "codr":"4/5",
     "lsnr":9.5,
     "rssi":-53,
     "opts":"",
     "size":6,
     "fcnt":26,
     "cls":0,
     "port":1,
     "mhdr":"403f35f601801a00",
     "data":"AAAzMgGA",
     "appeui":"31-27-9a-c1-1e-c0-70-00",
     "joineui":"31-27-9a-c1-1e-ca-20-00",
     "deveui":"36-38-37-34-66-32-6f-18",
     "devaddr":"01f6353f",
     "ack":false,
     "adr":true,
     "gweui":"00-80-00-00-00-01-8c-8a",
     "seqn":26,
     "time":"2024-05-08T09:34:03.030289Z"}

The payload is present in the "data" field as a base64 value

Code Block
languagejson
"data":"AAAzMgGA"

The base64 value is converted to HEX and the output is decoded using the "decode_MLRT_HB_P_Uplink" function

The "decode_MLRT_HB_P_Uplink" function uses HEX Payload as input

"data":"AAAzMgGA" in HEX

Code Block
languagetext
# HEX BUFFER : [0x00, 0x00, 0x33, 0x32, 0x01, 0x80]
# In DECIMAL : [0, 0, 51, 50, 1, 128]

Example Decoded Output:

Code Block
languagetext
Sensor_1_Raw: 0
Sensor_1_Offset: 0
Sensor_2_Raw: 25.5
Sensor_2_Offset: 25
Energy_Storage: 0
Radio_Communication_Error: 0
Received_Signal_Strength: 0
Sensor_2_Failure: 0
Sensor_1_Failure: 1
Storage_Voltage: 2.56