Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter - flutter_blue library connection issue

I am running flutter_blue example app on an android device, but scans and find the ble devices nearby but unable to connect them. iOS build of example app can successfully connect the ble devices. Is there a missing configuration for android devices.

Note: I checked permissions, they are ok.

like image 571
serdar aylanc Avatar asked Mar 26 '26 05:03

serdar aylanc


1 Answers

Permissions appear not to be the issue. It finds the ble devices.

I experienced similar issues with flutter_blue on android. It even appeared to be BLE device dependent. It connected fine to some devices, and didn't for others.

In my case, it was just stuck at the connection attempt. Waiting several minutes resolved mostly in a connection, but that's not usable.

I was able to resolve my issue, by turning off autoconnect, so

device.connect(autoConnect: false);

Then it worked for me. Maybe this helps you or other users experiencing the same issues.

like image 182
BorisBaroslav Avatar answered Mar 27 '26 19:03

BorisBaroslav



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!