Skip to content

Conversation

@puddly
Copy link
Contributor

@puddly puddly commented Oct 6, 2025

Some devices, like the ZBT-2, send a single NAK if you connect to them immediately after the firmware starts. Sending more than one reset frame seems to flush enough buffers to "break through" and properly reset the device on the first try.

@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.52%. Comparing base (6972103) to head (55c2009).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #689   +/-   ##
=======================================
  Coverage   99.51%   99.52%           
=======================================
  Files          58       58           
  Lines        3958     3960    +2     
=======================================
+ Hits         3939     3941    +2     
  Misses         19       19           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheJulianJES
Copy link
Contributor

Some devices, like the ZBT-2, send a single NAK. [...] Sending more than one reset frame seems to flush enough buffers to "break through"

Do we know why this is apparently specific to ZBT-2? Just the ESP32 USB/serial bridge being a bit slower upon startup?

Copy link
Contributor

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In before resetting during the start of a reset breaks some coordinators with ancient firmware versions 😄

Should be good

@puddly
Copy link
Contributor Author

puddly commented Oct 7, 2025

I've tested all of the adapters I have, including a few newer dual protocol sticks and the old HUSBZB-1, both with the 115200 and the 57600 firmwares. The triple reset works on every stick. Some other adapters that required two attempts with the old behavior now work on the first try so I think this is about as well-tested as I can manage 😄.

@puddly puddly merged commit b3448b9 into zigpy:dev Oct 7, 2025
14 checks passed
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