Hi noridc,
I am using the sdk 15.03, s140 and the nrf52840.
I used as a reference the ble_app_interactive experimental example and the ble_central/ble_app_hrs_c. My intention is to connect to a peripheral based on the user selection as the ble_app_interactive example, but also having the whitelist enable as in the ble_app_hrs_c example.
In my application i can select if it uses or not the whitelist. But i want to connect only through bonding. If i send the connect command to a device that i'm not bonded with, i want it to try to connect and bond, if the peripheral does not support bonding, then i want it to disconnect, for that i'm using the pm_handler_disconnect_on_sec_failure(p_evt); in the peer manager handler.
However, once i start the application with the whitelist, it connects automatically to the bonded devices, that's ok.
Next i disable the whitelist and see other devices advertising , i send a connect command to them, but since they don't support the bonding, it disconnects but before a proper disconnection, the central application crashes. I am using JLink to debug in eclipse. And even while debugging i can not see the real reason that is causing the fatal error.
My question is then, is this a know problem with this sdk? Is it possible that the pm_handler_disconnect_on_sec_failure is not supposed to work with the whitelist? Do i need to add an especial case on the ble_event_handler or in the peer_manager().
ANY idea would be great!
Thanks