Can we change Advertising interval at runtime?

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Ruchi Patel
Offline
Last seen:2 years 7 months ago
Joined:2017-03-29 10:50
Can we change Advertising interval at runtime?

Dear Dialog_Support Team,

As I am developing battery operated device, device is configured with extended sleep mode for longer battery life. And device is also configured with advertising interval of 500ms to save battery. Now using USER_ADVERTISE_DATA, I am broadcasting data. Now as i press push button on custom board, few bytes are changing in advertising data string for 5 seconds. So what I want is for that particular 5 seconds can I make advertising interval small(for ex. 100ms) and rest of time it should remain 500ms.

In short,
Advertising interval is 500ms -> Push button interrupt -> USER_ADVERTISE_DATA string change for 5 seconds -> advertising interval changed to 100ms(for 5 seconds) -> After 5 seconds original USER_ADVERTISE_DATA -> advertising interval is 500ms.

With Regards,
Ruchi Patel

Device:
PM_Dialog
Offline
Last seen:2 days 1 hour ago
Staff
Joined:2018-02-08 11:03
Hi Ruchi Patel,

Hi Ruchi Patel,

您可以修改广告间隔的年代ame way that you modify the advertising string. You should stop advertising when you press the button, change the advertising interval and then restart advertising. I suggest you to use a timer in order to advertise with 100ms advertising interval for 5 sec, and when it will elapse you will advertise with 500ms advertising interval.

Thanks, PM_dialog