question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Packet decoding bug in deconz driver?

See original GitHub issue

Related to https://github.com/Koenkk/zigbee2mqtt/issues/12611#issuecomment-1240692790.

None of my IKEA remotes work in Z2M (they can pair just fine, but button presses are not recognized). I’m using Z2M with a ConBee (original, not model II). The exact same hardware combination works with deCONZ.

I dug a bit deeper and found out these in the logs:

2022-09-08T11:35:30.125Z zigbee-herdsman:deconz:frameParser DATA_INDICATION RESPONSE - seqNr. 59 srcAddr: 0xeaf8 destAddr: 0x0 profile id: 0x104 cluster id: 0x5 lqi: 255
2022-09-08T11:35:30.133Z zigbee-herdsman:controller:log Received 'zcl' data '{"frame":{"Header":{"frameControl":{"frameType":1,"manufacturerSpecific":true,"direction":0,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":31,"manufacturerCode":4476,"commandIdentifier":7},"Payload":{"value":257,"value2":13},"Command":{"ID":7,"parameters":[{"name":"value","type":33},{"name":"value2","type":33}],"name":"tradfriArrowSingle"}},"address":60152,"endpoint":1,"linkquality":255,"groupID":0,"wasBroadcast":true,"destinationEndpoint":53}'
2022-09-08T11:35:30.133Z zigbee-herdsman:controller:log 'zcl' data is from unknown device with address '60152', skipping...

So Z2M is seeing the zcl data but cannot find the source device, and skips it. But note that the source address is supposed to be the NWK, and what is being logged is definitely not the NWK. I re-paired the remote forcing a change of NWK but the address being logged is always the same. The address is 60152, or 0xEAF8. which will be significant later.

I then used Zshark to sniff into the network and confirmed that the address being logged is not the address in the packets: image

Note that the source address is always fixed as 0xEAF8. It matches specific bytes of the IEEE address. I am assuming that there’s a bug in the decoding logic here: https://github.com/Koenkk/zigbee-herdsman/blob/b4cdf8ba6935ca20aa6967e1a0afed32f320e64b/src/adapter/deconz/driver/frameParser.ts#L241 and it is extracting the wrong bytes from the packet.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Koenkkcommented, Nov 12, 2022

@ChrisHae is this something you could check?

0reactions
lbschenkelcommented, Dec 13, 2022

Please don’t close this. Any update, @Koenkk or @ChrisHae ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · Koenkk/zigbee-herdsman - GitHub
Packet decoding bug in deconz driver ? #576 opened on Sep 8 by lbschenkel · 19 · [WIP]: EFR32 EZSP adapter implementation and...
Read more >
My experience in converting from Deconz to Zigbee2mqtt
I have been running deconz for controlling my zigbee network before I was running Home Assistant. It was one of the addons for...
Read more >
Wireshark occasionally mucks up RxRPC/AFS packet decoding
Description of problem: Wireshark occasionally incorrectly decodes the operation ID in an RxRPC request packet. This is most noticeable in AFS FS requests, ......
Read more >
Phoscon / deCONZ Totalausfall - Benötige Hilfe - ioBroker Forum
Please use sysfs to set IO scheduler for individual devices. [ 0.000000] Dentry cache hash table entries: 131072 (order: 7 ...
Read more >
Bullseye - the new version of Raspberry Pi OS
New camera driver. The driver used by Raspberry Pi to access camera modules has now been replaced with libcamera, a standard Linux API....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found