Skip to content

Unable to reconnect after disconnecting #439

@R-Emagina

Description

@R-Emagina

Describe the bug
Using the example code, I'm unable to reconnect to a BLE device once I've connected and disconnected from it.

To Reproduce
Steps to reproduce the behavior:
Using the example code on iOS 14.4:

  1. Scan all devices (no service UUID given)
  2. Connect to any (?) device
  3. Disconnect from device
  4. Try to connect again, nothing happens, here are the logs:
flutter: 12:19:01.355 - Start ble discovery
flutter: 12:19:05.608 - Stop ble discovery
flutter: 12:19:06.775 - Start connecting to 707FB3DF-77AF-82A5-82D7-B387097904F5
flutter: 12:19:06.797 - ConnectionState for device 707FB3DF-77AF-82A5-82D7-B387097904F5 : DeviceConnectionState.connecting
flutter: 12:19:07.843 - ConnectionState for device 707FB3DF-77AF-82A5-82D7-B387097904F5 : DeviceConnectionState.connected
flutter: 12:19:09.774 - disconnecting to device: 707FB3DF-77AF-82A5-82D7-B387097904F5
flutter: 12:19:12.526 - Start connecting to 707FB3DF-77AF-82A5-82D7-B387097904F5
flutter: 12:19:12.538 - ConnectionState for device 707FB3DF-77AF-82A5-82D7-B387097904F5 : DeviceConnectionState.disconnected
flutter: 12:19:16.846 - Start connecting to 707FB3DF-77AF-82A5-82D7-B387097904F5
flutter: 12:19:16.851 - ConnectionState for device 707FB3DF-77AF-82A5-82D7-B387097904F5 : DeviceConnectionState.connecting
flutter: 12:19:16.853 - ConnectionState for device 707FB3DF-77AF-82A5-82D7-B387097904F5 : DeviceConnectionState.disconnected
flutter: 12:19:19.128 - Start connecting to 707FB3DF-77AF-82A5-82D7-B387097904F5
flutter: 12:19:19.133 - ConnectionState for device 707FB3DF-77AF-82A5-82D7-B387097904F5 : DeviceConnectionState.connecting
flutter: 12:19:19.136 - ConnectionState for device 707FB3DF-77AF-82A5-82D7-B387097904F5 : DeviceConnectionState.disconnected

I've tried the same flow with an other device (Bose headset) and the behavior was the same.
I've tried the same flow with nRF Connect and had no issue connecting&disconnecting endlessly.

Expected behavior
Should be able to reconnect to device

Smartphone / tablet

  • Device: iPhone 12 Mini
  • OS: iOS 14.4.1
  • Package version: 5.0.1

Peripheral device

  • Vendor, model: Custom
  • Does it run a custom firmware / software: yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions