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().

  • That is probable because of this case in ble_advertising_on_ble_evt():

    case BLE_GAP_EVT_DISCONNECTED:
    {
        uint32_t err_code;
        m_whitelist_temporarily_disabled = false;
    
        if (p_ble_evt->evt.gap_evt.conn_handle == current_slave_link_conn_handle)
        {
           err_code = ble_advertising_start(BLE_ADV_MODE_DIRECTED);
           if ((err_code != NRF_SUCCESS) && (m_error_handler != NULL))
           {
               m_error_handler(err_code);
           }
        }
        break;
    }
    

    On disconnect it will enable the whitelist and start directed advertising.

Reply
  • That is probable because of this case in ble_advertising_on_ble_evt():

    case BLE_GAP_EVT_DISCONNECTED:
    {
        uint32_t err_code;
        m_whitelist_temporarily_disabled = false;
    
        if (p_ble_evt->evt.gap_evt.conn_handle == current_slave_link_conn_handle)
        {
           err_code = ble_advertising_start(BLE_ADV_MODE_DIRECTED);
           if ((err_code != NRF_SUCCESS) && (m_error_handler != NULL))
           {
               m_error_handler(err_code);
           }
        }
        break;
    }
    

    On disconnect it will enable the whitelist and start directed advertising.

Children
No Data
Related