Codec for Dragino LHT65 and LDS02

I am struggeling with recieving data from these sensors. I have tried several codecs, but no one seems to work. They connects and uplinks OK, but I get the following error in the log:

  • level:“ERROR”
  • code:“UPLINK_CODEC”
  • description:“Exception generated by quickjs”

Does anybody have a working codec for these devices?

It means your codec has Javascript error.

For LHT65N, you may try this codec.

For LDS02, try this.

Thankyou very much. This codec works. :grinning: :grinning:

1 Like

Hi again
The codec for lht65 vorks fine, but the codec for lds02 does not. I get the following error:
Details: 2024-04-24 18:07:50


    • time:“2024-04-24T16:07:50.626317280+00:00”
    • :arrow_forward:

deviceInfo:{} 10 keys
* tenantId:“52f14cd4-c6f1-4fbd-8f87-4025e1d49242”
* tenantName:“ChirpStack”
* applicationId:“e13195f2-dd3c-46c6-95b0-a1c1f636b0b0”
* applicationName:“Dragino door sensors”
* deviceProfileId:“872f981e-c2cd-44e0-88e9-839e9e021021”
* deviceProfileName:“Dragino door sensors”
* deviceName:“Toiletdør”
* devEui:“a84041e781830ccc”
* deviceClassEnabled:“CLASS_A”
* tags:{} 0 keys

  • level:“ERROR”
  • code:“UPLINK_CODEC”
  • description:“Exception generated by quickjs”
  • :arrow_forward:

context:{} 1 key
* deduplication_id:“fcb0ebfe-8ae4-4f2a-bf14-0fb3f60a82a5”

What is the version of your ChirpStack?
ChirpStack v4.7 should show more detail of the error.

The codec for LDS02 looks correct to me.
However, I don’t have the LDS02 to test.
Please show your Data in hex so I can check in free time.

Hi there, thanks for your help.
I am running a RAK2744 on a Raspberry Pi Zero W and the Firmvare is ChirpStack Gateway OS 4.3.2 Full. This is the latest on the download page for Raspberry Pi.

My data is data:“DEIBAAABAAAAAA==”

I is very strange, because the Codec for my LHT65 worked fine for a while but now it gives the same error again. The only change I made was a reboot.

My data for the LHT65 is * data:“ywEE+AJeAQMyf/8=”

A picture worths a thoudsand words.

1 Like

For the LDS02

And for the LHT65

You capture an incorrect packet for LDS02 as I can see the fport=0
fPort=0 means MAC commands not uplinks.
Check for those with fport >0
And check in the Events tab.

Choose Javascript functions

The packet for LHT65N is correct.
The codec should work.
Generally, I want the whole list of packets to debug.
Just like in the picture.

Thank you for your help in this. As you confirmed, the Codecs were working, the fault must have been elsewhere, so I flashed a new SD cars, and now everithing works :grinning: :grinning:.

1 Like