TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2541 更新苹果蓝牙连接参数被 reject,而 realtek 的蓝牙芯片却可以更新成功

1、CC2541 使用一下连接参数更新苹果蓝牙小程序遭到 reject:

#define DEFAULT_DESIRED_MIN_CONN_INTERVAL   6

#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 12

#define DEFAULT_DESIRED_SLAVE_LATENCY           0

#define DEFAULT_DESIRED_CONN_TIMEOUT            300

update reject.rar

2、realtek 的蓝牙芯片却可以更新连接参数成功:

update success.rar

Alvin Chen:

和iOS设备的连接参数的设置是有要求的

不符合iOS设备连接参数定义的数值是不被接受也就不会变更了,所以首先请您确认一下您的参数定义是否满足以下IOS设备的要求

•Interval Max * (Slave Latency + 1) <= 2 s
•Interval Max >= 20 ms
•Interval Min + 20 ms <= Interval Max
•Slave Latency <= 4
•ConnSupervisionTimeout <= 6 s
•Interval Max * ( Slave Latency + 1) * 3 < ConnSupervisionTimeout

Jesse Huang:

回复 Alvin Chen:

这个连接说 GATT Profile 支持 HID 的话能将速连接速降到 11.25 毫秒。请问怎么配置GATT Profile?
e2echina.ti.com/…/108802

For iOS 9.2 and iPhone 6, The minimum connection interval is 30 milliseconds unless you support HID over GATT Profile which allows for connections down to 11.25 milliseconds.
For Android devices, the minimum connection interval is 7.5 milliseconds.
The "Bluetooth Accessory Design Guidelines for Apple Products" does mention a minimum interval of 20ms, but this is not seen in practice. In our experience, we have observed 8 packets (4 in one direction) per connection event, which gives us an ideal throughput of

BLE Data Throughput for a Single Direction with iPhone 6 = (1000 mSecs) * 20 * ( 4 ) / (30 mSecs) = 2,667.66 Bytes per second.

and if HID over GATT Profile is supported:

Throughput is then increased to = (1000 mSecs) * 20 * 4 / (11.25 mSecs) = 7,111.11 Bytes per second

Hint: You have the ability to increase your length of application data in a packet to iPhone 6 by three bytes which can increase your throughput by 15%. In future blogposts, we will discuss this.

Alvin Chen:

回复 Jesse Huang:

这个问题好像比较模糊,你可以用B-stack 1.4.2或者1.5.0的HID demo支持HID ,你可以试着改一下连接参数试试看
e2e.ti.com/…/1878259

Jesse Huang:

回复 Alvin Chen:

改大连接间隔参数是可以更新的,就是我的应用需要快速传输数据,所以想要连接间隔为 11.5 ms。

Alvin Chen:

回复 Jesse Huang:

11.25ms is the fastest connection interval allowed on android.
ios 不支持

Jesse Huang:

回复 Alvin Chen:

这是在 《Accessory Design Guidelines for Apple Devices》文档里的,我用别的模块试了,是可以的。

Alvin Chen:

回复 Jesse Huang:

那你有用吗我们HID demo 去试吗?ANDROID上面我是试过的。IOS没试过,因为没有研究过IOS的应用。

If Bluetooth Low Energy HID is one of the connected services of an accessory, connection interval down to 11.25 ms may be accepted by the Apple product. The Apple product will not read or use the parameters in the Peripheral Preferred Connection Parameters characteristic. See the Bluetooth 4.0 specification, Volume 3, Part C, Section 12.5.
如果有抓包文件,节后可以看一下。

Jesse Huang:

回复 Alvin Chen:

我试了用 HID demo 也不行,那两个抓包都在上面了,一个是成功的,一个是失败的,你能帮忙看一下吗?谢谢!

Alvin Chen:

回复 Jesse Huang:

我早上 试了一下HIDEmuKbd是可以的,
你可以试试下面的参数:

// Minimum connection interval (units of 1.25ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL9

// Maximum connection interval (units of 1.25ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL9

// Slave latency to use if automatic parameter update request is enabled
#define DEFAULT_DESIRED_SLAVE_LATENCY4

// Supervision timeout value (units of 10ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_CONN_TIMEOUT500

Alvin Chen:

回复 Jesse Huang:

Jesse Huang

我试了用 HID demo 也不行,那两个抓包都在上面了,一个是成功的,一个是失败的,你能帮忙看一下吗?谢谢!

赞(0)
未经允许不得转载:TI中文支持网 » CC2541 更新苹果蓝牙连接参数被 reject,而 realtek 的蓝牙芯片却可以更新成功
分享到: 更多 (0)