Greetings all. I am working with an older Tektelic Agriculture sensor and am having trouble with decoding in the codec. The sensor is connected to Chirpstack and I am able to read data without issue and send downlink commands via MQTT. When the uplink is invoked immediately following a downlink invocation, the codec is unable to process the input stating that it is unable to decode the header. It is not clear to me where the data passed into decodeUplink originates. Can anyone point me in the right direction?
Downlink invocation:
mosquitto_pub -t "application/XXXXXXXXX/device/YYYYYYYYYYYYY/command/down" \
-h localhost \
-p 1883 \
-m '{"devEui":"YYYYYYYYYYYYY, "confirmed": false, "fPort": 100, "object": { "periodic_tx_config": { "tick_per_relative_humidity": { "write": 1} } } }'
Response from encodeDownlink():
{"bytes":[163,0,1]}
Sample decodeUplink input:
{"bytes":[83,198,44,80],"fPort":100,"recvTime":"2024-07-17T19:39:32.396Z","variables":{}}
The decodeUplink function is too large to paste into the post but it was borrowed from the Tektelic Kiwi/Clover decoder on github.
Any guidance would be greatly appreciated. Thank you.