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

How can I handle "BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST " event in pc-ble-driver

Hi,

I am working on the heart_rate_collector example code of nrf51-ble-driver_linux_0.5.0. I received BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST event after setting HRM CCCD. And, I have accepted the request and respond with sd_ble_gap_conn_param_update(p_gap_evt->conn_handle, &p_gap_evt->params.conn_param_update_request.conn_params); to update the connection parameters.

But then I received event with ID: 0x12(18) and received disconnected event with ID: 0x08 as below : image description

Would you please tell me how do I implement coding to response this event with ID: 0x12(18) on the heart rate collector example code. Or, how do I fix this issue.

Thanks!

Parents
  • Hey.

    New answer: As you can see in the connection parameter update sequence chart, you are handling the event correctly.

    The 0x12 event is BLE_GAP_EVT_CONN_PARAM_UPDATE, which should come after the update. This does not require any more handling.

    The disconnect reason 0x8 is BLE_HCI_CONNECTION_TIMEOUT. I am not sure of the reason for this disconnect.

    Can you tell me a bit about the peripheral device you are connected to?

    Wrong answer: You must use the function sd_ble_gap_sec_params_reply for this. The peripheral is disconnecting because you are not replying to the BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST in the correct way.

    -Anders

  • Hi Anders, Thanks for your reply!

    The peripheral device is upgrading the ble_app_hrs example code of S132. I also used the nRF Master Control APP to confirm the connection of peripheral device is ok.

    May I ask you a question?

    After service discover is completion. Does the next procedure need do the sd_ble_gap_authenticate function? I'm not quite familiar with related GAP security procedure on central device.

    Thanks.

    Ryan

Reply
  • Hi Anders, Thanks for your reply!

    The peripheral device is upgrading the ble_app_hrs example code of S132. I also used the nRF Master Control APP to confirm the connection of peripheral device is ok.

    May I ask you a question?

    After service discover is completion. Does the next procedure need do the sd_ble_gap_authenticate function? I'm not quite familiar with related GAP security procedure on central device.

    Thanks.

    Ryan

Children
No Data
Related