You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not totally sure if this is a ble_lib issue or a blemulator issue. I have two simulated peripherals, one with a service SERVICE_STATUS and one without. When I try to use bleManager.startPeripheralScan(uuids: [SERVICE_STATUS]) it returns both peripherals rather than just one. However, if I manually check each scan result's advertisementData then I get the desired results. I'm not super familiar with Dart/Flutter so there could just be some other dumb mistake in the relevant code:
Stream<ScanResult> timeoutScan( {int sec = 5}) {
Future.delayed(Duration(seconds:sec), () {
print("++++++ delayed scan stopping");
bleManager.stopPeripheralScan();
} );
return bleManager.startPeripheralScan(uuids: [SERVICE_STATUS]); //this parameter makes no difference to the results
}
...
Future<void> updateScan({timeout = 5}) async {
Peripheral p;
foundDevices.clear();
if (!scanInProgress)
{
scanInProgress = true;
await timeoutScan(sec: timeout).listen((scanResult) async {
p = scanResult.peripheral;
if (!foundDevices.contains(p) && !connectedDevices.contains(p) && scanResult.advertisementData.serviceUuids.contains(SERVICE_STATUS)) {
foundDevices.addPeripheral(p);
}
...
}).asFuture();
scanInProgress = false;
}
}
The text was updated successfully, but these errors were encountered:
Hi,
I'm not totally sure if this is a ble_lib issue or a blemulator issue. I have two simulated peripherals, one with a service SERVICE_STATUS and one without. When I try to use bleManager.startPeripheralScan(uuids: [SERVICE_STATUS]) it returns both peripherals rather than just one. However, if I manually check each scan result's advertisementData then I get the desired results. I'm not super familiar with Dart/Flutter so there could just be some other dumb mistake in the relevant code:
The text was updated successfully, but these errors were encountered: