fix(#65): scan BLE by NUS service UUID instead of name prefix

The scanner filtered advertisements by device-name keyword
(withKeywords: deviceNamePrefixes), so any MeshCore/Offband device
whose advertised name fell outside the hardcoded prefix list was
invisible to the scanner — even though the official MeshCore app,
which scans by the Nordic UART service UUID, found them. Switch
startScan to withServices: [Guid(service)] and drop the now-redundant
name filter on the already-service-scoped systemDevices fallback.

Device-tested on a Samsung S25: a previously-invisible node now
appears in the scan.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pull/67/head
Strycher 4 weeks ago
parent 7027612768
commit f9de8aee65

@ -1435,7 +1435,7 @@ class MeshCoreConnector extends ChangeNotifier {
try {
await FlutterBluePlus.startScan(
withKeywords: MeshCoreUuids.deviceNamePrefixes,
withServices: [Guid(MeshCoreUuids.service)],
webOptionalServices: [Guid(MeshCoreUuids.service)],
timeout: timeout,
androidScanMode: AndroidScanMode.lowLatency,
@ -1459,11 +1459,6 @@ class MeshCoreConnector extends ChangeNotifier {
..clear()
..addAll(
systemDevices
.where(
(device) => MeshCoreUuids.deviceNamePrefixes.any(
device.platformName.startsWith,
),
)
.map(
(device) => ScanResult(
device: device,

Loading…
Cancel
Save

Powered by TurnKey Linux.