在bluetooth 4.0里有说,当peripheral接收到central发送的updata connection request后,peripheral可以选择接受,或则断开连接,
但是在TI的例程中,我似乎没有看到这一步,
请问peripheral接受到central发送的updata connection request后,会触发什么事件呢,还是例程中已经默认是接受呢?
谢谢大家!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi sw yang
是的,协议栈是规定由central来决定是否执行更新peripheral的更新请求的,2540里的协议栈默认是接受peripheral的更新请求的。
static void simpleBLECentralEventCB( gapCentralRoleEvent_t *pEvent )
{
case GAP_LINK_PARAM_UPDATE_EVENT://这个事件表示完成一次参数更新,如果你从机有发起更新请求,主机应该会触发这个事件
}
另外,主机在连接期间可以随时调用以下API来修改连接参数:
bStatus_t GAPCentralRole_UpdateLink( uint16 connHandle, uint16 connIntervalMin,
uint16 connIntervalMax, uint16 connLatency,
uint16 connTimeout );