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

read device name

Hi, I try to access Generic Access to get device name. So, I modified "ble_bas_c.c - ble_bas_c_init()" like this.

bas_uuid.type                = BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME;
bas_uuid.uuid                = BLE_UUID_TYPE_BLE;

mp_ble_bas_c                 = p_ble_bas_c;

mp_ble_bas_c->conn_handle    = BLE_CONN_HANDLE_INVALID;
mp_ble_bas_c->bl_cccd_handle = BLE_GATT_HANDLE_INVALID;
mp_ble_bas_c->bl_handle      = BLE_GATT_HANDLE_INVALID;
mp_ble_bas_c->evt_handler    = p_ble_bas_c_init->evt_handler;

return ble_db_discovery_evt_register(&bas_uuid,
                                     db_discovery_evt_handler);

But, it's not pairing. I want to access device name. When i use "sd_ble_gap_device_name_get()", Device name value print "nrf51822".

How to access "Generic Access - Device Name"

Related