Delivering Feedback to the User
212
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Provisioning
the device was not able to connect to the wireless network (SSID was not found, WLAN connection failed,
or an IP address was not acquired), the smartphone app reports it the user. If the profile confirmation
failed because the confirmation result was not successfully delivered to the smartphone (feedback failed),
the smartphone app reports to the user that the confirmation was successful, and the networking
subsystem sends the host a successful confirmation result event (because the feedback was eventually
successfully provided to the user’s smartphone app).
15.8.1 External Confirmation
Feedback to the user’s smartphone app can also be delivered through an external cloud-based server.
When the SimpleLink device is able to connect to the configured network and acquire an IP address, it
tries to contact a cloud-based server over the internet. The user’s smartphone app, instead of connecting
the same wireless network that was configured to the provisioned device, also connects the cloud-based
server over the internet, and asks it if the SimpleLink device is able to connect to the cloud. In this mode,
the smartphone provisioning app does not need to discover the IP address acquired by the device.
Connecting the cloud-based server is not done internally by the networking subsystem, but by the host
application. When the device is able to successfully connect and acquire an IP address, it notifies the host
through an event that an IP address was acquired and that it may start sending socket commands to the
networking subsystem to connect the cloud server. If the device was able to successfully deliver the
feedback through the cloud server to the smartphone app, the host application should manually stop the
provisioning process by issuing a PROVISIONING_STOP command and order the networking subsystem
to stay in STA role (instead of restoring the previous role). The networking subsystem cannot
automatically stop the provisioning process, because it is not aware of the results coming from the cloud
and is unaware of the successful feedback delivery. If the device can acquire an IP address, but cannot
contact the smartphone app through the cloud server, the host application should notify the networking
subsystem about the failure by issuing an ABORT_EXTERNAL_CONFIRMATION command, and the
networking subsystem should prepare for another profile configuration attempt.
To use a cloud-based feedback, the external confirmation bit should be set in the provisioning host
command flags parameter.
15.9 External Configuration
When the provisioning process is started in APSC + external configuration mode, the device is ready to
serve stations trying to connect to it (for AP provisioning), ready to handle SmartConfig transmissions (SC
provisioning), and can allow the host to execute an additional external provisioning method that is not
implemented inside the networking subsystem (for example: WAC).
In this mode, the host is allowed to send commands and receive events from the networking subsystem
while provisioning is running. After the networking subsystem has successfully started the provisioning
process, it sends the EXTERNAL_CONFIGURATION_READY event to the host, which indicates that the
host may start executing its external provisioning method (for example: start listening on socket). At this
point, the end-user may choose which method to use: AP provisioning, SC provisioning, or the external
method implemented by the host application.
If the host application identifies that the end-user chose to use the external configuration method, it should
stop the internal running provisioning process by issuing a PROVISIONING_STOP command (the host
should also order the networking subsystem to stay in its current role after stopping the provisioning), and
continue carrying out the external provisioning process.
If the end-user has configured a profile using one of the internal provisioning methods (AP or SC
provisioning), the device must be restarted before it can continue the internal provisioning process. The
networking subsystem sends a RESET_REQUEST event to the host, and the host should stop its external
provisioning process (close all opened sockets, and so forth), restart the SimpleLink Wi-Fi device (by
sending sl_stop and sl_start commands), and wait for the internal provisioning process to end.