PhilipsHue / flutter_reactive_ble

Flutter library that handles BLE operations for multiple devices.
https://developers.meethue.com/
Other
662 stars 326 forks source link

Error Domain=CBErrorDomain Code=6 "The connection has timed out unexpectedly." UserInfo={NSLocalizedDescription=The connection has timed out unexpectedly.} #799

Closed samnbd closed 3 months ago

samnbd commented 11 months ago

Describe the bug Getting an error when trying to pair to BLE device on iOS: Error Domain=CBErrorDomain Code=6 "The connection has timed out unexpectedly." UserInfo={NSLocalizedDescription=The connection has timed out unexpectedly.}

To Reproduce Steps to reproduce the behavior:

  1. Connect to one devices using connectTo()

Expected behavior Expected to pair to our device.

Smartphone / tablet

Peripheral device

Additional context So, the device pairs without issues on my iPhone but in production it fails to pair on most iOS device with the error mentioned above. PS: This issue is only happening on iOS

chipweinberger commented 10 months ago

this means your ble device stopped working

samnbd commented 10 months ago

well no, we have a lot of users having the same problem and the device isn't stopping at all. In fact when they attempt to pair again, it connects correctly. This is is randomly happening to most of our iOS users

chipweinberger commented 10 months ago

sure that may be true, but from the perspective of iOS, the device stopped working.

Your device is constantly responding to the platform with its current status.

If those status updates do not happen quickly enough (timeout), iOS will assume your device is malfunctioning.

The problem is with your device's ble stack. it is not responding quickly enough, causing iOS to claim that it has malfunctioned.

samnbd commented 10 months ago

just fyi, we have an old app that uses native iOS code (Swift) to connect to the device and we never had this issue before

samnbd commented 10 months ago

Here are some resources for this issue reported by other users:

Gufdoor commented 6 months ago

Having the same issue here. I have a custom device which uses a NINA b302-00b for BLE connection and an iPhone XR, 11 and 15, all with iOS 17.3.1 (tho the issue happened to previous versions too). Every time I try a new connection it ends in time out, I also tested using nRF Connect app, not successful. Any news?

Taym95 commented 3 months ago

This is not library issue but ble device issues, I will close this