payfrit-beacon-ios/PayfritBeacon
Schwifty 41c26acad3 fix: add response gating between BLE writes to prevent beacon disconnects
Root cause: iOS was firing the next GATT command as soon as the BLE write
ACK arrived, without waiting for the beacon's FFE1 notification response.
Android explicitly waits up to 1s for the beacon to respond (via
responseChannel.receive) before sending the next command. This gives the
beacon MCU time to process each command before the next one arrives.

Without this gate, the beacon gets overwhelmed and drops the BLE connection
(supervision timeout), causing the "DX Smart command characteristic" error
John reported after repeated disconnects.

Changes:
- Add awaitingCommandResponse flag + 1s response gate timer
- After each FFE2 write success, wait for FFE1 notification before advancing
- If no response within 1s, advance anyway (some commands don't respond)
- Check for 4E 4F 00 rejection pattern (matches Android)
- Clean up gate timer on disconnect, cleanup, and state resets

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 03:08:53 +00:00
..
Assets.xcassets Add ios-marketing idiom, iPad orientations, launch screen 2026-02-10 19:38:11 -08:00
en.lproj Rewrite app: simplified architecture, CoreLocation beacon scanning, UI fixes 2026-02-04 22:07:39 -08:00
Api.swift feat: multi-password auth, structured error codes, missing API endpoints 2026-03-21 10:31:39 +00:00
BeaconBanList.swift refactor: consolidate UUID formatting into shared String extension 2026-03-21 10:02:58 +00:00
BeaconProvisioner.swift fix: add response gating between BLE writes to prevent beacon disconnects 2026-03-22 03:08:53 +00:00
BeaconScanner.swift refactor: consolidate UUID formatting into shared String extension 2026-03-21 10:02:58 +00:00
BeaconShardPool.swift Add ios-marketing idiom, iPad orientations, launch screen 2026-02-10 19:38:11 -08:00
BLEBeaconScanner.swift Migrate API endpoints from CFML to PHP 2026-03-14 17:17:02 -07:00
BusinessListView.swift Add ios-marketing idiom, iPad orientations, launch screen 2026-02-10 19:38:11 -08:00
DebugLog.swift Fix DX-Smart provisioning protocol and add debug logging 2026-03-04 20:01:12 -08:00
DevBanner.swift Rewrite app: simplified architecture, CoreLocation beacon scanning, UI fixes 2026-02-04 22:07:39 -08:00
Info.plist Migrate API endpoints from CFML to PHP 2026-03-14 17:17:02 -07:00
LoginView.swift Rewrite app: simplified architecture, CoreLocation beacon scanning, UI fixes 2026-02-04 22:07:39 -08:00
payfrit-favicon-light-outlines.svg Rewrite app: simplified architecture, CoreLocation beacon scanning, UI fixes 2026-02-04 22:07:39 -08:00
PayfritBeaconApp.swift Fix DX-Smart provisioning protocol and add debug logging 2026-03-04 20:01:12 -08:00
RootView.swift Add ios-marketing idiom, iPad orientations, launch screen 2026-02-10 19:38:11 -08:00
ScanView.swift fix: show live provisioning progress + improve disconnect resilience 2026-03-22 02:38:36 +00:00
ServicePointListView.swift refactor: consolidate UUID formatting into shared String extension 2026-03-21 10:02:58 +00:00
UUIDFormatting.swift refactor: consolidate UUID formatting into shared String extension 2026-03-21 10:02:58 +00:00