Skip to content

fix(peripheral_py): don't send BUSY on decryption/replay failure#36

Merged
tdaira merged 1 commit into
mainfrom
fix-busy-on-decrypt-failure
Jun 21, 2026
Merged

fix(peripheral_py): don't send BUSY on decryption/replay failure#36
tdaira merged 1 commit into
mainfrom
fix-busy-on-decrypt-failure

Conversation

@tdaira

@tdaira tdaira commented Jun 21, 2026

Copy link
Copy Markdown
Owner

The Python reference peripheral (peripheral_py/server.py) sent ERROR(BUSY 0x02) on a decryption/replay failure. BUSY means "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 reserves BUSY for the work-slot-busy case only. Surfaced by a docs↔code consistency audit (the docs document BUSY = "no free request slot; retry").

  • Drop silently on decrypt/replay failure (log only), no ERROR container.
  • Remove the now-unused BLERPC_ERROR_BUSY import.

🤖 Generated with Claude Code

https://claude.ai/code/session_018EftTExTFnG1spsM67n1it

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
@tdaira
tdaira merged commit d5cc1bd into main Jun 21, 2026
7 checks passed
@tdaira
tdaira deleted the fix-busy-on-decrypt-failure branch June 21, 2026 11:10
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.

1 participant