From f9de8aee6519dde0dbed20070542a8c622c387cf Mon Sep 17 00:00:00 2001 From: Strycher Date: Sun, 21 Jun 2026 20:39:31 -0400 Subject: [PATCH] fix(#65): scan BLE by NUS service UUID instead of name prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/connector/meshcore_connector.dart | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index 2414c19..d6e7eee 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -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,