继续2540问题
继续请教各位,设想是一个主机扫描接受50个从机的广播数据,但是想从机在收到主机的SCAN REQ后(表示主机已经收到从机的广播数据)就关闭广播,以减少干扰,查看
typedef enum
{
GAPROLE_INIT = 0, //!< Waiting to be started
GAPROLE_STARTED, //!< Started but not advertising
GAPROLE_ADVERTISING, //!< Currently 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;
后还是找不到相应的状态,请问可以给些建议吗?
bs,
这个是很有意思的想法。
但是很可惜,这个在应用层做不到,因为根据协议,scan 和它的response都是在LL层做完的,所以你没法知道下面是什么状态。
想想其他的办法吧,比如每个设备广播一段时间,停一下。
谢谢Yan,只能再想其他办法了。
mark