flutter_blue icon indicating copy to clipboard operation
flutter_blue copied to clipboard

"Random" Disconnects (didDisconnectPeripheral) in iOS

Open mamen2022 opened this issue 5 years ago • 5 comments

Hi, I am developing a Flutter App for the past few months in Android and the Bluetooth is working correctly. Recently I began migrating to iOS and I keep getting "random" disconnects without any errors or crashes, besides this :

didDisconnectPeripheral

Does anyone know why this happens or experienced the same problem? I am testing with an iPhone 6 (iOS 12.1.4) and a ESP32 as ble central. Any ideas ?

In comparison to Android, the bluetooth scan and connect seems at least 10 times slower, but the communication (write/read) between devices seems fine.

Best Regards

mamen2022 avatar Mar 21 '19 17:03 mamen2022

Hi, I have also some different behaviours on flutter blue v0.5.0 between Android 8.0 (phone and tablet) and iOS 12.2 (iphone 5s, 8 and XR). My problems are in connection with ESP32 devices. The scan, connection and communication (R/W) works fine on 2 services/characteristics (similarly fast on both Android and iOS), but problems are on disconnecting. On iOS the disconnect is not signalled to the esp32 side, but on Android it is. I used deviceConnection.cancel(); (and also scanSubscription.cancel();), in an explicit button, but when triggered it doesn't disconnect on iOS. br

(later edit:) This was fixed, as there seems to be some issue in my esp32 firmware, plus some bugs in mobile app.

catalinio avatar Apr 05 '19 14:04 catalinio

Is this close? What is the solution to this problem?

tharit-haup avatar Oct 29 '19 06:10 tharit-haup

Could someone find or solve the problem? I also have these complete random disconnects.

Ladegeraet avatar Aug 17 '21 15:08 Ladegeraet

Same here...

simondukaric avatar Jun 29 '22 12:06 simondukaric

I am also facing the same issue.Unable to connect with ble device on Ios in android it is working fine. Getting this message "didDisconnectPeripheral" If anyone know something about it then please let me know.

Lokendra16 avatar Mar 28 '23 05:03 Lokendra16