PhilipsHue / flutter_reactive_ble

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

iOS will not connect to peripheral that removed the bond information. #809

Closed delivertango closed 5 months ago

delivertango commented 1 year ago

Describe the bug If iOS is bonded with a peripheral and the peripheral removes the bond, iOS will not connect until you remove the peripheral from the bluetooth settings.

To Reproduce Steps to reproduce the behavior:

  1. Connect the iPhone to the peripheral using ‘connectToDevice()’
  2. Peripheral start bonding process with the iPhone
  3. Remove bond information in the peripheral
  4. Connect again to the peripheral using ‘connectToDevice()’

Expected behavior I would like to be able to remove the peripheral from the bluetooth devices or start the bonding process again.

Smartphone / tablet

Peripheral device

Additional context I'm developing a device with bluetooth (peripheral) and an Android/iPhone app to control it using this package. The user can factory reset the peripheral, and that will lead to remove all the bonding information. Android handles this well, it seems to check that the bond was removed and forget it from the bluetooth devices so the peripheral can start the bonding process again. Meanwhile, iOS seems to try to connect but will not start the bonding process again, just disconnects. The process to remove it from the settings can be hard for some people without knowledge about smartphones, and I would like to know if it’s posible to remove the bond from the iPhone or re-bond without removing it using the package.

BenelliFurtado commented 11 months ago

Hi, according to these posts, it seems that this is intended on iOS and that there is no native way to check if the bond was deleted intentionally: https://devzone.nordicsemi.com/f/nordic-q-a/31011/ios-and-nrf51822-pairing-after-erasing-bonding-info-problem

(But if someone finds a way to do it, I would also be interested to know!)

enseitankad0 commented 8 months ago

Have you found a solution to this problem? I'm facing the same problem. After the DFU update, this situation can be reproduced on iOS easily. I described my issue here.

It is possible to manually remove bonding by going to settings, and you'll probably resolve this problem.

Taym95 commented 5 months ago

We cannot control IOS Bonding from library, this is limitation!