quick_blue icon indicating copy to clipboard operation
quick_blue copied to clipboard

Device No Longer Shows Up On Scan Result Stream After Connecting and Disconnecting

Open cdbenjamin opened this issue 2 years ago • 1 comments

Howdy!

I am new to both Flutter and BLE development. Currently, I need to build applications that run on Windows, Android, and IOS to read from a BLE device. I was hoping that quick_blue would enable me to do so in Flutter. I have been able to scan and connect to my BLE device using quick_blue; however, now whenever I run the same code, the device no longer shows up in the scan results. I've been trying for a while to find a solution to this issue; however, I have come up empty-handed. I thought possibly that the device is automatically reconnecting, thus I have two questions.

  1. How can I get the device to show up in the scan results again?
  2. Or if the device is automatically reconnecting, how do I access the deviceId without the scan results?

I've tried creating multiple new projects with the same code as well as running the example project in the quick_blue github. The device has never showed up again in the scan results. In addition, I have connected to other devices and the same issue occurs: These devices no longer show up in the scan results.

cdbenjamin avatar Jul 19 '23 21:07 cdbenjamin

I had the same problem and the problem was that the device was automatically reconnecting. I haven't found a way to avoid this using this library alone, but I changed the code on the BLE device to re-enable the advertisting after connecting to a new device.

This is because on my BLE device, whenever a connection is establised, the advertising gets disabled.

It would be a really useful feature to be able to see already connected devices.

xFrah avatar Jul 20 '23 19:07 xFrah