SWRU368C May 2018 – January 2021 CC3100 , CC3100MOD , CC3200 , CC3200MOD
After finding a remote device by getting event SL_WLAN_P2P_DEV_FOUND_EVENT or by calling to the get_networkList API, there is an option to start a connection by using a command originating from the host. This command performs immediate P2P discovery. Once the remote device is found, the negotiation phase is started according to the negotiation initiator policy, method, and intent selected.
API:
sl_WlanConnect(char* pName, int NameLen, unsigned char *pMacAddr,
SlSecParams_t* pSecParams ,
SlSecParamsExt_t* pSecExtParams)
pName – The name of the remote device that is known to the user after getting event SL_WLAN_P2P_DEV_FOUND_EVENT or by calling to the get_networkList API.
NameLen – The length of pName
pMacAddr – The option to connect to a remote P2P according to its BSSID. Use {0,0,0,0,0,0} to connect according to MAC address.
pSecParams – See Section 10.2.5.
pSecExtParams – Value should be zero.
For example:
sl_WlanConnect("my-tv-p2p-device, 17, {0,0,0,0,0,0}
& pSecParams ,0);