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

what is the conn_handle? And when does it use?

I don't know where it is used..

example, when I use sd_ble_gatts_hvx(conn_handle, &p_hvx_params), conn_handle was BLE_GATT_HANDLE_INVALID(0x0000) result of debugging.

Why is conn_handle exist? although charateristic handle actually used is included in p_hvx_params.

Parents
  • BLE_GATT_HANDLE_INVALID is for attribute handle, not connection handle. The first connection will have value of 0x0000. So it's normal. If you have more than one connection at the same time, for example in a central application with more than one peripheral, you will have different connection handles for different connections.

    Do you have trouble using sd_ble_gatts_hvx() ?

Reply
  • BLE_GATT_HANDLE_INVALID is for attribute handle, not connection handle. The first connection will have value of 0x0000. So it's normal. If you have more than one connection at the same time, for example in a central application with more than one peripheral, you will have different connection handles for different connections.

    Do you have trouble using sd_ble_gatts_hvx() ?

Children
Related