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

Advertising services

Hi,

I have to use current time service and one other customized service in my project.I am able to advertise only one service i.e customized one.can you please let me know the cause that might stop current time service from advertising?Below is the code attached

Thanks & Regards,

Swathi P

Parents
  • Hi.

    Are you sure that you have space to put both services int he avertising packet? Note that you only have 31 bytes available in the advertising packet.

    You might want to place one of the services in the Scan response packet. The ble_app_uart example shows how this can be done.

    Br,
    Joakim

  • Hi,

    Thanks for your reply.As you suggested I have included one service in advertising packet and the other service in scan response packet.I am able to advertise two vendor UUID's.

    Now,I am unable to advertise more than two vendor UUID's.I want to advertise one or two Standard BLE Services along with five manufacturer specific services.

    I am getting an ERROR 12  [NRF_ERROR_DATA_SIZE] from ble_advertising_init().

    After going through similar posts on devzone,got some suggestions to add  uuids_more_available or p_tx_power_level in advertising_init?what those variables exactly mean?

    Can you please let me know the way I can make it possible?

    Thanks & Regards,

    Swathi P

  • Hi.

    As I mentioned there are only 31 bytes available in your advertising packet. With the required headers and flags, you are left with 29 bytes of data. 

    The 128-bit UUID will use 16 of those bytes so there isn't possible to advertise two in the same advertising packet. Even with the scan response packet, you only have room for two in total.
    One option could be to look at extended advertising. If you really need to advertise all the UUID's,  EA allows you to advertise up to 255 bytes.

    Br,
    Joakim

Reply
  • Hi.

    As I mentioned there are only 31 bytes available in your advertising packet. With the required headers and flags, you are left with 29 bytes of data. 

    The 128-bit UUID will use 16 of those bytes so there isn't possible to advertise two in the same advertising packet. Even with the scan response packet, you only have room for two in total.
    One option could be to look at extended advertising. If you really need to advertise all the UUID's,  EA allows you to advertise up to 255 bytes.

    Br,
    Joakim

Children
Related