对比
- HCI可以看到iPhone作为主设连接外设时,可以看到:
connection Event Interval = 30ms;
connection Slave Latency = 0;
connection Supervision Timeout = 720ms; - 但苹果官方文档《 Accessory Design Guidelines for Apple Devices 》里41.6章里要求:
Supervision Timeout from 2 seconds to 6 seconds.
原因
这里720ms是iPhone作为主设connect时设定的connectionParameter,但是蓝牙协议允许外设来根据实际情况协商
connection Supervision Timeout以满足需求,故《 Accessory Design Guidelines for Apple Devices 》文档在此时约束了外设协商的 Supervision Timeout from 2 seconds to 6 seconds.
Supervision Timeout 的大小影响能耗及连接健壮性,需根据应用场景灵活设置此值来达到平衡,coreBluetooth API并未提供方法来修改connect的参数设置,故一般让机硬件来修改此Connection Parameter