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

Fail to add bonding to multilink central example on SDK14.1.0

I am trying to add peer manager to multilink_central example on SDK14.1.0 based on the ble_app_hrs_c example. The code is running on nRF52832 and softdevice S132 5.0.

It can connect to a peripheral running ble_app_blinky (also add peer manager based on ble_app_hrs example) but it failed to bond.

I tried to trace what is going wrong and found that there is problem in calling im_ble_addr_get in sec_keyset_fill in security_dispatch.c. It returns an error code 3.

Any idea what could have been missing? Thanks.

Arthur

Parents
  • Hi Petter,

    I figured out that it is the problem on ble_conn_state_init() in main(). In ble_app_hrs_c, it is not called during initalization. If I comment out this line, everything works fine.

    I believe it is because ble_conn_state_user_flag_acquire() is called in pm_init() when initializing the peer manager.

    So, my question now is should be skip the ble_conn_state_init() as in the ble_app_hrs_c example? Or I should add this before peer_manager_init()?

    Arthur

Reply
  • Hi Petter,

    I figured out that it is the problem on ble_conn_state_init() in main(). In ble_app_hrs_c, it is not called during initalization. If I comment out this line, everything works fine.

    I believe it is because ble_conn_state_user_flag_acquire() is called in pm_init() when initializing the peer manager.

    So, my question now is should be skip the ble_conn_state_init() as in the ble_app_hrs_c example? Or I should add this before peer_manager_init()?

    Arthur

Children
No Data
Related