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

How to read the StaticPasskey from Softdevice

Hi, I want to read the StaticPasskey from the Softdevice that was set before with:

uint8_t u8_ToBePassKey[];
/*    
 * Configure ToBePassKey in some way... 
 */
m_static_pin_option.gap_opt.passkey.p_passkey = u8_ToBePassKey;
sd_ble_opt_set(BLE_GAP_OPT_PASSKEY, &m_static_pin_option);

When I now try to read out the passkey i get an ErrorCode 6 -> NRF_ERROR_NOT_SUPPORTED

err_code =sd_ble_opt_get( BLE_GAP_OPT_PASSKEY,  &m_static_pin_option);

What is the right way to do that, to readout the passkey?

Setting passkey works fine!

Parents Reply
  • Sure! It is not supported i guess.

    Maybe my question is meant more like: Is there a way to readout the passkey?

    Background Infos: The user can set a property ToBePassKey via BT which will set the StaticPassKey in the SD when it is between 0-9. But when the passkey is not valid like "02425a" the ToBePassKey should be set to the actual PassKey that is set in the SD. Therefor I want to read the PassKey from the SD.

Children
No Data
Related