This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BLE Advertising of custom services

Hello,

I am developing an application that requires advertising of multiple custom service over BLE.
I have successfully implemented the custom services, assigning a custom 128-bit UUID.

I encountered some issues when starting the advertising of the custom services, due to the size of the advertising data that overflows the 31 bytes allowed by the advertising set (BLE_GAP_ADV_SET_DATA_SIZE_MAX = 31 bytes).
I noticed the configuration parameter "ble_adv_extended_enabled" can be used to increment the advertising set to BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_MAX_SUPPORTED or BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_CONNECTABLE_MAX_SUPPORTED.
Anyway the extended advertising does not allow to make the BLE device both scannable and connectable, so I cannot see my device from the nRF Connect smartphone app and connect to it.

I would like to know if there is a proper way to advertise many custom or standard services while allowing both scan and connection to the device.
Also, is it possible to advertise just a reduced set of data, while showing services only after connection?


Thanks!

Parents
  • Hi

    Indeed, extended advertising does not support being both scannable and connectable. How many custom services do you plan on adding exactly? You won't be able to fit more than two in a regular CONNECTABLE and SCANNABLE advertisement with scan responses. Is it necessary to advertise multiple custom UUIDs or is it fine to advertise one, and do discovery of the rest once connected? 

    Best regards,

    Simon

  • Hello Simonr,

    I solved by problem by allowing just a subset of services to be advertised, while making the rest of services available once the device is connected.

    Thanks for your support!

Reply Children
No Data
Related