ST意法半导体
直播中

潘础功

7年用户 142经验值
私信 关注
[问答]

如何计算最佳连接间隔?

嗨,
我的BlueNRG-MS,运行7.2c,既可作为中央也可作为外设(模式4)。我应该如何选择外设的广告最小和最大间隔以及中心的连接最小和最大间隔?它们之间似乎存在关系,但我不确定我是否理解它。
我正在尝试获得中心角色的最小连接间隔,同时确保外围设备的正确连接。
LE_Scan_Interval和LE_Scan_Window似乎也开始发挥作用......
现在,我正在通过反复试验测试不同的值,但如果它们之间存在数学关系,我想知道它。
谢谢!

#bluenrg-MS

以上来自于谷歌翻译


以下为原文




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

回帖(2)

曹皓轩

2018-9-28 16:58:53
嗨,

https://github.com/ARMmbed/ble-x-nucleo-idb0xa1
 您可以找到BlueNRG-MS的包装器库。特别是,BlueNRGGap类处理与广告相关的参数的计算:
BlueNRGGap :: setAdvParameters()
和连接:
 
BlueNRGGap :: setConnectionParameters
()
 
希望有所帮助。

以上来自于谷歌翻译


以下为原文




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.
举报

李云生

2018-9-28 17:10:13
我也一直在尝试不同的连接/扫描间隔组合,并在BlueNRG编程手册中找到了一些有用的指导(
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:内容/翻译/ en.DM00141271.pdf
例如,这来自第4.3节:
4.每次开始做广告时:
 
a)如果是直接广告,请选择Advertising_Interval_Min = Advertising_Interval_Max
=最短分配连接间隔的整数倍
b)如果不是直接广告,请选择Advertising_Interval_Min =
Advertising_Interval_Max使得(Advertising_Interval_Min + 5ms)是整数
多个最短的分配连接间隔希望这有帮助

以上来自于谷歌翻译


以下为原文




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 intervalHope this helps
举报

更多回帖

发帖
×
20
完善资料,
赚取积分