描述
连接参数更新过程允许Peripheral设备或Central设备更新已建立连接的链路层连接参数。
场景
当设备处于Central角色时,该设备应支持连接参数更新过程。 当设备仅充当Peripheral角色时,该设备可能支持连接参数更新过程。 当设备担任Broadcaster或Observer角色时,该设备不应支持连接参数更新过程。
Central设备应使用[Vol 6] B部分第5.1.1节中定义的Link Layer Connection Update procedure以及所需的连接参数发起Connection Update procedure,如果Central或Peripheral设备不支持Connection Parameters Request Link Layer Control procedure。
如果Central或Peripheral设备均支持Connection Parameters Request Link Layer Control procedure,Central或Peripheral设备应使用在[Vol 6] B部分第5.1.7节中定义的Connection Parameters Request Link Layer Control procedure以及所需的连接参数发起Connection Update procedure。
如果Central或Peripheral设备不支持Connection Parameters Request Link Layer Control procedure,则Peripheral设备
应使用[Vol 3] A部分第4.20节中定义的L2CAP Connection Parameter Update Request command以及所需的连接参数启动连接参数更新过程。Peripheral设备不得在收到L2CAP连接参数更新响应的TGAP(conn_param_timeout) 内发送L2CAP Connection Parameter Update Request command。当Central设备接受Peripheral设备发起的Connection Parameter Update时,Central设备应启动[卷6] B部分第5.1.1节中定义的Link Layer Connection Update procedure并使用 TGAP(conn_param_timeout)中的必需连接参数来。
如果请求或更新的连接参数对于Central或Peripheral设备而言是不可接受的,则它可能会断开连接,并显示错误代码0x3B(Unacceptable Connection Parameters)。设备应容忍远程设备为其提供的连接参数。
小结
更新连接参数的三个过程:
- Connection Parameters Request Link Layer Control procedure(Initiator: Central/Perpheral)
- Link Layer Connection Update procedure (Initiator: Central)
- L2CAP Connection Parameter Update Request command(Initiator: Perpheral)