when performing db discovering using a peripheral nrf52832 (running sample dfu project) from sdk 13 from a nrf32832 central on sdk 14 I notice that the db discovery event handler has each characteristic UUID of 0.
it is not possible to update either SDK at this moment for reasons i cannot get into.
my central side code for initializing the db discovery...:
ble_uuid128_t base_uuid = { .uuid128 = DFU_SERVICE_UUID_128bit }; ble_uuid_t dfu_service_uuid = { .uuid = DFU_SERVICE_UUID_16bit }; uint32_t err_code = sd_ble_uuid_vs_add(&base_uuid, &dfu_service_uuid.type); NRF_LOG_INFO("uuid vs add returned: %d/%04X", err_code, err_code); APP_ERROR_CHECK(err_code); /* register to get db discovery events for the dfu service */ ble_db_discovery_evt_register(&dfu_service_uuid); ble_db_discovery_start(db_disc_handle, dfu_target->conn_handle);
and in my event handler:
uint32_t dfu_db_disc_evt_handler( ble_ript_acc_client_t *dfu_target, const ble_db_discovery_evt_t * const p_evt) { if (p_evt->evt_type != BLE_DB_DISCOVERY_COMPLETE) { return 0; } // we only care about the dfu service UUIDs if (p_evt->params.discovered_db.srv_uuid.uuid == DFU_SERVICE_UUID_16bit) { for (int i = 0; i < p_evt->params.discovered_db.char_count; i++) { const ble_gatt_db_char_t *const disc_char = &p_evt->params.discovered_db.charateristics[i]; NRF_LOG_INFO("%d: uuid: %04X cccd:%04X. value:%04X\n", i, disc_char->characteristic.uuid.uuid, disc_char->cccd_handle, disc_char->characteristic.handle_value); } } }
when i run this, my output on RTT Client looks like this:
<info> app: uuid vs add returned: 0/0000 <info> app: 0: uuid: 0000 cccd:0000. value:0010 <info> app: 1: uuid: 0000 cccd:0013. value:0012 <info> app: 0: uuid: 0000 cccd:0000. value:0010 <info> app: 1: uuid: 0000 cccd:0013. value:0012 <info> app: 0: uuid: 0000 cccd:0000. value:0010 <info> app: 1: uuid: 0000 cccd:0013. value:0012 <info> app: 0: uuid: 0000 cccd:0000. value:0010 <info> app: 1: uuid: 0000 cccd:0013. value:0012 <info> app: 0: uuid: 0000 cccd:0000. value:0010 <info> app: 1: uuid: 0000 cccd:0013. value:0012 <info> app: 0: uuid: 0000 cccd:0000. value:0010 <info> app: 1: uuid: 0000 cccd:0013. value:0012 <info> app: 0: uuid: 0000 cccd:0000. value:0010 <info> app: 1: uuid: 0000 cccd:0013. value:0012 <info> app: 0: uuid: 0000 cccd:0000. value:0010 <info> app: 1: uuid: 0000 cccd:0013. value:0012
My 2 questions are:
1. Why are the characteristic UUIDs always 0?
2. why do i get 7 events for the same service?