Summary
tagxlv1.CompareConfiguration returns errConfigurationUnsupportedCommand for any Tag XL settings downlink that carries a device action TLV. Such a campaign can therefore never produce a comparison result — only an error.
Detail
parseConfigurationSent looks every TLV of the sent downlink up in setterSpecs and hard-fails on a miss — pkg/decoder/tagxl/v1/configuration_match.go:117:
spec, ok := setterSpecs[tag]
if !ok {
return "", nil, errConfigurationUnsupportedCommand
}
setterSpecs (pkg/decoder/tagxl/v1/port151.go:81) holds only the setter tags 0x20–0x28. The firmware's action tags are absent:
| Tag |
Action (ts2 app/tracker/lorawan_proto.h) |
0x81 |
kLoraWanTlvTagResetDevice |
0x82 |
kLoraWanTlvTagScanNow |
0x83 |
kLoraWanTlvTagClearStorage |
0x84 |
kLoraWanTlvTagWipeAll |
So a valid downlink such as 4c 0a 02 21 04 0078 0e10 81 00 (set intervals + reset) errors out instead of being compared. The current behaviour is pinned for 0x80 by configuration_match_test.go:186.
Why this surfaces now
A pending Tag XL firmware fix (ts2) makes the device emit its port-151 settings reply before it reboots, and makes TLV order within a frame irrelevant. Previously a reset-bearing downlink produced no reply at all, so the comparator never got the chance to be wrong. Now the evidence arrives and the comparator throws it away.
Proposed change
- Add an action-tag set alongside
setterSpecs. parseConfigurationSent consumes and length-checks them (all zero-length) but does not append them to requestedSetters nor to the reconstructed TLV payload — they carry no observable state. Keep rejecting duplicates.
- Add a fourth outcome to
ConfigurationComparison, e.g. ConfigurationNotVerifiable, for a payload that parses cleanly but contains no setter. Today that is errConfigurationNoSetter (configuration_match.go:138), which callers cannot tell apart from a malformed payload. A reset-only campaign is exactly this case.
Tests to add
- setter + action mixed payload matches against the echo (
4c...21 04 0078 0e10 81 00 vs 4c...41 04 0078 0e10)
- action-only payload returns not-verifiable rather than an error
- an unknown, non-action tag still errors
Summary
tagxlv1.CompareConfigurationreturnserrConfigurationUnsupportedCommandfor any Tag XL settings downlink that carries a device action TLV. Such a campaign can therefore never produce a comparison result — only an error.Detail
parseConfigurationSentlooks every TLV of the sent downlink up insetterSpecsand hard-fails on a miss —pkg/decoder/tagxl/v1/configuration_match.go:117:setterSpecs(pkg/decoder/tagxl/v1/port151.go:81) holds only the setter tags0x20–0x28. The firmware's action tags are absent:app/tracker/lorawan_proto.h)0x81kLoraWanTlvTagResetDevice0x82kLoraWanTlvTagScanNow0x83kLoraWanTlvTagClearStorage0x84kLoraWanTlvTagWipeAllSo a valid downlink such as
4c 0a 02 21 04 0078 0e10 81 00(set intervals + reset) errors out instead of being compared. The current behaviour is pinned for0x80byconfiguration_match_test.go:186.Why this surfaces now
A pending Tag XL firmware fix (ts2) makes the device emit its port-151 settings reply before it reboots, and makes TLV order within a frame irrelevant. Previously a reset-bearing downlink produced no reply at all, so the comparator never got the chance to be wrong. Now the evidence arrives and the comparator throws it away.
Proposed change
setterSpecs.parseConfigurationSentconsumes and length-checks them (all zero-length) but does not append them torequestedSettersnor to the reconstructed TLV payload — they carry no observable state. Keep rejecting duplicates.ConfigurationComparison, e.g.ConfigurationNotVerifiable, for a payload that parses cleanly but contains no setter. Today that iserrConfigurationNoSetter(configuration_match.go:138), which callers cannot tell apart from a malformed payload. A reset-only campaign is exactly this case.Tests to add
4c...21 04 0078 0e10 81 00vs4c...41 04 0078 0e10)