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
  • Hi Guillaume,

    Both ADV_DATA and SCAN_RSP data are limited to 31B by BT SIG specification (not counting latest BT 5.0 extension). That includes GAP AD element's overhead (TAG and LENGTH bytes) so you are not able to put more than one 16-byte (128-bit) UUID string into either of these data fields. If you have some other AD objects there (which you typically have - e.g. mandatory AD Flags etc.) then your capacity goes even lower. Can you check what exact string are you trying to put into ADV. and SCAN RSP. data?

    Cheers Jan

  • I'm afraid the only way "in the spirit of BT SIG spec" should be to indicate that your broadcast only partial UUID list and put only one 128-bit UUID there (probably the most "signature" or the most important one which should trigger your GAP/GATT application on Central/Client side). Then each device should do full GATT service discovery after connection and find all remaining services. If you don't like this then you can experiment with putting some of UUID list AD elements to both Advertising and Scan Response data. I believe it could work with Soft Device, it's just question if it won't confuse some of the listeners (mobile phones and similar devices I guess;)... this would need to be validated extensively by you/your team.

Reply
  • I'm afraid the only way "in the spirit of BT SIG spec" should be to indicate that your broadcast only partial UUID list and put only one 128-bit UUID there (probably the most "signature" or the most important one which should trigger your GAP/GATT application on Central/Client side). Then each device should do full GATT service discovery after connection and find all remaining services. If you don't like this then you can experiment with putting some of UUID list AD elements to both Advertising and Scan Response data. I believe it could work with Soft Device, it's just question if it won't confuse some of the listeners (mobile phones and similar devices I guess;)... this would need to be validated extensively by you/your team.

Children
No Data
Related