cancel
Showing results for 
Search instead for 
Did you mean: 

How to compute the best connection interval?

hardware
Associate II
Posted on February 18, 2017 at 00:48

Hi,

My BlueNRG-MS, running 7.2c, acts both as a central and a peripheral (mode 4). How should I select the advertizing min and max intervals for the peripheral as well as the connection min and max intervals for the central? There seem to be a relationship between them, but I'm not sure I understand it.

I'm trying to get the minimal connection interval for the central role, while ensuring proper connectivity for the peripheral.

LE_Scan_Interval and LE_Scan_Window seems also to come into play...

Right now, I'm testing different values through trial and error, but if there is a mathematical relationship between those, I'd like to know it.

Thanks!

#bluenrg-ms
1 ACCEPTED SOLUTION

Accepted Solutions
nick239955_stm1_st
Associate II
Posted on February 26, 2017 at 23:25

I have also been experimenting with different connection / scan interval combinations and found some useful guidelines in the BlueNRG programming manual (

http://www.st.com/content/ccc/resource/technical/document/programming_manual/1c/7e/d3/a6/d0/52/4a/35/DM00141271.pdf/files/DM00141271.pdf/jcr:content/translations/en.DM00141271.pdf

For Example, this is from section 4.3:

4. Every time you start Advertising:

a) If Direct Advertising, choose Advertising_Interval_Min = Advertising_Interval_Max

= integer multiple of the shortest allocated connection interval

b) If not Direct Advertising, choose Advertising_Interval_Min =

Advertising_Interval_Max such that (Advertising_Interval_Min + 5ms) is an integer

multiple of the shortest allocated connection interval

Hope this helps

View solution in original post

2 REPLIES 2
Andrea Palmieri
ST Employee
Posted on February 23, 2017 at 11:43

Hi,

On

https://github.com/ARMmbed/ble-x-nucleo-idb0xa1

 you can find a wrapper library for BlueNRG-MS.

In particular, the BlueNRGGap class handles the computation of parameters related to Advertising:

BlueNRGGap::setAdvParameters()

and Connection:

BlueNRGGap::setConnectionParameters

()

Hope that helps.

nick239955_stm1_st
Associate II
Posted on February 26, 2017 at 23:25

I have also been experimenting with different connection / scan interval combinations and found some useful guidelines in the BlueNRG programming manual (

http://www.st.com/content/ccc/resource/technical/document/programming_manual/1c/7e/d3/a6/d0/52/4a/35/DM00141271.pdf/files/DM00141271.pdf/jcr:content/translations/en.DM00141271.pdf

For Example, this is from section 4.3:

4. Every time you start Advertising:

a) If Direct Advertising, choose Advertising_Interval_Min = Advertising_Interval_Max

= integer multiple of the shortest allocated connection interval

b) If not Direct Advertising, choose Advertising_Interval_Min =

Advertising_Interval_Max such that (Advertising_Interval_Min + 5ms) is an integer

multiple of the shortest allocated connection interval

Hope this helps