Repository navigation
Description
Context
Bugbot flagged three potential regressions in the Android single filtered BLE scan path introduced in #52 (PR #52). None are confirmed bugs yet — they need validation on real hardware before fixing.
Relevant code: android/src/main/java/expo/modules/blenfcreader/ReactNativeBleNfcReaderModule.kt (onScanResult, ~L371–378).
Findings to validate
1. Terminal type lost when scan record omits service UUIDs (high)
The new path derives ACS terminal type from ScanRecord.serviceUuids, but onScanResult returns early when that list is null or lacks a mapped UUID. The prior rotation called manager.startScan with an explicit terminal type, so discovery did not depend on Android populating parsed service UUIDs.
Validate: On devices where filter-matched ACS Readers advertise without parsed service UUIDs in the scan record, are Readers dropped entirely even though the filter matched?
2. Readers without names skipped (medium)
Matched scan results are discarded when both scanRecord.deviceName and BluetoothDevice.getName() are null, before manager.a() is called. The prior vendor startScan path did not require the module to supply a non-null display name from the advertisement.
Validate: Do any supported Reader models appear in BLE scans without a device name? If so, are they silently skipped?
3. Factory failures swallowed silently (medium)
Exceptions thrown by manager.a() during scan-result processing are caught and ignored with no logging, event, or promise rejection.
Validate: When manager.a() fails (wrong terminal type, incompatible device, internal ACS error), does discovery appear to hang or show no Readers with no actionable error?
Suggested validation plan
- Test continuous
scanReaders({ continuous: true })on Android with each supported Reader model (ACR1555U, ACR1255U-J1, ACR1255U-J1-V2, ACR3901U-S1, AMR220-C) - Capture BLE scan records (e.g. nRF Connect or
adblogs) for Readers that fail to appear - Note Android version and device manufacturer for any reproduction
- If a finding is confirmed, document expected vs actual behavior and propose a fix (fallback terminal type inference, name fallback, surfaced errors)
References
- Merged PR: Speed up continuous Reader scanning on Android #52
- Prior scan rotation removed in favor of single
BluetoothLeScanner.startScan(filters, settings, callback)
Activity