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

Get connected device name in Generic Access Service from ble central

Hi all,

I would like to get the complete name from the connected peripheral by reading the device name characteristic (0x2A00) in the Generic Access Service (0x1800). I am using SDK 15.2.0 with soft device s132 v6.1.1.

I have tried to call sd_ble_gattc_char_value_by_uuid_read in BLE_GAP_EVT_CONNECTED event, and then get the device name through p_ble_evt->evt.gattc_evt.params.char_val_by_uuid_read_rsp.handle_value in BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP event. But it never runs inside the event BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP.  I have tested another way by using p_ble_evt->evt.gatts_evt.params.write.data but it didn't get the device name.

So I would like to know how I can do that.

Many thanks in advance.

Parents Reply Children
No Data
Related