dotintent / FlutterBleLib

Bluetooth Low Energy library for Flutter with support for simulating peripherals
Apache License 2.0
535 stars 197 forks source link

[Scan Problem] startPeripheralScan not working on Android 8 #519

Open JAICHANGPARK opened 4 years ago

JAICHANGPARK commented 4 years ago

Environment

flutter_ble_lib: ^2.3.0

Issue

startPeripheralScan method does not work. The value for scanResult is not displayed. Location Permission has been completed.

 _scanSubscription =  bleManager.startPeripheralScan(
      ).listen((scanResult) {
        //Scan one peripheral and stop scanning
        print(scanResult.peripheral.name);
        print("Scanned Peripheral ${scanResult.peripheral.name}, RSSI ${scanResult.rssi}");
        // bleManager.stopPeripheralScan();
      });
mikolak commented 3 years ago

Hi!

Can you turn logs to verbose and try again? It is possible that we haven't managed to fix the race condition in delivering the first error in scan, so it fails silently. I assume it's on Android?