SWRU473A February   2017  – August 2018 CC3120MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF

 

  1.   SimpleLinkrep%#8482; Wi-Fi® CC3220 Out-of-Box Application
    1.     Trademarks
    2. 1 Introduction
    3. 2 Download and Installation
    4. 3 Installation for Basic Users
      1. 3.1 UniFlash
      2. 3.2 SimpleLink™ Wi-Fi® Starter Pro Mobile Application
      3. 3.3 Serial Terminal
      4. 3.4 XDS110 Driver Installation
    5. 4 Building the Setup
    6. 5 Flashing the Out-of-Box Project
    7. 6 Getting Started With the OOB Demonstration
      1. 6.1 Connecting to the CC3220
        1. 6.1.1 CC3220 Provisioning
        2. 6.1.2 CC3220 as AP
      2. 6.2 Browse Onboard Website
        1. 6.2.1 Local Network Demo
        2. 6.2.2 OTA Update
        3. 6.2.3 Advanced Settings
      3. 6.3 Using the Mobile Application
        1. 6.3.1 Connect to the CC3220
        2. 6.3.2 Local Network Demo
        3. 6.3.3 OTA Update
          1. 6.3.3.1 Local OTA When CC3220 is in AP Mode
      4. 6.4 Returning to Factory Image
    8. 7 Troubleshooting
      1. 7.1 Red LED Legend
      2. 7.2 Extra Debugging
      3. 7.3 Terminal Messages
    9. 8 Limitations and Known Issues
    10. 9 Out-of-Box for Advance Users
      1. 9.1 Installations for Advance Users
        1. 9.1.1 CC3220 Software Development Kit (SDK)
        2. 9.1.2 Service Pack
        3. 9.1.3 CCS IDE
          1. 9.1.3.1 Add CCS Support for FreeRTOSv9
          2. 9.1.3.2 Product Settings Verification
      2. 9.2 Source Files Briefly Explained
      3. 9.3 Building the OOB Project Using CCS
        1. 9.3.1 Executing in Debug Mode
        2. 9.3.2 Program a User Modified OOB Binary
  2.   Revision History

Source Files Briefly Explained

out_of_box.c – main file creates all tasks in the system. The tasks include the simplelink task, provisioning task, link local task, OTA task, and control task. This file also includes implementation of the control task which implements the switching to AP mode and registration of all SimpleLink callbacks

Provisioning_task.c – includes all provisioning-related implementation and procedures. The file also includes a piece of code for the OTA bundle committing procedure. The flow of the task follows:

  1. Decide whether the CC3220 is in station or AP mode.
  2. If the CC3220 is in station mode:
    • Connect to an AP using a stored profile.
    • Check if the CC3220 is coming out of an OTA update. If so, check whether the CC3220 managed to connect to the AP.
      • If connected, commit the OTA.
      • If not connected, reboot the application so the new image is reverted.
    • Check whether the CC3220 managed to connect to the AP.
      • If the CC3220 is not connected, start provisioning.
  3. If the CC3220 is in AP mode:
    • Check if it is coming out of an OTA update. If so, check whether the CC3220 managed to initialize an AP.
      • If successful, commit the OTA.
      • If unsuccessful, reboot the application so the new image is reverted.
    • Check whether the CC3220 managed to initialize an AP.
      • If unsuccessful, start provisioning.

Link_local_task.c – includes implementation of local link communication between the CC3220 web server and the connected web client. The set of available operations include retrieving data from the CC3220 database, as well as updating the CC3220 database. All operations use RESTful API.

Table 4 lists the set of all operations.

Table 4. HTTP Server Methods

Service Operation Description
Device Get Fetches MAC address, IP address, and SSID of the AP, to which the CC3220 server is connected. In case CC3220 is in AP mode, SSID is the name of CC3220.
Light Get and Post Fetches and updates the state of the onboard red LED (D7).
Sensor Get Fetches the value of X, Y, and Z accelerometer axis.
OTA Put Uploads the OTA image to the CC3220 web server.
OTA Get Fetches the current OTA version.

Ota_task.c – implements a tiny HTTP report server (running on proprietary TCP port). This server reports the status of the progress bar during the OTA update.

OtaArchive.c – extracts the archive image received during the OTA update, and updates the local file system.

OtaJson.c – includes minimal Json parser services tailored for parsing the metadata header file during the OTA update.

oob_common.c – includes common resources for all tasks. These tasks include synchronization and mailbox objects, sensors readings, and platform reboot.

bma222drv.c – implements an accelerometer sensor driver.

tmp006drv.c – implements a temperature sensor driver.