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
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