I'm trying to implement an application for the nRF52832 that will provide an OTA update to another external nRF52. The code for the device accepting the update has already been developed and is working fine with nRFConnect run on a Windows PC. When I try to send over an update from the nRF52, however, the board can't seem to detect the BLE characteristic to enter buttonless DFU mode. I can scan for and find the correct service (UUID 0xFE59), but when I try to discover characteristics for this service I find only one, with a UUID of 0x0000. By contrast, when I examine the same service with nRF Connect I see the Secure DFU service (UUID 0xFE59) containing a Buttonless DFU characteristic (UUID 8ec90003-f315-4f60-9fb8-838830daea50). I'm using the following code to discover the DFU service and characteristic:
#define BLE_DFU_SERVICE_UUID 0xFE59 //!< The UUID of the DFU Service.
uint32_t dfu_svc_init(void)
{
ble_uuid_t buttonless_dfu_uuid;
buttonless_dfu_uuid.type = BLE_UUID_TYPE_BLE;
buttonless_dfu_uuid.uuid = BLE_DFU_SERVICE_UUID;
return ble_db_discovery_evt_register(&buttonless_dfu_uuid);
}
void fw_update_on_db_disc_evt(kc_dev_context_t * dev_context, const ble_db_discovery_evt_t * p_evt)
{
if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE)
{
for (uint32_t i = 0; i < p_evt->params.discovered_db.char_count; i++)
{
const ble_gatt_db_char_t * p_char = &(p_evt->params.discovered_db.charateristics[i]);
NRF_LOG_DEBUG("p_char->characteristic.uuid.uuid: 0x%X\r\n", p_char->characteristic.uuid.uuid);
}
}
}
Why might I not be seeing the Buttonless DFU characteristic? Is there something I'm missing/not doing correctly in either the service or characteristic discovery? I'm working with SDK 13.