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.

作为Peripheral如何自己断开连接



GAP_TerminateLinkReq( uint8 taskID, uint16 connectionHandle );是断开链路连接的函数,taskID是GAP_TaskId吗,也就是0x04?

我把这个函数放到中断按键函数中,我是这样这样设置的GAP_TerminateLinkReq( 0x04, GAP_CONNHANDLE_ALL );

然后用lightBlue连接设备,按键后,LightBlue并没有显示连接断开,而且还能继续读取数据。

请问正确是设置方法是什么?自己琢磨了一晚...实在搞不定了,请教各位的指点。谢谢了