Skip to content

feat: multi-device support — unique service UUID, identify-on-reconnect, broadcast challenge#18

Merged
HMAKT99 merged 1 commit into
mainfrom
feature/multi-device-support
Apr 16, 2026
Merged

feat: multi-device support — unique service UUID, identify-on-reconnect, broadcast challenge#18
HMAKT99 merged 1 commit into
mainfrom
feature/multi-device-support

Conversation

@HMAKT99

@HMAKT99 HMAKT99 commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes three root causes that together made multi-phone scenarios broken:

  1. Per-Mac unique BLE service UUID — each Mac generates a UUID on first run (DaemonConfig), stored in ~/Library/Application Support/TouchBridge/config.json. Phones now only connect to their paired Mac, not every TouchBridge Mac in range.
  2. Identify-on-reconnect — paired device sends an encrypted identify message after ECDH; daemon recognises it without re-pairing. Fixes auth always failing after Mac reboot (deviceID was lost from session).
  3. Broadcast challenges — all identified paired devices get challenged simultaneously; first valid response wins. Others expire naturally.

Re-raised: was PR #16, auto-closed when base branch was deleted after merging PR #15.

Test plan

  • Pair two iPhones to same Mac — both get prompted on sudo
  • Reboot Mac, reconnect — auth works without re-pairing
  • Two Macs running TouchBridge nearby — phone only connects to its paired Mac

@HMAKT99 HMAKT99 merged commit 3c0b7de into main Apr 16, 2026
2 of 3 checks passed
@HMAKT99 HMAKT99 deleted the feature/multi-device-support branch April 16, 2026 03:15
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