如何为 Apple iOS 兼容性设置 Linux BlueZ 5 连接参数
How to Set Linux BlueZ 5 Connection Parameters for Apple iOS Compatibility
我发现 Linux 上的 Bluez 5.41 GATT 服务器和 iPhone 之间的 BLE 连接不可靠。连接正常,但有时会随机断开连接。
Apple 有一份文档指定了维持良好/可靠连接所需的最佳连接参数集:
https://developer.apple.com/library/content/qa/qa1931/_index.html
具体是指以下参数:
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.
Interval Min ≥ 15 ms (multiples of 15 ms)
Interval Min + 15 ms ≤ Interval Max (Interval Max == 15 ms is allowed)
Interval Max * (Slave Latency + 1) ≤ 2 seconds
Interval Max * (Slave Latency + 1) * 3 < connSupervisionTimeout
Slave Latency ≤ 30
2 seconds ≤ connSupervisionTimeout ≤ 6 seconds
如何在 Linux 上为 BlueZ( hcitool / hciconfig ?)设置这些。
谢谢。
linux 内核将 /sys/kernel/debug/bluetooth/hci*
中的许多 experimental/advanced 属性公开为普通文件。
我发现 Linux 上的 Bluez 5.41 GATT 服务器和 iPhone 之间的 BLE 连接不可靠。连接正常,但有时会随机断开连接。
Apple 有一份文档指定了维持良好/可靠连接所需的最佳连接参数集:
https://developer.apple.com/library/content/qa/qa1931/_index.html
具体是指以下参数:
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.
Interval Min ≥ 15 ms (multiples of 15 ms)
Interval Min + 15 ms ≤ Interval Max (Interval Max == 15 ms is allowed)
Interval Max * (Slave Latency + 1) ≤ 2 seconds
Interval Max * (Slave Latency + 1) * 3 < connSupervisionTimeout
Slave Latency ≤ 30
2 seconds ≤ connSupervisionTimeout ≤ 6 seconds
如何在 Linux 上为 BlueZ( hcitool / hciconfig ?)设置这些。
谢谢。
linux 内核将 /sys/kernel/debug/bluetooth/hci*
中的许多 experimental/advanced 属性公开为普通文件。