Skip to content

CC3200 LaunchPad Setup

Glenn Vassallo edited this page Apr 10, 2015 · 32 revisions

Prerequisites

Setup Steps

Generate Shared Access Token

You will need to generate a SAS Token, this can be done using one of the following methods

  • Build the Visual Studio Project that contains a Windows Form Application with C# code available from here

OR

  • Install and use the already built and published application from here

Edit main.c to reflect your Azure setup and Shared Access Token details

The CCS project for the CC3200 LaunchPad can be found in the CC3200_Azure folder [here] (https://github.com/remixed123/IoT/tree/master/LaunchPads)

  1. Open the CC3200_Azure project in Code Composure Studio so that you can edit source code.
  2. Change #define EH_SERVER_NAME to #define Your_EH_Server_Name
  3. Change #define POSTHEADER "POST /swiftsoftware-eh/messages HTTP/1.1\r\n" to #define POSTHEADER "POST /Your_EH_Server_Name/messages HTTP/1.1\r\n"
  4. Change #define HOSTHEADER "Host: swiftsoftware-ns.servicebus.windows.net\r\n" to #define HOSTHEADER "Host: Your_Service_Bus_Name_Space.servicebus.windows.net\r\n"
  5. Change #define AUTHHEADER "Authorization: SharedAccessSignature sr=swiftsoftware-ns.servicebus.windows.net&sig=6sIkgCiaNbK9R0XEpsKJcQ2Clv8MUMVdQfEVQP09WkM%3d&se=1733661915&skn=EventHubPublisher\r\n" to #define AUTHHEADER "Authorization: SharedAccessSignature sr=Your_Service_Bus_Name_Space.servicebus.windows.net&sig=Your_Shared_Access_Token&se=1733661915&skn=Your_Eventhub_Shared_Access_Policy\r\n"

Note: You can choose not to make any changes, and the telemetry generated by the CC3200 will be sent to my Event Hub, you can then view the Telemetry here.

Edit main.c to select a NTP Server in your geography

To create a secure TLS socket the current time is required, this is obtained from an NTP Server. It is best to use one close to your geographically. The code includes some suggestions, you can also perform an Internet search to find one in your location.

Search on "g_acSNTPserver[30]" in main.c to find where in the code the NTP Server details can be modified

Edit common.h to reflect your WiFi Router Settings

Change the defines in the common.h of the CC3200 SDK to reflect your WiFi Router settings. common.h can be found in the common example in the example folder of the CC3200 SDK.

#define SSID_NAME "YourWifiRouterSSID" /* AP SSID */

#define SECURITY_TYPE SL_SEC_TYPE_WPA /* Security type (OPEN or WEP or WPA*/

#define SECURITY_KEY "YourSecurePassword" /* Password of the secured AP */

Save the Certificate Authority on the CC3200 Flash

  1. Use the certificate authority file "azurecacert.cer" which is located here.
  2. Start UniFlash for the CC3200/CC3100
  3. In Uniflash, click the "add file" option.
  4. Name the file to /cert/azurecacert.der
  5. In the Url field browser to the location of were you have stored azurecacert.cer
  6. Select the Erase and Update check boxes
  7. Select the top of the tree (CC31x Flash Setup Control) and then press program.

Additional Assistance: UniFlash Quick Start Guide.

Note: You can download your own Certificate from a browser or from the Certificate Manager in Windows. Azure uses the Baltimore CyberTrust Root. Details on how to perform these steps can be found here, at the bottom of the page.

Trouble Shooting

You can connect via serial port and receive debug output. This is recommended should you have any issues as the debug output is quite comprehensive.