The Texas Instruments SimpleLink™ Wi-Fi® CC3220SF LaunchPad™ development kit is an easy and cost effective way to get started with Wi-Fi connected devices.
Scan this tutorial to get familiar with it. Then complete each step in a sequential manner. Each step builds upon the previous one.
This tutorial supports Windows, macOS and Linux. It shows you how to load precompiled firmware onto the device.
Tip: If you would like to build the firmware from source code then please see our tutorial TI CC3220SF Built From Scratch.
This tutorial will teach you how to upload Xively and Wi-Fi credentials to the CC3220SF board using UniFlash, so that a prebuilt application can connect to the Xively service.
Texas Instruments SimpleLink™ Wi-Fi® CC3220SF Wireless Microcontroller LaunchPad™ development kit
SimpleLink Wi-Fi CC3220SF Wireless Microcontroller LaunchPad
- Precompiled Xively C Client and Client Example
- UniFlash for TI Microcontrollers version 4.1
You should have a Xively account.
Before connecting a physical device to Xively, create its digital representation in the system. Log into the Xively management app to complete the following steps.
This operation will create a device template and a device instance in Xively to represent your CC3220SF board.
- Click on
Add another device.
- From the popup window select
Choose from our template libraryand click
- From the sections tabs at the top of the window go to
Quickstart Kits, select
TI CC3200, and click
In order for your device to securely talk to Xively it needs credentials that it will use to authenticate itself as a valid device within your account.
- Go to
All devicesand look for your sample CC3200 device. Click on its name.
- Click on
When the modal window pops-up, click the
A file named
MQTTCredentials.txtgets downloaded. It contains the device credentials that will be used in the next step. The file contains two data items:
- The first line is the Xively Device Secret.
- The second line is the Xively Device Id.
You now have a provisioned device in Xively that your CC3220SF will be able to connect as.
To allow your device to publish and subscribe to MQTT topics you will need your account ID.
- Click on the cogwheel in the top right-hand corner of the page and click the turquoise rectangle with your account id.
Your account id has been copied to the clipboard.
- Save your account id for later. It will be needed for
xively_demoapplication configuration in the next step.
Now you have all of the credentials for your device.
UniFlash is an application that loads firmware onto TI devices. Once the firmware is loaded, the device will always boot this firmware when powered on.
- Download UniFlash version 4.1 appropriate for your host operating system (Windows, Linux or macOS): UniFlash.
- Run the UniFlash installer.
- Once installation completes, check
Launch UniFlashand click
Finishto leave the installer.
The UniFlash image is a ZIP file that contains the Xively client binary executable.
- Download the Xively CC3220 UniFlash ZIP archive from the Xively C Client github repository.
- Run UniFlash if it's not already running.
- In UniFlash, in the
Device Configurationfield, type "CC3220" and select
CC3120 / CC3220.
Note: Do not select the
CC3220SFdevice. If you did, click on the
Selected Deviceagain to change it to the
CC3120 / CC3220option.
Start Image Creator.
- Click the
- Select the UniFlash ZIP file that you downloaded from the Xively Github repository above, and click
- Highlight the new
XivelyProductionimage and click on the
Result: You have successfully imported the Xively Client image to UniFlash, and it is ready to be configured with your Xively credentials. At this stage UniFlash looks as follows:
The Xively Client for the CC3220SF reads your Wi-Fi and Xively credentials from a file stored in flash memory on the device. Prepare your Xively Device ID, Xively Device Secret, Xively Account ID, and Wi-Fi credentials to copy them to a text file so that the CC3220SF client may read them.
- In UniFlash, in the left-hand bar, click
- Hover your mouse over the file in
etc/xively_config.txtand click on the
- Save this file to your Desktop and open the file in your favorite text editor.
- Copy and paste your Xively AccountID, DeviceID, and DeviceSecret into the accountId, deviceId, and password fields, respectively.
- Enter your Wi-Fi SSID (name) and password into the corresponding fields.
- Ensure that your Wi-Fi security type is properly represented.
Tip: The default
"wpa2"value is the most popular type of Wi-Fi network. Other options include "open", "wep", "wpa", and "wpa_ent".
- Save the file.
- In UniFlash, hover over the xively_config.txt file and click the
A standard file manager opens.
- Browse to the
xively_config.txtfile that you have altered on your desktop and click
- Click the
- Click the
Result: The image for your device is now fully configured and ready to be flashed onto your device.
- Set the J15 jumper to
1on your device. This is the Sense on Power (SOP) jumper near the right-side button of the device.
Note: At the time of unboxing, the device has this jumper set to
2which prevents the device from being flashed.
- Plug the USB cable that came with your device into the CC3220SF power socket at the top of the board, and connect the USB cable to your computer.
- In the UniFlash project, click the
Connectbutton and wait for the dialog box to disappear.
Note: This step gathers information from the device including it's MAC address, which is required before burning the firmware. When the dialog box disappears, you will see MAC and other device-specific information on the right side of UniFlash.
- Click the
Generate Imageicon in the bottom right.
- Click the
Program Image (Create & Program)button at the top.
UniFlash writes the image on your board and a progress bar appears. This may take about 30 seconds.
- Wait until you see
Programming complete, and click
Result: Your device reboots and runs the test program.
You did it! You now have a CC3220SF board connected and communicating with Xively.
To see the status of your device, go back to the device page in the Xively management app. The device status is now
Connected, and on the
Logs tab you see its
Device connected lifecycle log.
To see the graphical representation of data received from your device such as temperature and button states, go to Product Launcher. You can also turn on and off LEDs on the board using this web page interface.
The device's LEDs flash to indicate that the application is connecting to your Wi-Fi network and to the Xively service. Once connected, the LEDs turn off so they may be controlled by the Product Launcher.
If a connection problem persists, create a serial connection to the device (as described below in Creating a Serial Connection). The serial log may give you a specific reason for the failure.
A flashing green light indicates there is an error in parsing your Xively credentials and Wi-Fi credentials file. Please review Step 4 above.
If solidly lit, the green LED signifies that the
xively_cfg.txt file has been parsed correctly, and the application has progressed to the next stage: connecting to your Wi-Fi network.
A flashing orange light indicates there is a problem joining your Wi-Fi network. Check your Wi-Fi SSID, password, and security type in
xively_cfg.txt as described in steps 4.5 - 4.6 above.
If solidly lit, the orange LED signifies that the device has successfully connected to your Wi-Fi network and is attempting to connect to the Xively service.
A flashing red light indicates there is an error in connecting your device to Xively. Check your Xively device credentials in
xively_cfg.txt as described in steps 1 and 4.4 above.
Use serial connection to connect to your device in case your device fails to connect to Xively and you need to diagnose the problem, or you are curious about what the device is currently doing.
- Install a serial terminal program.
We recommend Putty (Windows) or Serial Tools (macOS).
- Ensure that UniFlash is closed.
Note: Depending on what UniFlash is currently doing, it might monopolize the serial connection that you are trying to establish. It is the safest to close the program until you become more comfortable with UniFlash connection states.
- Use your serial terminal program to connect to your device.
The connection should have the following terminal properties:
- Baud Rate: 115200
- Data Bits: 8
- Stop Bits: 1
- Parity: None
- Flow Control: None
- Com Port: This is specific to your computer. This is usually
com3on Windows, and
- Start the terminal session by clicking
Connecton your client.
- To get the full console log, reset your device. Press the button adjacent to the power cable at the top of your CC3220SF.
Updated about a year ago