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

Can not get characteristic UUID

Hi team,

My 52832 act as central device. It can discover service and characteristic of peripheral. The problem is it can't get the UUID of every characteristic of service from peripheral when I debug with keil. But it is very weird that it can get the other attribute of characteristic, like read or notify, like the first image. I don't know what wrong thing I have did.I hope I can get some direction of checking from you.The peripheral is a heart rate device which I bought from Internet. My program is base on \ble_central\ble_app_hrs_c.

Other information: nRF5_SDK_12.3.0_d7731ad s132_nrf52_3.1.0

#define GW64_BASE_UUID   {{0x55, 0xE4, 0x05, 0xD2, 0xAF, 0x9F, 0xA9, 0x8F, 0xE5, 0x4A, 0x7D, 0xFE, 0x00, 0x00, 0x53, 0x49}} /**< Used vendor specific UUID. */

uint32_t ble_hrs_c_init(ble_hrs_c_t * p_ble_hrs_c, ble_hrs_c_init_t * p_ble_hrs_c_init)
{
    VERIFY_PARAM_NOT_NULL(p_ble_hrs_c);
    VERIFY_PARAM_NOT_NULL(p_ble_hrs_c_init);

ble_uuid_t hrs_uuid;

/*my_debug begin*/
	uint8_t err_code;
	ble_uuid128_t glu_base_uuid = GW64_BASE_UUID;

VERIFY_PARAM_NOT_NULL(p_ble_hrs_c);
VERIFY_PARAM_NOT_NULL(p_ble_hrs_c_init);

err_code = sd_ble_uuid_vs_add(&glu_base_uuid, &hrs_uuid.type);
VERIFY_SUCCESS(err_code);

	hrs_uuid.uuid = 0x5343;
/*my_debug end*/

    p_ble_hrs_c->evt_handler                 = p_ble_hrs_c_init->evt_handler;
    p_ble_hrs_c->conn_handle                 = BLE_CONN_HANDLE_INVALID;
    p_ble_hrs_c->peer_hrs_db.hrm_cccd_handle = BLE_GATT_HANDLE_INVALID;
    p_ble_hrs_c->peer_hrs_db.hrm_handle      = BLE_GATT_HANDLE_INVALID;
	p_ble_hrs_c->peer_hrs_db.noty_cccd_handle = BLE_GATT_HANDLE_INVALID;
	p_ble_hrs_c->peer_hrs_db.noty_handle      = BLE_GATT_HANDLE_INVALID;

return ble_db_discovery_evt_register(&hrs_uuid);
}

image description(/attachment/012eaafb98ebd7b15eea5e44221e8cdf) image description

Parents
  • Ok, I have not seen your code. But from what I can see from the picture above you are only adding one vendorspecific UUID. While the picture from nRF_connect shows that you have 6 different UUID's in the peripheral. One for the custom service, and 5 for the custom characteristics. I didn't notice that since the first bytes is identical (so these UUID's is not correctly generated).

Reply
  • Ok, I have not seen your code. But from what I can see from the picture above you are only adding one vendorspecific UUID. While the picture from nRF_connect shows that you have 6 different UUID's in the peripheral. One for the custom service, and 5 for the custom characteristics. I didn't notice that since the first bytes is identical (so these UUID's is not correctly generated).

Children
No Data
Related