fix: prevent DXSmart disconnect race killing Write Config screen #37

Merged
koda merged 2 commits from schwifty/fix-dxsmart-disconnect-race into main 2026-03-23 00:49:30 +00:00
Collaborator

Summary

  • Ignore BLE disconnects during .connected state for DXSmart beacons (LED keeps flashing regardless of BLE)
  • Auto-reconnect when tapping "Write Config" if BLE dropped during confirmation
  • Includes beacon sort-by-RSSI, diagnostic log view, and provisioning status improvements from prior commits

Fixes the issue where DX-Smart CP28 drops BLE immediately after auth, causing the disconnect handler to stomp .connected.failed before the user sees the Write Config button.

## Summary - Ignore BLE disconnects during `.connected` state for DXSmart beacons (LED keeps flashing regardless of BLE) - Auto-reconnect when tapping "Write Config" if BLE dropped during confirmation - Includes beacon sort-by-RSSI, diagnostic log view, and provisioning status improvements from prior commits Fixes the issue where DX-Smart CP28 drops BLE immediately after auth, causing the disconnect handler to stomp `.connected` → `.failed` before the user sees the Write Config button.
koda added 2 commits 2026-03-23 00:49:26 +00:00
KBeaconProvisioner had no onStatusUpdate callback, so the UI showed a static
"Connecting..." message during the entire auth cycle (5 passwords × 5s timeout
× 3 retries = 75s of dead silence). Now reports each phase: connecting,
discovering services, authenticating (with password attempt count), writing,
saving.

Also fixed ScanView disconnect handler to cover .writing and .verifying states —
previously only handled .connecting/.connected, so a mid-write disconnect left
the UI permanently stuck.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
After DXSmart auth completes, the beacon often drops BLE connection
due to aggressive timeouts. The disconnect handler was treating this
as a failure, stomping the .connected state before the user could see
the "Write Config" button.

Changes:
- Ignore BLE disconnects during .connected state for DXSmart beacons
  (the LED keeps flashing regardless of BLE connection)
- Auto-reconnect in writeConfigToConnectedBeacon() if BLE dropped
  while waiting for user confirmation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
koda merged commit 6eaccb6bf6 into main 2026-03-23 00:49:30 +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#37
No description provided.