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

get event id 0 instead of BLE_GAP_EVENT_AUTH_STATUS

Hi,

I'm using s130 and my mcu is both central/peripheral. In the centrol role, when I try to connect and pair with an peripheral, I get all the way through SMP pairing phase 2. But in SMP Pairing phase 3, the event I was expecting coming in is BLE_GAP_EVENT_AUTH_STATUS, instead I got event 0(invalid event). I don't know what I'm missing and why I got event 0.

I'm using serialization and sending/receiving command from a master MCU to nrf51 through spi.

Thanks, Kevin

Parents
  • The problem is the function call

    app_ble_gap_sec_context_find(p_event->evt.gap_evt.conn_handle, &conn_index);

    inside the fucntion ble_gap_evt_auth_status_dec(). It give and error status because I never set the m_app_keys_table.

    Do you know when should I call app_ble_gap_sec_context_create() to setup the table and how to set m_app_keys_table[i].keyset. I see the the create function only set the conn_active and conn_handle field.

    Thanks, Kevin.

Reply
  • The problem is the function call

    app_ble_gap_sec_context_find(p_event->evt.gap_evt.conn_handle, &conn_index);

    inside the fucntion ble_gap_evt_auth_status_dec(). It give and error status because I never set the m_app_keys_table.

    Do you know when should I call app_ble_gap_sec_context_create() to setup the table and how to set m_app_keys_table[i].keyset. I see the the create function only set the conn_active and conn_handle field.

    Thanks, Kevin.

Children
No Data