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

nRF51 Relay example - bonding problem

Hi,

I've encountered a problem during development of an application based on ble_app_hrs_rscs_relay.

Everything works fine (I mean concurrent central and peripheral roles) except for the fact that when I try to perform bonding operation the connection is immediately lost.

This happens for both my modified application and the code provided with SDK 9.0 I base on. I've tried with other (peripheral) examples compiling it with S130 support and bonding is performed without any problems.

Has anyone encountered such problem and could help with solving it?

Parents
  • Hi everyone,

    I've found solution so I share it in order to spare you some time in case you've encountered the problem too ;)

    The relay example just doesn't support pairing and thus bonding isn't supported either (correct me if I'm wrong about that dependency). It is explicitly said in line 612 of the main.c file. In case of pairing request it is simply declined (sd_ble_gap_sec_params_reply(m_conn_handle_peripheral, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, NULL, NULL)).

    I've modified the code accordingly to other examples which support pairing and bonding. I can't share the code but in case anyone needs help with that feel free to contact me.

Reply
  • Hi everyone,

    I've found solution so I share it in order to spare you some time in case you've encountered the problem too ;)

    The relay example just doesn't support pairing and thus bonding isn't supported either (correct me if I'm wrong about that dependency). It is explicitly said in line 612 of the main.c file. In case of pairing request it is simply declined (sd_ble_gap_sec_params_reply(m_conn_handle_peripheral, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, NULL, NULL)).

    I've modified the code accordingly to other examples which support pairing and bonding. I can't share the code but in case anyone needs help with that feel free to contact me.

Children
Related