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

How to change the advertisement parameters programmatically?

We have some profiles that has power saving modes that changes the advertisement parameters while running. We want to change the advertising parameters from the application code.

  • That's a good question! We want to change both the advertising data and the interval while running.

  • You can set the advertising parameters (advertising interval and time for which the advertising is on) in the ACI commands (ACI connect, ACI bond and ACI Broadcast), so this can be done in the application program.

    To change the advertising interval: you will need to stop the advertising by calling ACI RadioReset or by waiting for the advertising to time out (you get an ACI Disconnected Event - Reason Advertising Timeout ) and then call the ACI command (Bond/Connect/Broadcast) to start advertising again with a new set of advertising parameters.

    To change the advertising data while advertising you can use the Broadcast pipe. You can change the data in the Broadcast pipe by using the ACI SetLocalData while advertising.

Related