Texas Instruments CC3100 SimpleLink User Manual

CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
User's Guide
Literature Number: SWRU375D
June 2014–Revised May 2018
Contents
1 Trademarks......................................................................................................................... 4
2 Introduction......................................................................................................................... 4
2.1 Prerequisites.............................................................................................................. 4
3 Getting Started .................................................................................................................... 4
3.1 Download and Install Software......................................................................................... 4
3.2 Update Service Pack .................................................................................................... 4
4 Getting Started with SimpleLink Studio .................................................................................. 5
4.1 Configure Boards......................................................................................................... 5
4.2 Run the Software......................................................................................................... 8
5 Getting Started with the MSP430F5529.................................................................................. 13
5.1 Configure Boards ....................................................................................................... 13
5.2 Run the Software ....................................................................................................... 15
6 Summary........................................................................................................................... 20
7 Acronyms Used.................................................................................................................. 20
Revision History.......................................................................................................................... 21
Table of Contents
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
1 CC3100BOOST.............................................................................................................. 5
2 CC31XXEMUBOOST ....................................................................................................... 6
3 Connect the CC3100BOOST to the CC31XXEMUBOOST............................................................ 7
4 Device Manager.............................................................................................................. 8
5 MinGW Installation Screen ................................................................................................. 9
6 Import Existing Code....................................................................................................... 10
7 Paths and Symbols ........................................................................................................ 11
8 Eclipse Output Console ................................................................................................... 11
9 CC3100BOOST ............................................................................................................ 13
10 Jumpers on the MSP430F5529 Launchpad ............................................................................ 14
11 Connect the CC3100BOOST to the MSP430F5529 Launchpad .................................................... 15
12 Select CCS Projects to Import............................................................................................ 16
13 Define SSID_Name ........................................................................................................ 17
14 Launch Tera Term ......................................................................................................... 17
15 Tera Term VT............................................................................................................... 18
16 Macro Definition of SSID_Name ......................................................................................... 18
17 Launch Tera Term ......................................................................................................... 19
18 Tera Term VT............................................................................................................... 19
List of Figures
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
Copyright © 2014–2018, Texas Instruments Incorporated
List of Figures
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting
This guide is intended to assist users in the initial setup and demonstration of the Getting Started with WLAN Station application. The guide explains how to install an Integrated Development Environment (IDE), and then compile, download, and debug Getting Started with WLAN Station.
1 Trademarks
SimpleLink is a trademark of Texas Instruments. Microsoft, Windows are registered trademarks of Microsoft. Wi-Fi is a registered trademark of Wi-Fi Alliance.
2 Introduction
2.1 Prerequisites
The user should have the following items:
One CC3100BOOST
One CC31XXEMUBOOST or MSP430F5529 Launchpad
An 802.11b/g/n Wireless Access Point (AP)
A computer running Microsoft®Windows®7 or XP operating systems.
User's Guide
SWRU375D–June 2014–Revised May 2018
Started Guide
ABSTRACT
3 Getting Started
3.1 Download and Install Software
Download and install the following software:
CC3100 SDK package http://www.ti.com/tool/cc3100sdk – This guide assumes the use of the default installation folder C:\TI\CC3100SDK_<x.x.x>\. .
3.2 Update Service Pack
If the board is not already flashed with the service pack for SDK_<x.x.x>, the latest service pack for SDK_<x.x.x> must be flashed on the CC3100. The latest service pack can be downloaded from
http://www.ti.com/tool/cc3100sdk. Refer to the UNIFLASH Quick Start guide for details on flashing the
service pack to the CC3100 (http://processors.wiki.ti.com/index.php/CC31xx_%26_CC32xx_UniFlash#Service_Pack_Programming). Details on setting up the hardware for flashing can be found in Section 4.1 .
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
4 Getting Started with SimpleLink Studio
4.1 Configure Boards
1. The jumpers on the CC3100BOOST should be connected as shown in Figure 1.
Getting Started with SimpleLink Studio
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
Figure 1. CC3100BOOST
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
Getting Started with SimpleLink Studio
2. The jumpers on the CC31XXEMUBOOST should be connected as shown in Figure 2.
www.ti.com
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Figure 2. CC31XXEMUBOOST
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
3. Connect the CC3100BOOST to the CC31XXEMUBOOST as shown in Figure 3.
Getting Started with SimpleLink Studio
Figure 3. Connect the CC3100BOOST to the CC31XXEMUBOOST
4. Connect the J6 port CC31XXEMUBOOST to the PC using the provided micro-USB cable.
5. The CC3100BOOST is now visible in the Device Manager as shown in Figure 4. The user may see two COM ports instead of four.
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
Getting Started with SimpleLink Studio
www.ti.com
4.2 Run the Software
The Getting Started with WLAN Station example uses SimpleLink Studio. This example performs the following functions:
1. Program restores WLAN configuration to factory default
2. Prompts the user for the SSID of an AP
3. Prompts the user for the security type
4. Prompts the user for the password to the AP
5. Attempts to acquire an IP address through DHCP
6. Attempts to reach the internet
NOTE: For full compatibility ensure Visual Studio 2010 is used. Newer versions of Visual Studio will
not work with the device. Visual Studio 2012 works with the "getting started" example, but gives the error code -2003 for the weather example, and error code -2005 for the email app.
Option 1. Microsoft Visual Studio:
1. Download and install Microsoft Visual Studio Express 2010 from http://www.visualstudio.com/en-
us/downloads/download-visual-studio-vs#DownloadFamilies_4.
2. Open Microsoft Visual Studio Express, and select File>Open>Project/Solution.
3. Navigate to C:\TI\CC3100SDK_<x.x.x>\cc3100-
sdk\platform\simplelinkstudio\example_project_vs\getting_started_with_station , and open getting_started.sln.
4. Select Build>Build Solution from the menu.
5. When building is complete, select Debug>Start Debugging from the menu.
Figure 4. Device Manager
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
Option 2. Eclipse:
1. Download and install the latest version of Java: https://www.java.com/en/download/. Install the correct
2. Download and extract Eclipse from http://www.eclipse.org/downloads/. Choose the Eclipse IDE for
3. Download and install MinGW from
Getting Started with SimpleLink Studio
version for the system (64-bit or 32-bit).
C/C++ Developers package. Install the correct version for the system (64-bit or 32-bit).
http://sourceforge.net/projects/mingw/files/latest/download?source=files. During installation, ensure the
following configurations are selected:
a. Set the installation location as C:\MinGW. b. In the MinGW Installation Screen, select packages for mingw32-base and mingw32-gcc-g++ as
shown in Figure 5.
Figure 5. MinGW Installation Screen
c. After selecting the packages, choose Installation>Apply Changes from the menu, then press Apply. d. Select Installation>Quit from the menu to quit the installer.
4. After a successful MinGW installation, add the path (c:\MinGW\bin\) to the Windows environment variable path by going into Control Panel>System>Advanced System Settings>Environment Variables. Under System Variables, select PATH and press Edit. Append “;C:\MinGW\bin\” to the end of the line and press Ok.
5. Open Eclipse by running eclipse.exe from the extracted Eclipse folder.
6. In the "Select a workspace," choose your desired workspace directory (for example: C:\Users\myself\Desktop\eclipse_workspace). This directory should be different from the user's other versions of Eclipse.
7. From the menu, select File>New>Makefile Project with Existing Code.
8. Enter ‘Getting_started’ as the project name.
9. For Existing Code Location, enter C:\TI\CC3100SDK_<x.x.x.>\cc3100- sdk\platform\simplelinkstudio\example_project_eclipse\getting_started_with_station .
10. For Toolchain for indexer settings, choose “MinGW GCC” as shown in Figure 6.
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
Getting Started with SimpleLink Studio
www.ti.com
11. Press Finish.
12. Select Window>Show View>Project Explorer from the menu.
13. Select the Getting_started project in the Project Explorer, and select File>Properties from the menu.
14. In the Project Explorer window, right click on <Project_Folder_Name>, then select Property.
15. Expand the C/C++ Build menu, and select Tool Chain Editor. Under Current Builder, Select "Gnu Make Builder", then click Apply.
16. Click the C/C++ Build menu and do the following:
a. Uncheck 'Use the default build command.' b. Type mingw32-make -f Makefile in the Build command. c. Uncheck 'Generate Makefiles automatically.' d. Set the Build Directory as: ${workspace_loc:/Getting_started}
17. Select Environment in the C/C++ Build menu. Ensure the value of MSYS_HOME is empty, then click Apply.
18. Click the C/C++ General menu, and select Paths and Symbols. Under the Includes tab, in the
10
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Figure 6. Import Existing Code
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
Getting Started with SimpleLink Studio
Languages column, select GNU C. Press the Add button to add the directory: C:\TI\CC3100SDK_<x.x.x>\cc3100-sdk\simplelink\include .
Figure 7. Paths and Symbols
19. Press OK.
20. To fix a known bug in the Eclipse console output, add the following line of code to the beginning of the main function:
setvbuf(stdout, NULL, _IONBF, 0);
Figure 8. Eclipse Output Console
21. Save the file, and select Project>Clean from the menu.
22. Select the Getting_started project and press OK.
23. Select the Getting_started project from Project Explorer, and from the menu select Project>Build
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
11
Getting Started with SimpleLink Studio
Project.
24. Press Ctrl+F11 to start the program.
www.ti.com
12
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
5 Getting Started with the MSP430F5529
5.1 Configure Boards
1. The jumpers on the CC3100BOOST should be connected as shown in Figure 9.
Getting Started with the MSP430F5529
Figure 9. CC3100BOOST
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
13
Getting Started with the MSP430F5529
2. The jumpers on the MSP430F5529 Launchpad should be connected as shown in Figure 10.
www.ti.com
Figure 10. Jumpers on the MSP430F5529 Launchpad
14
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
3. Connect the CC3100BOOST to the MSP430F5529 Launchpad as shown in Figure 11.
Getting Started with the MSP430F5529
Figure 11. Connect the CC3100BOOST to the MSP430F5529 Launchpad
4. Connect a Micro-USB cable from J7 on the Boosterpack to the Windows PC, and connect a Micro­USB cable from J401 on the MSP430F5529 Launchpad to the Windows PC.
5.2 Run the Software
The example shown provides output using UART. To see the output from the program, download Tera Term (or similar software) from http://en.sourceforge.jp/projects/ttssh2/releases/
Option 1. Code Composer Studio (CCS):
1. Download and run the Code Composer Studio 6.1.0 (CCS) installation wizard (ccs_setup_win32.exe) from the TI website or from the CCS Wiki page. The program must be Version 6.1.0.00104 or later. When prompted to select processor support, select the MSP Ultra Low Power MCUs processor support option. The remaining options for the installer should be left as the default. Installation may take up to an hour.
2. Open CCS, and choose File>Import from the menu. Under C/C++, choose CCS Projects.
3. Under Select Search Directory, enter the path: C:\TI\CC3100SDK_<x.x.x>\cc3100- sdk\platform\msp430f5529lp\example_project_ccs .
4. Check the project getting_started_with_wlan_station and press Finish.
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
15
Getting Started with the MSP430F5529
www.ti.com
5. Open the sl_common.h file located at the path C:\TI\CC3100SDK_<x.x.x>\cc3100-
sdk\examples\common\.
6. Edit sl_common.h to use the SSID, security type, and security key of the AP being used. Edit the macros SSID_NAME, SEC_TYPE, and PASSKEY to contain the AP information as shown in
Figure 13. The security types supported for this demo are WPA/WPA2, WEP (5/13 ASCII), and Open.
WEP supports key index 1 only. For Open security, define SEC_TYPE as SL_SEC_TYPE_OPEN. For WPA and WPA2 security, define it as SL_SEC_TYPE_WPA. For WEP security, define it as SL_SEC_TYPE_WEP.
16
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Figure 12. Select CCS Projects to Import
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
7. Select the getting_started_with_wlan_station project in Project Explorer and select Project>Build
8. Launch Tera Term, and create a new serial connection to the MSP430F5529 Launchpad COM port as
9. Press F11on the CCS window to start debugging.
Getting Started with the MSP430F5529
Figure 13. Define SSID_Name
Project from the menu.
shown in Figure 14. The baud rate should remain at 9600.
10. If the CC3100 successfully completes all steps, the serial output appears as shown in Figure 15.
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
Figure 14. Launch Tera Term
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
17
Getting Started with the MSP430F5529
www.ti.com
Figure 15. Tera Term VT
Option 2. IAR Workbench
1. Install IAR Workbench for MSP430 version 6.20 or later: http://www.iar.com/en/Products/IAR-
Embedded-Workbench/TI-MSP430/.
2. Open IAR Workbench and select File>Open>Workspace from the menu.
3. Select the project: C:\TI\CC3100SDK_1.2.0\cc3100-
sdk\platform\msp430f5529lp\example_project_iar\getting_started_with_wlan_station\ getting_started_with_wlan.eww .
4. Open the sl_common.h file located at the path C:\TI\CC3100SDK_<x.x.x>\cc3100-
sdk\examples\common\ .
5. Edit sl_common.h to use the SSID, security type and security key of the AP being used. Edit the macros SSID_NAME, SEC_TYPE, and PASSKEY to contain the AP information as shown in
Figure 16. The security types supported for this demo are WPA/WPA2 and Open. For Open security,
define SEC_TYPE as SL_SEC_TYPE_OPEN. For WPA and WPA2 security, define it as SL_SEC_TYPE_WPA.
Figure 16. Macro Definition of SSID_Name
6. Select Project>Rebuild All from the menu.
7. Launch Tera Term, and create a new serial connection to the MSP430F5529 Launchpad COM port as shown in Figure 17. The baud rate should remain at 9600.
8. After building is finished, select Project>Download and Debug from the menu to start debugging.
18
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
Getting Started with the MSP430F5529
Figure 17. Launch Tera Term
9. If the CC3100 successfully completes all steps, the serial output appears as shown in Figure 18.
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
Figure 18. Tera Term VT
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
19
Summary
6 Summary
After the development environment has been set up, see the following resources for further assistance in development:
CC3100 Programmer's Guide – This guide contains information on how to use the SimpleLink API for writing WLAN-enabled applications.
Uniflash – The Uniflash tool is used for manually storing files on the external serial flash. This includes the SimpleLink firmware patch file and any configuration files, security certificates, web pages, and so forth.
CC3100 Wiki – All information and tools for the CC3100, including the above, can be found on the CC3100 Wiki page.
7 Acronyms Used
STA – Wi-Fi Station AP – Wi-Fi Access Point WLAN – Wireless LAN CCS – Code Composer Studio GCC – GNU Compiler Collection
www.ti.com
20
CC3100 SimpleLink™ Wi-Fi®and IoT Solution Getting Started Guide
Copyright © 2014–2018, Texas Instruments Incorporated
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
Revision History
Revision History
NOTE: Page numbers for previous revisions may differ from page numbers in the current version.
Changes from C Revision (March 2016) to D Revision .................................................................................................. Page
Updated Note. ............................................................................................................................. 8
Added Eclipse Output Console image. ............................................................................................... 11
SWRU375D–June 2014–Revised May 2018
Submit Documentation Feedback
Copyright © 2014–2018, Texas Instruments Incorporated
Revision History
21
IMPORTANT NOTICE FOR TI DESIGN INFORMATION AND RESOURCES
Texas Instruments Incorporated (‘TI”) technical, application or other design advice, services or information, including, but not limited to, reference designs and materials relating to evaluation modules, (collectively, “TI Resources”) are intended to assist designers who are developing applications that incorporate TI products; by downloading, accessing or using any particular TI Resource in any way, you (individually or, if you are acting on behalf of a company, your company) agree to use it solely for this purpose and subject to the terms of this Notice.
TI’s provision of TI Resources does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TI products, and no additional obligations or liabilities arise from TI providing such TI Resources. TI reserves the right to make corrections, enhancements, improvements and other changes to its TI Resources.
You understand and agree that you remain responsible for using your independent analysis, evaluation and judgment in designing your applications and that you have full and exclusive responsibility to assure the safety of your applications and compliance of your applications (and of all TI products used in or for your applications) with all applicable regulations, laws and other applicable requirements. You represent that, with respect to your applications, you have all the necessary expertise to create and implement safeguards that (1) anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures that might cause harm and take appropriate actions. You agree that prior to using or distributing any applications that include TI products, you will thoroughly test such applications and the functionality of such TI products as used in such applications. TI has not conducted any testing other than that specifically described in the published documentation for a particular TI Resource.
You are authorized to use, copy and modify any individual TI Resource only in connection with the development of applications that include the TI product(s) identified in such TI Resource. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY OR INTELLECTUAL PROPERTY RIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or other intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information regarding or referencing third-party products or services does not constitute a license to use such products or services, or a warranty or endorsement thereof. Use of TI Resources may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.
TI RESOURCES ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMS ALL OTHER WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING TI RESOURCES OR USE THEREOF, INCLUDING BUT NOT LIMITED TO ACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILURE WARRANTY AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHTS.
TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY CLAIM, INCLUDING BUT NOT LIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS EVEN IF DESCRIBED IN TI RESOURCES OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH OR ARISING OUT OF TI RESOURCES OR USE THEREOF, AND REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
You agree to fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of your non­compliance with the terms and provisions of this Notice.
This Notice applies to TI Resources. Additional terms apply to the use and purchase of certain types of materials, TI products and services. These include; without limitation, TI’s standard terms for semiconductor products http://www.ti.com/sc/docs/stdterms.htm), evaluation
modules, and samples (http://www.ti.com/sc/docs/sampterms.htm).
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2018, Texas Instruments Incorporated
Loading...