fix(peripheral_py): don't send BUSY on decryption/replay failure#36
Merged
Conversation
The Python reference peripheral sent ERROR(BUSY 0x02) when decryption or replay validation failed. BUSY signals "retry", but an identical encrypted payload fails decryption identically on every retry, so a spec-honoring central would loop forever. Match the firmware (ble_service.c), which drops a decryption failure silently and reserves BUSY for the work-slot-busy case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018EftTExTFnG1spsM67n1it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Python reference peripheral (
peripheral_py/server.py) sentERROR(BUSY 0x02)on a decryption/replay failure.BUSYmeans "retry", but an identical encrypted payload fails decryption identically every time — a spec-honoring central would loop forever.This matches the firmware (
peripheral_fw/src/ble_service.c), which drops a decryption failure silently and reservesBUSYfor the work-slot-busy case only. Surfaced by a docs↔code consistency audit (the docs documentBUSY= "no free request slot; retry").BLERPC_ERROR_BUSYimport.🤖 Generated with Claude Code
https://claude.ai/code/session_018EftTExTFnG1spsM67n1it