Advertising failed to start (err -120)

I am running into an issue (title), where I am attempting to switch the advertising interval to a slower interval after a set period of advertising in order to save power. Advertising is being successfully started the first time, I then start a timer. In the timer expiration handler, I call bt_le_adv_stop(), and then initialize advertising again, this time with a different set of min and max intervals. The second time around, bt_le_adv_start() returns -120 (EALREADY). I have tried adding a delay in between the stop and start functions in case it takes longer than expected for advertising to stop, but this did not change the outcome. Also, bt_le_adv_stop() is returning 0 which I believes implies the action was successful. Any help would be appreciated, thanks!

I am using:
NCS v2.6
nRF52832

Parents Reply
  • What part of the custom board setup isn't working for you? The project was developed with an nRF52dk using the custom board files as the only difference between the custom hardware and the DK are the button and LED pins which should not be relevant for this bug. 


    I can work on putting the problem portion of the code into one of the examples and make sure the issue is replicable before sending it over.

Children
No Data
Related