Hi all
I'm developing a BLE application using nRF52832 : SDK 17.xx
My SW is based on the project ble_app_gls as I need to use a PASSKEY
I experience 2 difficulties
1: if the user (for some reason- I don't really know why) decides to UNPAIR my device (in his cellphone) - then my device will not reconnect again to this cellphone.
in order to fix this - I added calling to pm_peers_delete (inside peer_manager_init after reset).
this isn't such a good idea as it requires the user to UNPAIR before connection (every time I reset like: if power was off).
in project ble_app_blinky- I noticed that the code will UNPAIR after reset only if reset is done with a button pressed.
what other options do I have to overcome the user (sometimes) UNPAIRING me ? how does my device know that it would be best to UNPAIR with this cellphone ?
maybe unpair if the cellphone fails to connect to my device( how will my device know this)?
2. my device is using a PASSKEY except after 1st run after programing. 1st run is with a tester device.
in this 1st run- I would prefer to run without a PASSKEY.
I've tried: (peer_manager_init before calling pm_sec_params_set)
sec_param.mitm=0;
or
sec_param.io_caps = BLE_GAP_IO_CAPS_NONE;
or
avoiding the call to pm_sec_params_set all togather.
nothing really works. Either - doesn't want to connect - or error at run time
so: how do I switch off the demand for a PASSKEY in this project (ble_app_gls)?
thanks
Yona