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

Read the characteristic value

Hey,

I want to read the value of characteristic of conneceted peripheral. I'm using two BLE modules, one is peripheral and one is central. I connected with central to peripheral, and now i need to know how to read characteristic value from it. I explored sd_ble_gattc_char_value_by_uuid_read and sd_ble_gattc_read functions, but i can't seem to get them to work poperly.

Can someone please explain to me how to properly set them up? I looked over the examples but i'm still having some problems.

Parents
  • Can you give a bit more detail on how you made the function work? Since the sequence Chart says connection established as requirement, i thought i put it in void on_ble_evt(ble_evt_t * p_ble_evt) to case BLE_GAP_EVT_CONNECTED: can this work? In addition, the flowchart says that the function needs two arguments, mine expects three (conn_handle, *p_uuid, *handle_range) so i gave it the p_ble_evt->evt.gap_evt.conn_handle. This causes no compilation error, but the central to disconnect from the peripheral and stopping completly. Any Ideas what might be wrong here? Wrong place to call the function?

Reply
  • Can you give a bit more detail on how you made the function work? Since the sequence Chart says connection established as requirement, i thought i put it in void on_ble_evt(ble_evt_t * p_ble_evt) to case BLE_GAP_EVT_CONNECTED: can this work? In addition, the flowchart says that the function needs two arguments, mine expects three (conn_handle, *p_uuid, *handle_range) so i gave it the p_ble_evt->evt.gap_evt.conn_handle. This causes no compilation error, but the central to disconnect from the peripheral and stopping completly. Any Ideas what might be wrong here? Wrong place to call the function?

Children
No Data
Related