1

I'm using flutter_blue for Android app. I've granted all required permissions and also enabled GPS on the phone. When it starts to scan, I can see a list of Bluetooth devices, but I can't find my HC-05 Bluetooth Module. However when the HC-05 module can be found when I use my phone directly. Can anyone help me?

Here is my code for scanning:

FlutterBlue flb = _bluetoothService.getInstance();
    flb
        .startScan(timeout: Duration(seconds: 20), scanMode: ScanMode.lowPower)
        .then((x) {
      List<ScanResult> r = x as List<ScanResult>;
      r.forEach((a) {
        print('<<<<<');
        print('${a.device.id.id}');
        print(a.rssi);
      });
    });
billcyz
  • 1,219
  • 2
  • 18
  • 32

1 Answers1

4

The HC-05 is a Bluetooth Classic module, not a Bluetooth Low Energy (BLE) module. This is the reason you can find it through the usual Bluetooth Classic search in your phones operating system but not using flutter_blue, a BLE library.

You have to either use a BLE module or a different flutter library like flutter_bluetooth_serial.

Michael Kotzjan
  • 2,093
  • 2
  • 14
  • 23