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

DFU Service in scan response advertising data

Hi,

I am designing a BLE Device based on nRF51822, which broadcast three services : one home made service, the Battery Service, and the DFU service for the OTA update.

When the device is advertising, it is supposed to broacast the UUID of all the services in the scan response data. It works perfectly when the DFU service is not included, but when it is, the uuid_list_sized_encode() functions returns NRF_ERROR_DATA_SIZE (0x0C) and none of the services are broadcasted.

The m_adv_uuids[] which contains the UUIDs of the service to be advertised is the following : m_adv_uuids[] = {{BLE_UUID_HOME_MADE_SERVICE, BLE_UUID_TYPE_VENDOR_BEGIN}, {BLE_UUID_BATTERY_SERVICE, BLE_UUID_TYPE_BLE}, {BLE_DFU_SERVICE_UUID, BLE_UUID_TYPE_VENDOR_BEGIN}};

My target is an nRF51822 QFACA1, I am using SDK v11.0.0 and Softdevice S130 v2.0.0

Could you please help me to solve this problem ?

Best regards,

Guillaume

Parents
  • The problem was solved : I had to split the advertising of the UUIDs between adv_data and sr_data. But there is one thing to know if you want to advertise the DFU Service UUID : You have to set the uuid struct of the device service the following way :

    {BLE_DFU_SERVICE_UUID, 0x03}

    The type of the UUID 0x03 is not defined in ble_types.h, but when you add trace to check the type of the UUID in the dfu service init, you can see that its type is 0x03.

    Thank you endnode for your help !

    Best regards,

    Guillaume

Reply
  • The problem was solved : I had to split the advertising of the UUIDs between adv_data and sr_data. But there is one thing to know if you want to advertise the DFU Service UUID : You have to set the uuid struct of the device service the following way :

    {BLE_DFU_SERVICE_UUID, 0x03}

    The type of the UUID 0x03 is not defined in ble_types.h, but when you add trace to check the type of the UUID in the dfu service init, you can see that its type is 0x03.

    Thank you endnode for your help !

    Best regards,

    Guillaume

Children
Related