Common Events and Errors
214
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Provisioning
During provisioning, the device might switch between different roles and connection statuses without
notifying the host application; thus, when the process is stopped, a report about the current status of the
device is sent to the host. When the value of the status parameter is
SL_WLAN_PROVISIONING_STOPPED (12), additional information is provided through the following
parameters:
•
Role: The active role (AP/STA) after the provisioning process ended.
•
WlanStatus: If the active role is STA, this parameter also shows the device WLAN connection status
(0-Disconnected, 1-Scanning, 2-Connecting, 3-Connected) after the provisioning process ended.
•
Ssid, SsidLen: If WlanStatus is connected, these parameters provide the SSID to the connected
device.
These parameters are not relevant in other provisioning status values.
15.10.2 Provisioning Profile-Added Event
When a profile is configured to the device during provisioning, the
SL_WLAN_EVENT_PROVISIONING_PROFILE_ADDED event is sent to the host.
15.10.3 Reset Request Event
During the provisioning process, the SimpleLink device might automatically restart itself as part of process.
If a restart is required while the host application is busy (for example, when the host has opened sockets
during external configuration provisioning), instead of performing the restart automatically, the networking
subsystem asks the host application to do it. When this event arrives, the host should stop its activities (for
example, close all opened sockets), and restart the device by issuing sl_stop and sl_Stop commands.
15.10.4 Errors
shows the following values that may be returned when a provisioning command is issued.
Table 15-3. Errors
STATUS_OK
0
Command was successfully executed.
SL_ERROR_WLAN_PROVISIONING_ABORT_
PROVISIONING_ALREADY_STARTED
-2169
Start provisioning command failed because provisioning process
is already running.
SL_ERROR_WLAN_PROVISIONING_ABORT_
HTTP_SERVER_DISABLED
-2170
Start provisioning command failed because the HTTP server is
disabled.
SL_ERROR_WLAN_PROVISIONING_ABORT_
PROFILE_LIST_FULL
-2171
Start provisioning command failed because the profile list is full.
SL_ERROR_WLAN_PROVISIONING_ABORT_I
NVALID_PARAM
-2172
Start provisioning command failed because one of the
parameters was invalid.
SL_ERROR_WLAN_PROVISIONING_ABORT_
GENERAL_ABORT
-2173
Start provisioning command failed because of an unknown
reason.
SL_ERROR_WLAN_PROVISIONING_CMD_NO
T_EXPECTED
-2177
Provisioning command failed because it was not expected.
15.10.5 Host Commands During Provisioning
During the provisioning process, the device switches between different roles, connects to different APs,
and changes its IP addressthus, the host commands may not be properly served. As a result, when a
command is issued by the host application during an active provisioning process, the
SL_RET_CODE_PROVISIONING_IN_PROGRESS (–2014) error is returned. The only allowed
commands are sl_WlanProvisioning and sl_stop. If host is interested to execute a different command, it
must either wait for the provisioning process to end, or to manually stop it (using the
SL_WLAN_PROVISIONING_CMD_STOP command). In addition, events that may be sent to the host
during the provisioning connection attempts (such as NETAPP_IPACQUIRED) are blocked, and will not
reach the host application (except for dedicated provisioning events, such as the provisioning status
event).