fix: address all issues from koda's code review #22

Closed
schwifty wants to merge 1 commit from schwifty/koda-review-fixes into schwifty/fresh-rebuild
Collaborator

Summary

Fixes all issues from @koda's side-by-side review against Android beacon app.

🔴 Critical Fixes

  • DXSmartProvisioner: Complete rewrite — was using made-up command IDs (0x50-0x60). Now matches Android's new SDK protocol: FFE2 writes, 4E4F protocol packets, correct commands (0x74 UUID, 0x75 Major, 0x76 Minor, etc), frame selection, with old SDK fallback (0x36-0x43 via FFE1)
  • BeaconShardPool: Replaced 71 pattern UUIDs with exact 64 production UUIDs from Android

🟡 Warning Fixes

  • BlueCharmProvisioner: Added 3 fallback write methods (FEA3 direct → FEA1 raw → FEA1 indexed) + legacy FFF0 support + 2 missing passwords (minew123, bc04p)
  • BeaconBanList: Added 4 missing prefixes + full UUID ban list + getBanReason() helper
  • Auth timing: 100ms delays (was 500ms, matches Android SDK timer)
  • MAC OUI: Documented iOS CoreBluetooth limitation for 48:87:2D detection

🔵 Info Fixes

  • Added get_beacon_config API endpoint for server-configured values
  • Unknown beacon type now tries KBeacon→DXSmart→BlueCharm fallback chain
  • Added readFrame2() for post-write verification

Remaining Items

  • verifyBroadcast still needs CLBeaconRegion + CLLocationManager implementation
  • No Xcode on this server — needs build verification

Test Plan

  • Build in Xcode — verify no compile errors
  • Test DXSmart provisioning with real CP28 hardware
  • Test BlueCharm with BC04P hardware (all 3 fallback methods)
  • Verify shard pool matches server allocations
  • Test unknown beacon fallback chain

🤖 Generated with Claude Code

## Summary Fixes all issues from @koda's side-by-side review against Android beacon app. ### 🔴 Critical Fixes - **DXSmartProvisioner**: Complete rewrite — was using made-up command IDs (0x50-0x60). Now matches Android's new SDK protocol: FFE2 writes, 4E4F protocol packets, correct commands (0x74 UUID, 0x75 Major, 0x76 Minor, etc), frame selection, with old SDK fallback (0x36-0x43 via FFE1) - **BeaconShardPool**: Replaced 71 pattern UUIDs with exact 64 production UUIDs from Android ### 🟡 Warning Fixes - **BlueCharmProvisioner**: Added 3 fallback write methods (FEA3 direct → FEA1 raw → FEA1 indexed) + legacy FFF0 support + 2 missing passwords (minew123, bc04p) - **BeaconBanList**: Added 4 missing prefixes + full UUID ban list + getBanReason() helper - **Auth timing**: 100ms delays (was 500ms, matches Android SDK timer) - **MAC OUI**: Documented iOS CoreBluetooth limitation for 48:87:2D detection ### 🔵 Info Fixes - Added `get_beacon_config` API endpoint for server-configured values - Unknown beacon type now tries KBeacon→DXSmart→BlueCharm fallback chain - Added readFrame2() for post-write verification ## Remaining Items - `verifyBroadcast` still needs CLBeaconRegion + CLLocationManager implementation - No Xcode on this server — needs build verification ## Test Plan - [ ] Build in Xcode — verify no compile errors - [ ] Test DXSmart provisioning with real CP28 hardware - [ ] Test BlueCharm with BC04P hardware (all 3 fallback methods) - [ ] Verify shard pool matches server allocations - [ ] Test unknown beacon fallback chain 🤖 Generated with [Claude Code](https://claude.com/claude-code)
schwifty added 1 commit 2026-03-22 17:26:15 +00:00
🔴 Critical:
- DXSmartProvisioner: complete rewrite to match Android's new SDK protocol
  - Writes to FFE2 (not FFE1) using 4E4F protocol packets
  - Correct command IDs: 0x74 UUID, 0x75 Major, 0x76 Minor, 0x77 RSSI,
    0x78 AdvInt, 0x79 TxPower, 0x60 Save
  - Frame selection (0x11/0x12) + frame type (0x62 iBeacon)
  - Old SDK fallback (0x36-0x43 via FFE1 with 555555 re-auth per command)
  - Auth timing: 100ms delays (was 500ms, matches Android SDK)
- BeaconShardPool: replaced 71 pattern UUIDs with exact 64 from Android

🟡 Warnings:
- BlueCharmProvisioner: 3 fallback write methods matching Android
  (FEA3 direct → FEA1 raw → FEA1 indexed), legacy FFF0 support,
  added "minew123" and "bc04p" passwords (5 total, was 3)
- BeaconBanList: added 4 missing prefixes (8492E75F, A0B13730,
  EBEFD083, B5B182C7), full UUID ban list, getBanReason() helper
- BLEManager: documented MAC OUI limitation (48:87:2D not available
  on iOS via CoreBluetooth)

🔵 Info:
- APIClient: added get_beacon_config endpoint for server-configured values
- ScanView: unknown beacon type now tries KBeacon→DXSmart→BlueCharm
  fallback chain via new FallbackProvisioner
- DXSmartProvisioner: added readFrame2() for post-write verification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
schwifty closed this pull request 2026-03-22 18:43:37 +00:00

Pull request closed

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#22
No description provided.