如何设置 Linux BlueZ 5 连接参数以实现 Apple iOS 兼容性

Phi*_*Bot 3 linux bluetooth ios bluetooth-lowenergy bluez

我发现 Linux 上的 Bluez 5.41 GATT 服务器与 iPhone 之间的 BLE 连接不可靠。连接有效,但有时会随机断开连接。

\n

Apple 有一个文档,指定了维持良好/可靠连接所需的最佳连接参数集:

\n

https://developer.apple.com/library/content/qa/qa1931/_index.html

\n

具体是指以下参数:

\n
There are certain rules and formulae that the parameters must follow. If the parameters do not comply with all of these rules, the parameter request may be rejected, or the stability and the performance of the connection may be compromised.\n\nInterval Min \xe2\x89\xa5 15 ms (multiples of 15 ms)\nInterval Min + 15 ms \xe2\x89\xa4 Interval Max (Interval Max == 15 ms is allowed)\nInterval Max * (Slave Latency + 1) \xe2\x89\xa4 2 seconds\nInterval Max * (Slave Latency + 1) * 3 < connSupervisionTimeout\nSlave Latency \xe2\x89\xa4 30\n2 seconds \xe2\x89\xa4 connSupervisionTimeout \xe2\x89\xa4 6 seconds\n
Run Code Online (Sandbox Code Playgroud)\n

如何在 Linux for BlueZ 上设置这些( hcitool / hciconfig ?)。

\n

ame*_*sky 6

Linux 内核以/sys/kernel/debug/bluetooth/hci*普通文件的形式公开了许多实验/高级属性。