Hello! I am using the nrf52832 sdk15.2 development project now, I don't need to use the whitelist function, so I use 'init.config.ble_adv_whitelist_enabled = false' to turn off the whitelist, and the device needs to be bound to the IOS phone, in 'pm_evt_handler’ In the 'PM_EVT_PEER_DATA_UPDATE_SUCCEEDED' function, the pm_device_identities_list_set(m_whitelist_peers, m_whitelist_peer_cnt) function returns an error: <error> app: ERROR 12805 [Unknown error code] at ..\..\..\main.c:1751. Will all operations under the condition 'PM_EVT_PEER_DATA_UPDATE_SUCCEEDED' be deleted?
// Note: You should check on what kind of white list policy your application should use.
if ( p_evt->params.peer_data_update_succeeded.flash_changed
&& (p_evt->params.peer_data_update_succeeded.data_id == PM_PEER_DATA_ID_BONDING))
NRF_LOG_DEBUG("New Bond, add the peer to the whitelist if possible");
NRF_LOG_DEBUG("\tm_whitelist_peer_cnt %d, MAX_PEERS_WLIST %d",
m_whitelist_peer_cnt + 1,
if (m_whitelist_peer_cnt < BLE_GAP_WHITELIST_ADDR_MAX_COUNT)
// Bonded to a new peer, add it to the whitelist.
m_whitelist_peers[m_whitelist_peer_cnt++] = p_evt->peer_id;
// The whitelist has been modified, update it in the Peer Manager.
ret = pm_device_identities_list_set(m_whitelist_peers, m_whitelist_peer_cnt);
if (ret != NRF_ERROR_NOT_SUPPORTED)
ret = pm_whitelist_set(m_whitelist_peers, m_whitelist_peer_cnt);
If the code that you posted under the case PM_EVT_PEER_DATA_UPDATE_SUCCEEDED is where you received your error from, then it seems that turning off the whitelist did not lead to this code not being run. I hope I did not misunderstand your question.
The error is in function 'pm_device_identities_list_set'. When I want to know, if the whitelist is closed, is the processing under condition 'PM_EVT_PEER_DATA_UPDATE_SUCCEEDED' above necessary? Can I delete it?
Sorry for the delayed response. It should be fine to delete this, as the code only makes changes to the whitelist.