连接断开之后是否会有事件通知?
在example中会有一个BLE状态改变的事件处理函数,里面会判断一下BLE状态:
typedef enum
{
GAPROLE_INIT = 0, //!< Waiting to be started
GAPROLE_STARTED, //!< Started but not advertising
GAPROLE_ADVERTISING, //!< Currently Advertising
GAPROLE_ADVERTISING_NONCONN, //!< Currently using non-connectable Advertising
GAPROLE_WAITING, //!< Device is started but not advertising, is in waiting period before advertising again
GAPROLE_WAITING_AFTER_TIMEOUT, //!< Device just timed out from a connection but is not yet advertising, is in waiting period before advertising again
GAPROLE_CONNECTED, //!< In a connection
GAPROLE_CONNECTED_ADV, //!< In a connection + advertising
GAPROLE_ERROR //!< Error occurred – invalid state
} gaprole_States_t;
我这边测试,连接断开时会触发GAPROLE_WAITING事件,但广播停止再开启(我要修改广播间隔)时也会触发这个事件,因此无法区分此事件是哪种情况触发的。
我该怎样来收到连接断开时的事件通知?
Viki Shi:
已在e2echina.ti.com/…/470969
AndyChen:
回复 Viki Shi:
Hi ,你这发的是一个链接吗?我无法打开这个链接