Skip to content

refactor(dragino): align decoders and metadata with official decoder library - #1095

Open
Lance-dragino wants to merge 5 commits into
TheThingsNetwork:masterfrom
Lance-dragino:refactor/dragino-align-with-official
Open

Lance-dragino wants to merge 5 commits into
TheThingsNetwork:masterfrom
Lance-dragino:refactor/dragino-align-with-official

Conversation

@Lance-dragino

Copy link
Copy Markdown

Summary

Align four Dragino devices in vendor/dragino with the official decoder library,
so the decoded output matches the vendor reference field by field.

Device Firmware Change
cpl01 1.0 restore LAST_DISCONNECT_DURATION; add Node_type on fPort 2/4
ldds75 1.2.0 / 1.1.4 / abp 1.1.1 split codecs by payload format (8-byte vs 5-byte)
wsc1-l 1.0 / 1.3.1 explicit error for unsupported frame types; add 1.3.1 codec
lht52 1.0 fPort 3 returns DATALOG; add Node_type; unsigned Systimestamp

Breaking changes

  • ldds75: distance → Distance; the 5-byte codec now also emits Bat and
    Interrupt_status
  • lht52: fPort 3 output is now a DATALOG string instead of a status text
  • cpl01: DISCONNECT_DURATION → LAST_DISCONNECT_DURATION

Notes

  • Node_type is added only on the branches where the official decoder emits it
    (cpl01 fPort 2/4, lht52 all branches, ldds75 fPort 2).

  • lht52 fPort 3 has no codec example because the decoder formats timestamps in
    local time, which would make validation environment-dependent. Verified manually
    with payload 08CD0220 7FFF01 61CD4EDD:

    DATALOG = "[22.53,54.4,327.67,1,2021-12-30 14:17:01],"
    

    The instant is 1640845021; the string reflects the machine's local time
    (UTC+8 here). CI runs in UTC and renders the same instant as
    2021-12-30 06:17:01.

  • wsc1-l 1.3.1 is a new firmware entry: V1.3.1 changed the payload by adding
    the maximum and average wind speed values. Firmware 1.0–1.3.0 keeps
    wsc1-l-codec.

Verification

  • make validate VENDOR_ID=dragino passes
  • each codec example verified against the decoder output
  • negative cases (unknown fPort, unsupported frame type) return errors

…th official decoder

Firmware 1.2.0 carries the same payload as 1.1.4 (the changelog lists no payload change for 1.2.0), so the 1.2.0 entry now references ldds75-114-codec. ldds75-codec is restored to the 5-byte format used by firmware <= 1.1.2 and is only referenced by the abp 1.1.1 entry.
… types

Unsupported frame types (bytes[0] >= 0xE0) previously fell through to
{ data: undefined }, so the platform showed neither data nor an error.
They now return { errors: [...] } with the offending frame type.
Payload changed in V1.3.1 (changelog: Increase the maximum wind speed value
and average wind speed value). Firmware 1.0-1.3.0 keeps wsc1-l-codec.
@CLAassistant

CLAassistant commented Nov 17, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants