⚠️
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
ciano
Offline
Last seen:3 days 20 hours ago
加入:2014-10-03 08:13
随机广告间隔

Hello Dialog,

We would like to set the advertisement interval random in some range.
This could be from 2seconds to 3seconds interval, where the actual time between advertisement will be random between 2 and 3 seconds.
For testing we have set the minimum and maximum interval like this (note this is only 0.4 to 0.6 seconds)
/// Minimum interval for advertising
.intv_min = MS_TO_BLESLOTS(400),

/// Maximum interval for advertising
.intv_max = MS_TO_BLESLOTS(600),
Our observation is that the interval is almost constant at 600ms.

So two questions now:
1) When does the da14585 use intv_min? We have only observed intv_max with an advertisement scanner.
2) How can we reach our goal of a more random advertisement interval?

The only way I have succeeded in having a random advertisement interval, is by restarting the advertisement on a time, where I set the timeout value random within a chosen range.
I hope there is some way to configure the RivieraWaves stack to do this for me.

Best Regards,
Ciano Frost

Keywords:
Device:
PM_Dialog
Offline
Last seen:16 hours 25 min ago
Staff
加入:2018-02-08 11:03
Hi ciano,

Hi ciano,

The ROM code will take the intv_max that’s why you only observed the maximum advertising interval. Let me try to explain what the intv_min does. Suppose that you are connected with a peer device and the DA14585 is still advertising and you get the connection at the same slot with advertising. The scheduler will shift and modify the connection interval in the range you have defined, and it will be different that the max advertising interval. I mean that the scheduler will decide which is the best advertising interval a=and it is relates with the BLE activity. By default, the scheduler will take the intv_max. In case you want to to have random advertising interval, a possible solution will be to generate the value by the true number generator or shift a the value, stop and then restart advertising. By aware that the value should be according to BLE specifications.

Thanks, PM_Dialog