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

Erase whitelist data in sdk9.0

Hello,

I am working on S110 v8.0 softdevice and SDK9.0 and need to implement whitelist in our application. I am referring to the ble_app_hids_keyboard example project.

But how to erase the whitelist data? I couldn't find document regarding usage of whitelist.

I found ble_bondmngr.c file in SDK 5.0 for handling whitelist data to store, erase. Is there the file relating to ble_bondmngr.c in SDK 9.0?

Regards,
Sowmya

Parents
  • If you are using the unmodified example you are using the device manager. The whitelist is created by calling dm_whitelist_create(). This created a whitelist with the addresses and IRKs of the bonds that currently exist.

    So to "erase" whitelist data either don't use dm_whitelist_create() or delete bonds with dm_device_delete() or dm_device_delete_all() before you create the whitelist with dm_whitelist_create().

  • I followed the way suggested by you but it is not working. I added dm_device_delete_all() before the code snippet in on_adv_evt callback for BLE_ADV_EVT_PEER_ADDR_REQUEST case:

                // Only Give peer address if we have a handle to the bonded peer.
            if(m_bonded_peer_handle.appl_id != DM_INVALID_ID)
            {
                            
                err_code = dm_peer_addr_get(&m_bonded_peer_handle, &peer_address);
                APP_ERROR_CHECK(err_code);
    
                err_code = ble_advertising_peer_addr_reply(&peer_address);
                APP_ERROR_CHECK(err_code);
                
            }
    

    After this the address stored is cleared but still I am not able to connect from a 2nd device i.e., 1st I am connecting through MCP on PC and for the 2nd time I am trying to connect using MCP on android.

Reply
  • I followed the way suggested by you but it is not working. I added dm_device_delete_all() before the code snippet in on_adv_evt callback for BLE_ADV_EVT_PEER_ADDR_REQUEST case:

                // Only Give peer address if we have a handle to the bonded peer.
            if(m_bonded_peer_handle.appl_id != DM_INVALID_ID)
            {
                            
                err_code = dm_peer_addr_get(&m_bonded_peer_handle, &peer_address);
                APP_ERROR_CHECK(err_code);
    
                err_code = ble_advertising_peer_addr_reply(&peer_address);
                APP_ERROR_CHECK(err_code);
                
            }
    

    After this the address stored is cleared but still I am not able to connect from a 2nd device i.e., 1st I am connecting through MCP on PC and for the 2nd time I am trying to connect using MCP on android.

Children
No Data
Related