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

Return error by “pm_device_identities_list_set”

52832 & s112 & sd6.0 & sdk15.0

If you have multiple pairings on the same host will return error by “pm_device_identities_list_set”

err_code = BLE_ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE.

if I ignore this error seems no issue.

pm_conn_sec_config_t conn_sec_config = {.allow_repairing = true};  

  case PM_EVT_PEER_DATA_UPDATE_SUCCEEDED:
        {
            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_INFO("New Bond, add the peer to the whitelist if possible");
                NRF_LOG_INFO("\tm_whitelist_peer_cnt %d, MAX_PEERS_WLIST %d",
                               m_whitelist_peer_cnt + 1,
                               BLE_GAP_WHITELIST_ADDR_MAX_COUNT);
               // Note: You should check on what kind of white list policy your application should use.

                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++] = m_peer_id;
                                                                                NRF_LOG_INFO(" new peer ID %d", m_peer_id);
                                                                                
                    // The whitelist has been modified, update it in the Peer Manager.
                    err_code = pm_whitelist_set(m_whitelist_peers, m_whitelist_peer_cnt);
                    APP_ERROR_CHECK(err_code);

                    err_code = pm_device_identities_list_set(m_whitelist_peers, m_whitelist_peer_cnt);
                    if (err_code != NRF_ERROR_NOT_SUPPORTED)
                    {
                        APP_ERROR_CHECK(err_code);
                    }
                }
            }
        } break;

Parents Reply
  • Hi Hung, I had the same problem and up voted this answer as it properly describes the problem. That said it was extremely difficult to locate this thread. I am adding the following terms to my reply in the hopes of helping someone else find it. Error 12805 (0x3205) BLE_ERROR_GAP_DEVICE_IDENTITIES_DUPLICATE error is returned to pm_device_identities_list_set() by call to soft device  sd_ble_gap_device_identities_set().

Children
No Data
Related