SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
Feedback to the user’s smartphone app can also be delivered through an external cloud-based server. When the SimpleLink device can 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, rather than connecting to the same wireless network that was configured to the provisioned device, also connects the cloud-based server over the internet, and asks 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 to 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 when the provisioning process is started.