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

S120 Central Bonding with S110 peripheral

Hello,

For our application I have to set up two simultaneous connections between a S120 master device and two peripherals that use the S110 softdevice. A very short connect-time (<0.5s) is essential for our application. Therefore I try to make a bond between the master and the slaves. Encryption is not essential.

From the SDK s120 documents I understand that the connection time can be minimized if the next information is stored while bonding:

  • Device Context
  • Service Context
  • Application Context

For the master I used the ' ble_app_hrs_c' central example software as basis. However if I make a first time connection between the 'ble_app_hrs_c' central and the 'ble_app_hrs' peripheral examples I only receive the next events from the device manager central event handler :

  • DM_EVT_CONNECTION
  • DM_LINK_SECURED_IND
  • DM_EVT_SECURITY_SETUP_COMPLETE
  • DM_EVT_DEVICE_CONTEXT_STORED

The second connection I receive the next events from the event handler:

  • DM_EVT_LINK_SECURED
  • DM_EVT_DEVICE_CONTEXT_LOADED
  • DM_EVT_CONNECTION
  • DM_LINK_SECURED_IND

I added a print of all DM_EVENTS in the device manager event handler so if I am right, the service and application context are not stored. Also the Heart Rate service and its characteristics are discovered each time I make a connection. This takes a lot of time. If I am right, this would not have to be performed if the service context of the bonded peripheral is stored while making a bond.

Can anyone tell me how I could perform a 'full bond' between the central and peripheral?

Thanks in advance!

Parents
  • We don't have any example to store the service context for the client, neither persistently or not, and it is not completely implemented in the device manager. But I'm not sure you need the device manager, since you don't need encryption.

    In ble_app_hrs_c the Database Discovery module does service discovery to find the attribute handles for the CCCD and the characterisitic value for hrs and bas. To skip this step you need to store these (persistently or not) on the first connection and then give them to ble_hrs_c and ble_bas_c on subsequent connections.

    As Carles mentioned you can also store the handles through the device manager, with dm_application_context_get dm_application_context_set but device manager requires you to store this information together with a bond.

Reply
  • We don't have any example to store the service context for the client, neither persistently or not, and it is not completely implemented in the device manager. But I'm not sure you need the device manager, since you don't need encryption.

    In ble_app_hrs_c the Database Discovery module does service discovery to find the attribute handles for the CCCD and the characterisitic value for hrs and bas. To skip this step you need to store these (persistently or not) on the first connection and then give them to ble_hrs_c and ble_bas_c on subsequent connections.

    As Carles mentioned you can also store the handles through the device manager, with dm_application_context_get dm_application_context_set but device manager requires you to store this information together with a bond.

Children
Related