This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SDK 6.0 alternative for ble_bondmngr_whitelist_get function?

Hi,

I am upgrading to SDK 6.0.

What function should I use for retriving the whitelist data?

SDK 5.2:

		//err_code = ble_bondmngr_whitelist_get(&whitelist);
		//APP_ERROR_CHECK(err_code);
				
	    //Check if devices exist in the whitelist
		if (!only_standard_mode && ((whitelist.addr_count != 0) || (whitelist.irk_count != 0)))		
		{
         ...
Parents
  • The difference is, that you have to provide the space for the devices.. It should (i guess) like this..

    ble_gap_whitelist_t  whitelist;
    ble_gap_addr_t       * p_whitelist_addr[BLE_GAP_WHITELIST_ADDR_MAX_COUNT];
    ble_gap_irk_t        * p_whitelist_irk[BLE_GAP_WHITELIST_IRK_MAX_COUNT];
    
    whitelist.addr_count = BLE_GAP_WHITELIST_ADDR_MAX_COUNT;
    whitelist.irk_count = BLE_GAP_WHITELIST_IRK_MAX_COUNT;
    whitelist.pp_addrs = p_whitelist_addr;
    whitelist.pp_irks = p_whitelist_irk;   
    
    err_code = dm_whitelist_create(m_app_handle, &whitelist);
    APP_ERROR_CHECK(err_code);
    
Reply
  • The difference is, that you have to provide the space for the devices.. It should (i guess) like this..

    ble_gap_whitelist_t  whitelist;
    ble_gap_addr_t       * p_whitelist_addr[BLE_GAP_WHITELIST_ADDR_MAX_COUNT];
    ble_gap_irk_t        * p_whitelist_irk[BLE_GAP_WHITELIST_IRK_MAX_COUNT];
    
    whitelist.addr_count = BLE_GAP_WHITELIST_ADDR_MAX_COUNT;
    whitelist.irk_count = BLE_GAP_WHITELIST_IRK_MAX_COUNT;
    whitelist.pp_addrs = p_whitelist_addr;
    whitelist.pp_irks = p_whitelist_irk;   
    
    err_code = dm_whitelist_create(m_app_handle, &whitelist);
    APP_ERROR_CHECK(err_code);
    
Children
No Data
Related