SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The provisioning process can be started after receiving an explicit request from the host application. When the host initiates the provisioning process, it should provide the desired configuration mode, the role (AP/STA) to which the device should switch in case of a successful provisioning, and an inactivity time-out value which defines the period of time (in seconds) that the system waits before it automatically stops the provisioning process when no user activity is detected. During provisioning, the device may have higher power consumption than usual, so TI does not recommend using long inactivity time-out values (of more than few minutes).
An example of starting provisioning from the host application (in AP+SC configuration mode):
_i32 status;
status = sl_WlanProvisioning(SL_WLAN_PROVISIONING_CMD_START_MODE_APSC,
ROLE_STA,
PROVISIONING_INACTIVITY_TIMEOUT,
NULL, 0x0);
if (0 > status)
{
/* handle error */
}
Once the provisioning process has started, it continues to run until one of the following occurs:
When the provisioning process is stopped due to a host request or the inactivity time-out, the device switches back to the role (AP/STA) that was active before the provisioning process started. If the process stops because a profile was successfully confirmed, the device switches to the role defined by the host during the provisioning start command. After the provisioning process is successfully stopped, a PROVISIONING_STOPPED event is sent to the host. This event is sent after switching to the desired role is done. The host application should wait for the PROVISIONING_STOPPED event before issuing any additional commands. If the host application tries to issue a command during an active provisioning process, the command is not served and an error is returned.
An example of stopping provisioning from the host application:
_i32 status;
status = sl_WlanProvisioning(SL_WLAN_PROVISIONING_CMD_STOP,
0,
0,
NULL, 0x0);
if (0 > status)
{
/* handle error */
}