This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Connect without advertising to a previously paired device

Hi,

We'd like to implement a feature that allows changing a BLE connection from [central device #1 -> peripheral] to [central device #2 -> same peripheral] (similar to Apple's Airpods).

Currently, trying to reconnect to a peripheral that is already connected to another central device simply fails.

Is there a way to force a connection to a peripheral that doesn't advertise? from previous topics it seems this wasn't possible in Softdevice 4.0, but we're using 5.0 and wondered if anything changed.

Thanks

Parents
  • FormerMember
    0 FormerMember

    The BLE Multiperipheral example in the SDK shows how to connect on peripheral to several centrals (SKD 14.2.0). I would recommend you to take a look at that example. 

    Connecting without advertising is not possible. However, for bonded devices, it is possible to use directed advertising. 

  • Thanks. We reactivate advertising manually, similar the example. But we'd also like to disconnect (without unpairing) the previous central device from the peripheral.

    After the 2nd central connects, we use sd_ble_gap_disconnect() to disconnect the 1st central device, but the 2nd central device also stops communicating even though it displays as "Connected" on the Bluetooth menu.

    It's probably because a BLE_GAP_EVT_DISCONNECTED is sent after the disconnection. Is there a way to disconnect a device without harming the connection with the new device?

Reply
  • Thanks. We reactivate advertising manually, similar the example. But we'd also like to disconnect (without unpairing) the previous central device from the peripheral.

    After the 2nd central connects, we use sd_ble_gap_disconnect() to disconnect the 1st central device, but the 2nd central device also stops communicating even though it displays as "Connected" on the Bluetooth menu.

    It's probably because a BLE_GAP_EVT_DISCONNECTED is sent after the disconnection. Is there a way to disconnect a device without harming the connection with the new device?

Children
No Data
Related