SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The Wi-Fi Direct connection policy is divided into two major configurations:
This value indicates in which Wi-Fi Direct mode the device acts (CLIENT, GO, or other). This configuration is done by using the macro SL_WLAN_P2P_POLICY. Three defines can be used when setting the intent:
This configuration is persistent according to the system-persistent configuration.
This value determines whether the SimpleLink Wi-Fi device first initiates the negotiation or passively waits for the remote side to initiate the negotiation. This configuration must be used when working with two SimpleLink Wi-Fi devices. In general, the user does not have a GUI to start the negotiation by pressing a button or by entering a pin key. Therefore, this option is given to avoid starting the negotiation at the same time by both devices after the discovery process.
This configuration is persistent according to the system-persistent configuration.
Example:
_i16 Status;
Status = sl_WlanPolicySet(SL_WLAN_POLICY_P2P, SL_WLAN_P2P_POLICY( SL_WLAN_P2P_ROLE_NEGOTIATE,
SL_WLAN_P2P_NEG_INITIATOR_RAND_BACKOFF) , NULL,0);
if( Status )
{
/* error */
}