SWRU368C May 2018 – January 2021 CC3100 , CC3100MOD , CC3200 , CC3200MOD
Profile configuration makes an automatic P2P connection after a reset or disconnection from the remote peer device. This command stores the P2P remote device parameters in flash as a new profile along with profile priority. These profiles are similar to station profiles and have the same automatic connection behavior. The connection depends on the profile policy configuration.
If auto-start policy is on, a P2P discovery is performed. If one or more of the remote devices that are found are adapted to the profiles, a negotiation phase is started according to the negotiation initiator policy, method, and intent selected. The highest priority profile is chosen.
To add a profile with the push-button negotiation method, call to:
sl_WlanProfileAdd(char* pName, int NameLen, unsigned char *pMacAddr,
SlSecParams_t* pSecParams , SlSecParamsExt_t*
pSecExtParams, unsigned long Priority,
unsigned long Options)
An example of adding a profile with the push-button negotiation method:
sl_WlanProfileAdd(SL_SEC_TYPE_P2P_PBC,
remote_p2p_device,
strlen(remote_p2p_device),
bssidEmpty,
0/*Priority*/,0,0,0);
An example of adding a profile with the keypad negotiation method:
sl_WlanProfileAdd(SL_SEC_TYPE_P2P_PIN_ DISPLAY,
remote_p2p_device,
strlen(remote_p2p_device),
bssidEmpty,
0/*Priority*/,key,8/*keylen*/,0);