Hello,
Lately I tried the example proximity with S130. But I found it did not work as if it is with S110. Particularly, I found the irk_match flag in the following code segment from device_manager_peripheral.c is always set even it is not at whitelist advertising mode.
switch (p_ble_evt->header.evt_id)
{
case BLE_GAP_EVT_CONNECTED:
//Allocate connection instance for a new connection.
err_code = connection_instance_allocate(&index);
//Connection instance is successfully allocated.
if (err_code == NRF_SUCCESS)
{
//Application notification related information.
notify_app = true;
event.event_id = DM_EVT_CONNECTION;
handle.connection_id = index;
m_connection_table[index].conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
m_connection_table[index].state = STATE_CONNECTED;
m_connection_table[index].peer_addr =
p_ble_evt->evt.gap_evt.params.connected.peer_addr;
if (p_ble_evt->evt.gap_evt.params.connected.irk_match == 1)
{
if (m_irk_index_table[p_ble_evt->evt.gap_evt.params.connected.irk_match_idx] != DM_INVALID_ID)
{
device_index = m_irk_index_table[p_ble_evt->evt.gap_evt.params.connected.irk_match_idx];
err_code = NRF_SUCCESS;
}
}
else
{
//Use the device address to check if the device exists in the bonded device list.
err_code = device_instance_find(&p_ble_evt->evt.gap_evt.params.connected.peer_addr,
&device_index, EDIV_INIT_VAL);
}
if (err_code == NRF_SUCCESS)
{
m_connection_table[index].bonded_dev_id = device_index;
m_connection_table[index].state |= STATE_BONDED;
handle.device_id = device_index;
bond_data_load(&handle);
}
}
I am using S130 hex in the nRF5_SDK_9.0.0. Wish I will have your hint of why the difference.