Skip to content

fix: recover BLE re-identify fixes from #28 + pairing-request timing - #29

Merged
HMAKT99 merged 2 commits into
mainfrom
fix/recover-pr28-ble-reidentify
Jul 5, 2026
Merged

fix: recover BLE re-identify fixes from #28 + pairing-request timing#29
HMAKT99 merged 2 commits into
mainfrom
fix/recover-pr28-ble-reidentify

Conversation

@HMAKT99

@HMAKT99 HMAKT99 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Recovers the fixes from #28 (closed by the author, who noted they're no longer pursuing the project — thank you @Souitou-iop, this was excellent work). Their commit is cherry-picked with authorship preserved:

  • iOS: restored CoreBluetooth connections are cancelled and reconnected cleanly instead of being trusted with stale state
  • iOS: ECDH starts only after service discovery + notification subscriptions complete (replaces the fragile 0.5s delay)
  • Daemon: a session key arriving before the connect event now creates a recoverable session instead of the identify being dropped with 'no session crypto'
  • ProximityMonitor: injectable lock action — tests no longer run the real pmset displaysleepnow (which was sleeping the developer's display during test runs)
  • New regression test for the session-key-before-connect path

On top, one follow-up commit: the pairing request now goes out from the same readiness callback — sending it on raw connect had the identical race ECDH had.

Notably, #28's verification included a real-iPhone check: Face ID appeared over BLE and the daemon returned success.

Verification

  • daemon: 112 tests pass
  • protocol: unchanged
  • iOS app builds for simulator

Souitou-iop and others added 2 commits July 5, 2026 19:47
With ECDH now gated on characteristic readiness (#28), the pairing
request had the same race: PairingView sent it on the connect event,
before service discovery — the write would target a nil characteristic
and be dropped. The coordinator now sends it from the readiness
callback where discovery is guaranteed complete.
@HMAKT99
HMAKT99 merged commit 50e507c into main Jul 5, 2026
3 checks passed
@HMAKT99
HMAKT99 deleted the fix/recover-pr28-ble-reidentify branch July 5, 2026 14:21
@HMAKT99 HMAKT99 mentioned this pull request Jul 16, 2026
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