fix: overhaul beacon discovery to find all DX beacons #32

Merged
schwifty merged 1 commit from schwifty/fix-beacon-discovery into main 2026-03-22 22:59:22 +00:00
Collaborator

Problem

iOS only finding 1 out of 8-9 nearby DX beacons.

Root Cause

Android detects DX beacons by MAC OUI prefix 48:87:2D — iOS cant do this. The fallback detection had multiple gaps:

  • FFF0 service UUID mapped wrong (BlueCharm instead of DXSmart)
  • No DX factory default UUID check (E2C56DB5-...)
  • No Payfrit shard UUID check
  • Too restrictive: dropped ALL unknown devices
  • Missing FEA0 service UUID and DX-CP name pattern

Fix

  • Full iBeacon manufacturer data parsing with UUID extraction
  • DX factory default UUID + Payfrit shard UUID detection
  • Fixed FFF0 disambiguation
  • Permissive fallback: connectable devices with names included
  • Added FEA0 and DX-CP patterns
## Problem iOS only finding 1 out of 8-9 nearby DX beacons. ## Root Cause Android detects DX beacons by MAC OUI prefix 48:87:2D — iOS cant do this. The fallback detection had multiple gaps: - FFF0 service UUID mapped wrong (BlueCharm instead of DXSmart) - No DX factory default UUID check (E2C56DB5-...) - No Payfrit shard UUID check - Too restrictive: dropped ALL unknown devices - Missing FEA0 service UUID and DX-CP name pattern ## Fix - Full iBeacon manufacturer data parsing with UUID extraction - DX factory default UUID + Payfrit shard UUID detection - Fixed FFF0 disambiguation - Permissive fallback: connectable devices with names included - Added FEA0 and DX-CP patterns
schwifty added 1 commit 2026-03-22 22:56:10 +00:00
Major detection gaps were causing iOS to miss 7-8 out of 8-9 nearby DX beacons:

1. FFF0 service UUID was incorrectly mapped exclusively to BlueCharm.
   Android maps DXSmartProvisioner.SERVICE_UUID_FFF0 to DXSMART.
   Now checks device name to disambiguate FFF0 between DX and BlueCharm,
   defaulting to DXSmart (matching Android behavior).

2. Added DX factory default UUID detection (E2C56DB5-DFFB-48D2-B060-D0F5A71096E0).
   Android catches DX beacons by this UUID on line 130 of BeaconScanner.kt.
   iOS was missing this entirely.

3. Added Payfrit shard UUID detection — already-provisioned DX beacons
   broadcasting a shard UUID are now recognized.

4. Added iBeacon manufacturer data parsing with proper UUID extraction.
   Any device broadcasting valid iBeacon data is now included (not just
   those with minor > 10000).

5. Added permissive fallback matching Android lines 164-169: connectable
   devices with names are included even if type is unknown, so they're
   at least visible to the user.

6. Added FEA0 service UUID for BlueCharm (Android line 124).

7. Added "DX-CP" name pattern (Android line 138) that was missing.

Root cause: Android uses MAC OUI prefix 48:87:2D to catch all DX beacons
regardless of advertisement contents. iOS can't do this (CoreBluetooth
doesn't expose MAC addresses), so we compensate with broader iBeacon
UUID matching and more permissive device inclusion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
schwifty merged commit df2a03f15a into main 2026-03-22 22:59:22 +00:00
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#32
No description provided.