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

  • If the gatt server (the hrs peripheral in this case) requires pairing, yes. If the gatt server lets you read and write the characteristic. I think you need to investigate why the connection times out. The most likely reason is that the peripheral device shuts down for some reason. How much time after the connection parameter update does the disconnect happen?

Reply Children
No Data
Related