SWRA513C January   2020  – September 2020 CC3120 , CC3120MOD , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF

 

  1.   Trademarks
  2. 1Introduction
    1. 1.1 Terminology
  3. 2Overview
    1. 2.1 General Description
  4. 3Provisioning Configuration Modes
    1. 3.1 AP Provisioning
    2. 3.2 SmartConfig Provisioning
    3. 3.3 AP Plus SmartConfig Provisioning
    4. 3.4 AP Plus SmartConfig Plus External Configuration Provisioning
  5. 4Initiating the Provisioning Process
    1. 4.1 Host-Initiated Provisioning
    2. 4.2 Auto-Provisioning
    3. 4.3 Ending the Provisioning Process
  6. 5Profile Confirmation
    1. 5.1 Feedback
      1. 5.1.1 Local Feedback
      2. 5.1.2 External Feedback (Cloud)
    2. 5.2 Confirmation Fail
  7. 6External Configuration
  8. 7Host APIs
    1. 7.1 Provisioning Command
    2. 7.2 Provisioning Status Event
    3. 7.3 Provisioning Profile-Added Event
    4. 7.4 Reset Request Event
    5. 7.5 Blocking APIs During Provisioning
  9. 8Provisioning Use Examples
    1. 8.1 Successful SmartConfig Provisioning
    2. 8.2 Unsuccessful SmartConfig Provisioning
    3. 8.3 Successful SmartConfig Provisioning With AP Fallback
    4. 8.4 Successful AP Provisioning
    5. 8.5 Successful AP Provisioning With Cloud Confirmation
    6. 8.6 Using External Configuration Method: WAC
    7. 8.7 Successful SmartConfig Provisioning While External Configuration Enabled
  10. 9Provisioning HTTP/HTTPS Server APIs
  11.   Revision History

Provisioning Command

The host controls the provisioning process using one command: sl_WlanProvisioning

_i16 sl_WlanProvisioning(_u8 ProvisioningCmd, _u8 RequestedRoleAfterSuccess, _u16 InactivityTimeoutSec, char *pSmartConfigKey, _u32 Flags);

  • ProvisioningCmd: Specifies the provisioning configuration method.

    Table 7-1 lists the values the ProvisioningCmd command can have.

    Table 7-1 ProvisioningCmd Values
    CommandValueAction
    SL_WLAN_PROVISIONING_CMD_START_MODE_AP0Start provisioning in AP configuration mode.
    SL_WLAN_PROVISIONING_CMD_START_MODE_SC1Start provisioning in SmartConfig configuration mode.
    SL_WLAN_PROVISIONING_CMD_START_MODE_APSC2Start provisioning in AP plus SmartConfig configuration mode.
    SL_WLAN_PROVISIONING_CMD_START_MODE_APSC_EXTERNAL_
    CONFIGURATION
    3Start provisioning in AP plus SmartConfig configuration mode, and enable the use of external configuration methods.
    SL_WLAN_PROVISIONING_CMD_STOP4Stop currently running provisioning process.
    SL_WLAN_PROVISIONING_CMD_ABORT_EXTERNAL_CONFIRMATION5Stop currently running confirmation stage, if external confirmation is used. Device returns to configuration stage.
  • RequestedRoleAfterSucess: The desired role (AP or STA) to which the device should switch if provisioning is successful (relevant only if the value of the ProvisioningCmd is 0, 1, 2, or 3). If the value of the ProvisioningCmd command is SL_WLAN_PROVISIONING_CMD_STOP (4), this parameter can be used (by using a value of 0 × FF) to order the device to stay in its current role (instead of switching back to the role that was active when provisioning started, as usually occurs when provisioning is stopped).
  • InactivityTimeoutSec: Defines the period of time (in seconds) the system waits before it automatically stops the provisioning process when no user activity is detected. Relevant only if the value of the ProvisioningCmd command is 0, 1, 2, or 3.
  • Flags: Optional configuration conducted by a bitmap.
    Table 7-2 Flags
    CommandValueAction
    BIT_0ENABLE_EXTERNAL_CONFIRMATIONDefines whether to use external confirmation or not. Relevant only if the value of the ProvisioningCmd command is 0, 1, 2, or 3.
  • pSmartConfigKey: Symmetric key which is used to decrypt the credentials of the configured network transferred from the mobile application. Use the same key in the mobile application and in the SimpleLink device. The key length must be set to 16 characters. The security key must be unique for each product (recommendation: add a label on the product with the unique security key).
  • Return values: (see Table 7-3)
    Table 7-3 Return Values
    CommandValueAction
    STATUS_OK0Command was successfully executed.
    SL_ERROR_WLAN_PROVISIONING_ABORT_PROVISIONING_ALREADY_STARTED–2169Start provisioning command failed because provisioning process is already running.
    SL_ERROR_WLAN_PROVISIONING_ABORT_HTTP_SERVER_DISABLED–2170Start provisioning command failed because HTTP server is disabled.
    SL_ERROR_WLAN_PROVISIONING_ABORT_PROFILE_LIST_FULL–2171Start provisioning command failed because profile list is full.
    SL_ERROR_WLAN_PROVISIONING_ABORT_INVALID_PARAM–2172Start provisioning command failed because one of the parameters is invalid.
    SL_ERROR_WLAN_PROVISIONING_ABORT_GENERAL_ABORT–2173Start provisioning command failed because of an unknown reason.
    SL_ERROR_WLAN_PROVISIONING_CMD_NOT_EXPECTED–2177Provisioning command failed because it was not expected.