Skip to content

MSP432 LaunchPad Setup

Glenn Vassallo edited this page Apr 10, 2015 · 4 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 MSP432 LaunchPad can be found in the MSP432_Azure folder [here] (https://github.com/remixed123/IoT/tree/master/LaunchPads)

  1. Open the MSP432_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 MSP432 LaunchPad 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 main.c to reflect your WiFi Router Settings

Change the defines in the main.h to reflect your WiFi Router settings.

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

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

#define PASSKEY "YourPasscode" /* Password of the secured AP */

Save the Certificate Authority on the CC3100 Flash

  1. Remove the CC3100 BoosterPack from the MSP432 LaunchPad if currently connected.
  2. Connect the CC3100 BoosterPack to the CC3100 Advanced Emulation BoosterPack, making sure you align the white triangle in each board to each other.
  3. Connect the USB cable to the USB port of the CC3100 Advanced Emulation BoosterPack (USB Port on the right, marked as SPI/GPIO/UART/NWP)
  4. Open Device Manage in Windows Control Panel.
  5. And expand Ports (COM & LPT), you should see 4 CC3100BP PORTs
  6. Write down the port number for the third one in the list, for example COM15
  7. Use the certificate authority file "azurecacert.cer" which is located here.
  8. Start UniFlash for the CC3200/CC3100
  9. Select New Target Configuration
  10. Under COM Port, enter the COM Port you wrote down in the previous steps
  11. In UniFlash, Select Service Pack Programming and make sure you update the Service Pack to the latest version (see link at the beginning of the page for details on where to obtain the Service Pack or see the link in UniFlash next to the Service Pack Programming option)
  12. In Uniflash, click the "add file" option.
  13. Name the file to /cert/azurecacert.der
  14. In the Url field browser to the location of were you have stored azurecacert.cer
  15. Select the Erase and Update check boxes
  16. Select the top of the tree (CC31x Flash Setup Control) and then press program.
  17. Unplug the USB Port from the CC3100 Advanced Emulation BoosterPack
  18. Remove the CC3100 BoosterPack from the CC3100 Advanced Emulation BoosterPack
  19. Add the CC3100 BoosterPack to the MSP432 LaunchPad, making sure to align the white triangle together

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.