Payfrit Beacon iOS
Find a file
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
_backup Add ios-marketing idiom, iPad orientations, launch screen 2026-02-10 19:38:11 -08:00
PayfritBeacon fix: add response gating between BLE writes to prevent beacon disconnects 2026-03-22 03:08:53 +00:00
PayfritBeacon.xcodeproj Add UUIDFormatting.swift to Xcode project 2026-03-21 15:23:43 -07:00
.gitignore Initial commit: Payfrit Beacon iOS native app 2026-02-01 23:39:29 -08:00
ExportOptions.plist Add ios-marketing idiom, iPad orientations, launch screen 2026-02-10 19:38:11 -08:00
ExportOptionsLocal.plist Add ios-marketing idiom, iPad orientations, launch screen 2026-02-10 19:38:11 -08:00
Podfile Rewrite app: simplified architecture, CoreLocation beacon scanning, UI fixes 2026-02-04 22:07:39 -08:00
Podfile.lock Rewrite app: simplified architecture, CoreLocation beacon scanning, UI fixes 2026-02-04 22:07:39 -08:00
QA_WALKTHROUGH.md Initial commit: Payfrit Beacon iOS native app 2026-02-01 23:39:29 -08:00