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

    After posting reply that I was unable to scan services in nRF Connect,after enabling EA.I have went through several posts related on same issue but I coudn't find any appropriate answer.I read few posts saying that it is due to bluetooth version in the android may not be supporting EA.I am using OPPO A71 to test.Is it true?

    If yes,then please let me know the way in which I will be able to advertise and scan more than two vendor UUIDs.

    Thanks & Regards,

    Swathi P

Children
  • Yes, that is most likely due to the Phone not supporting AE.

    If you are unable to use AE, there is no way to advertise more than two vendor UUIDs simultaniously. Then you have to advertise a vendor UUID, stop advertising, update your advertising packet with another UUID and start advertising again.

    Br,
    Joakim

  • Hi,

    I have six services in my project to send in advertising packet.As you said If not through EA, I can do it by advertising a vendor UUID, stop advertising, update your advertising packet with another UUID and start advertising again.But the thing is I have a need to make all the services available to the user at a time.It should be user choice to choose the service.

    If I have only way to do this by stop and start advertising:

    To justify my need Can I advertise each service for every 20ms(Bluetooth Specification specifies that the advertising interval should be between 20 ms to 10.24 sec),as there are six services for every 120-140ms I will be able to advertise all the services one after the other.will it be the correct way to do?If yes,will there be issues with power consumptions?If no,suggest me the way in which I can make it possible?

    NOTE:Before starting this stop and start advertising in a loop I need to have device in conneced state.As we are starting advertising for every 20ms for each service.Will it be like we need to connect to the device for every 2ms?

    Among all six let me explain about three services that I need in my project:

    Two are vendor specific and one is standard service.

    1)RTC Service  2)Notification Service  3)Battery Service.

    I will set some value to the CC register using RTC Service.Then when counter ticks matches given CC value,We need to get notification on to the mobile.This getting notifications on to the mobile when an event generated is done by Notification Service.

    Battery service is I want to make use of standard BLE service,for every 60sec/any given particular interval it should check the battery status.whenever battery is below certain percentage it should send notification to the mobile.Again here this sending notification to the mobile is done by using Notification Service.

    This is how services are dependent in my project.I hope you understood my concept.Please guide me with appropriate way to implement.

    Thanks & Regards,

    Swathi P

Related