fix: three provisioning bugs causing beacon write failures #40

Merged
schwifty merged 1 commit from schwifty/fix-provisioning-bugs into main 2026-03-23 03:03:59 +00:00
Collaborator

Summary

  • Minor=0 bug: API returning null/0 for minor was silently accepted. Now throws an error so the user knows the service point config is bad.
  • DXSmart write timeout: Frame1_DevInfo was failing because the beacon BLE stack was stressed from 15 failed KBeacon auth attempts. Added per-command retry, increased inter-command delay (200ms→500ms), increased post-auth settle (100ms→500ms), and added 2s cooldown between fallback provisioner attempts.
  • Duplicate KBeacon password: Password 5 was identical to password 3 — replaced with "000000" (6-char variant).

Test plan

  • Provision a DX-Smart beacon that was previously failing
  • Verify minor allocation error shows meaningful message when API returns 0
  • Confirm KBeacon auth tries 5 unique passwords
  • Check DXSmart write sequence completes without timeout on 2nd command

🤖 Generated with Claude Code

## Summary - **Minor=0 bug**: API returning null/0 for minor was silently accepted. Now throws an error so the user knows the service point config is bad. - **DXSmart write timeout**: Frame1_DevInfo was failing because the beacon BLE stack was stressed from 15 failed KBeacon auth attempts. Added per-command retry, increased inter-command delay (200ms→500ms), increased post-auth settle (100ms→500ms), and added 2s cooldown between fallback provisioner attempts. - **Duplicate KBeacon password**: Password 5 was identical to password 3 — replaced with "000000" (6-char variant). ## Test plan - [ ] Provision a DX-Smart beacon that was previously failing - [ ] Verify minor allocation error shows meaningful message when API returns 0 - [ ] Confirm KBeacon auth tries 5 unique passwords - [ ] Check DXSmart write sequence completes without timeout on 2nd command 🤖 Generated with [Claude Code](https://claude.com/claude-code)
schwifty added 1 commit 2026-03-23 02:29:30 +00:00
1. Minor allocation: reject minor=0 from API instead of silently using it.
   API returning null/0 means the service point isn't configured right.

2. DXSmart write reliability:
   - Add per-command retry (1 retry with 500ms backoff)
   - Increase inter-command delay from 200ms to 500ms
   - Increase post-auth settle from 100ms to 500ms
   - Add 2s cooldown in FallbackProvisioner between provisioner attempts
   The beacon's BLE stack gets hammered by KBeacon's 15 failed auth
   attempts before DXSmart even gets a chance. These timings give it
   breathing room.

3. KBeacon passwords: password 5 was a duplicate of password 3
   (both "1234567890123456"). Replaced with "000000" (6-char variant).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
schwifty merged commit 5678256356 into main 2026-03-23 03:03:59 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: payfrit/payfrit-beacon-ios#40
No description provided.