GAPCentralRole_StartDiscovery( DEFAULT_DISCOVERY_MODE,
DEFAULT_DISCOVERY_ACTIVE_SCAN,
DEFAULT_DISCOVERY_WHITE_LIST );
也就是搜索的时候,只要广播里的数据有变都能收到。
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.
所有从从机发过来的GATT封包可以在simpleBLECentralProcessGATTMsg()里收到。
你好,simpleBLECentralProcessGATTMsg()这里是不是,建立连接的。
我现在
case GAP_DEVICE_INFO_EVENT:
{
// if filtering device discovery results based on service UUID
if ( DEFAULT_DEV_DISC_BY_SVC_UUID == TRUE )
{
if ( simpleBLEFindSvcUuid( SIMPLEPROFILE_SERV_UUID,
pEvent->deviceInfo.pEvtData,
pEvent->deviceInfo.dataLen ) )
{
simpleBLEAddDeviceInfo( pEvent->deviceInfo.addr, pEvent->deviceInfo.addrType );
//打印主机搜索到的广播数据
NPI_WriteTransport ( pEvent->deviceInfo.pEvtData, osal_strlen((char *)(pEvent->deviceInfo.pEvtData)));
}
}
}
这里获取广播数据,更新数据需要再次发送搜索命令