Table of Contents
Example Summary
This example demonstrates the functionality of the over-the-air updates of the CC31xx’s firmware file as well as the MSP432’s firmware by leveraging the device’s active Wi-Fi connection. A local web server is started that accepts a prebuilt TAR file that contains updated firmware for the MSP432 as well as any relevant user files. After submission of the TAR file, the MSP432 and CC31xx processes the file, performs a calculation and verification of the SHA256 hash, and then proceed to update any relevant files and firmware upon success.
Hardware Prerequisites
This code example was designed to work with the MSP432P4 family of devices and their corresponding LaunchPad evaluation modules:
Note that over-the-air updates on MSP432E4 families is not currently supported.
The host MSP432 LaunchPad requires either a CC3120 BoosterPack or a CC3135 BoosterPack to act as an application processor and gateway for cloud communication. Additionally a CC31XXEMUBOOST is required for initial flashing and configuration of the OTA device.
A picture of the MSP432P401 LaunchPad with the required CC3120 BoosterPack can be seen below:
A picture of the MSP432P4111 LaunchPad with the required CC3120 BoosterPack can be seen below:
Note that if the CC3135 is being used instead, the hardware configuration with the MSP432P4 devices is similar.
Software Prerequisites
This example has been validated against the latest software versions listed in the Release Notes.
For more information on how to import this project into your IDE workspace and build/run, please refer to the main user’s guide.
Note that the Uniflash utility is also required for creation and authoring of the OTA firmware package. A tutorial on how to use Uniflash as well as instructions on how to package an OTA image for firmware updates can be found in the main user’s guide.
Provisioning Method
The local_ota
code example is provisioned by hard coding the relevant router/access point information into the local_ota.h
source file using the following defines:
#define SECURITY_KEY ""
#define SECURITY_TYPE SL_WLAN_SEC_TYPE_OPEN
#define SSID_NAME "cc3120demo"
#define SSL_SERVER_KEY "ca-priv-key.der"
#define SSL_SERVER_CERT "ca_in_cert_store"
Change this configuration to match your router/network. Realistically speaking, most routers are going to have a secured network with a WPA2 security key. The following, for example, would setup the code example to connect to the network with the SSID of sushi and a WPA key of lupiniii
/* Values for below defines shall be modified for setting the AP connection properties */
#define SECURITY_KEY "lupiniii"
#define SECURITY_TYPE SL_WLAN_SEC_TYPE_WPA_WPA2
#define SSID_NAME "sushi"
#define SSL_SERVER_KEY "ca-priv-key.der"
#define SSL_SERVER_CERT "ca_in_cert_store"
Usage
For a full tutorial/guide on how to use the OTA firmware update (both the local_ota and cloud_ota), please refer to the SimpleLink Academy Training Module on TI’s Resource Explorer.
Known issues and limitations
- Internet Explorer 11 browser does not work in its default state. In order to make it work, possible workaround is to use development mode (F12), and switch the Edge drop down menu on the top right to 10 instead of default.
- The SSL keys (ca_ in_ cert_store and ca-priv-key.der) are not update-able over the air.