各位好,
在ble从机里增加连接后广播的功能,也就是PLUS_BROADCASTER,连接后,从机主动调用GAPRole_TerminateConnection()后无效,取消PLUS_BROADCASTER后恢复正常。
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.
各位好,
在ble从机里增加连接后广播的功能,也就是PLUS_BROADCASTER,连接后,从机主动调用GAPRole_TerminateConnection()后无效,取消PLUS_BROADCASTER后恢复正常。
peripheral.c文件中,增加一个判断条件,就ok了。
/*********************************************************************
* @brief Terminates the existing connection.
*
* Public function defined in peripheral.h.
*/
bStatus_t GAPRole_TerminateConnection( void )
{
if ( gapRole_state == GAPROLE_CONNECTED || gapRole_state == GAPROLE_CONNECTED_ADV )
{
return ( GAP_TerminateLinkReq( gapRole_TaskID, gapRole_ConnectionHandle,
HCI_DISCONNECT_REMOTE_USER_TERM ) );
}
else
{
return ( bleIncorrectMode );
}
}