Tag Archives: CC3100

Connect Tiva Connected Launchpad to Exosite Cloud using TI Simplelink WiFi CC3100

Connect Tiva Connected Launchpad to Exosite Cloud using TI Simplelink WiFi CC3100

Device Connection to Exosite Cloud

This project connects Tiva Connected Launchpad to Exosite Cloud using TI SimpleLink WiFi CC3100.

Features:

  1. Sends temperature data from Sensor Hub Booster Pack TMP006 Sensor to Exosite Cloud. The temperature data is displayed at a Exosite Dashboard Widget.
  2. Tiva Connected Launchpad on board led’s D2 and D3, are toggled on and off from Exosite Dashboard.
  3. Sends Tiva Connected Launchpad switch press count to Exosite cloud. The switch press count is displayed at a Exosite Dashboard Widget. Switch press count is limited to 15 only, for demoing purposes. The switch press count is reset to 0 after reaching the set limit of 15.
  4. Sends an email alert if Tiva Connected Launchpad on-board switch 1 press count have reached the set trigger level. This is set at Exosite Dashboard.

Hardware Block Diagram:

Hardware Block Diagram1

Hardware Setup:

IMG_0250
Sensor Hub BP connected to BP1 connector. CC3100 BP connected to BP2 connetor

Overall Pin Compatibility:

tivabp1sensorhub

tivabp2cc3100bp

bpchecker7
Using TI online Booster Pack Checker Tool

Exosite Cloud Overview:

onep_hierarchy_overview1
Photo Resource: http://docs.exosite.com/oneplatform

Exosite is a internet of things software as a service(Saas) company that provides a platform for Internet of Things.

Using the Exosite Platform, data from your device can be virtualized and represented graphically using Exosite Dashboard Widgets. Some Exosite Dashboard Widgets are Big Number Widget, Line Graph Widget, On/Off Switch Widget,  which all can be seen at the Exosite Dasboard screenshot below for this project.

Temperature data from my device is sent to Exosite Cloud and is being represented graphically at Exosite Dashboard, using Big Number Widget and Line Graph Widget.

exosite dashboard1

Note: More information about Exosite Services can be found at their website.

Exosite Dashboard

To display your data at a Exosite Dashboard Widget stored at a Dataport or Data Source named Sensor Hub BP Temp. Set it as Data Source for that Exosite Dashboard Widget. See, as shown above.

Exosite Terms:

  • CIK (Client Interface Key)
    • Device private key.
    • Generated when you make a new device at Exosite Portal Account.
  • Dataport
    • Data storage of time stamped values that can be written and read from.
  • Dataport Alias
    • Use to identify a Dataport.
  • Dataport Type
    • integer, float, string
    • For “string” type, the maximum size of a value that can be written is 64KB.

Tools to generate HTTP Requests to Exosite:

  1. curl command line tool.
  2. Exoline, a command line tool that works with Exosite Services.

Write to Exosite Dataport:

  • Using curl command line tool. Input below at Windows command prompt.
curl http://m2.exosite.com/onep:v1/stack/alias -H "X-Exosite-CIK: YOUR_CIK_HERE" -H "Accept: application/x-www-form-urlencoded; charset=utf-8" -d sensortemp=77"
  • Using Exoline. Input below at Windows command prompt.
exo write YOUR_CIK_HERE sensortemp --value=“77“
  • Using exosite write C API.

exosite_write(“sensortemp=77”, 13); 

Note: replace YOUR_CIK_HERE with your device CIK.

Read to Exosite Dataport:

  • Using curl command line tool. Input below at Windows command prompt.
curl http://m2.exosite.com/onep:v1/stack/alias?sensortemp -H "X-Exosite-CIK: YOUR_CIK_HERE" -H "Accept: application/x-www-form-urlencoded; charset=utf-8"
  • Using Exoline. Input below at Windows command prompt.
exo read YOUR_CIK_HERE sensortemp
  • Using exosite read C API.

char cbuffer[20];
uint16_t response_length = 0;
Read_status = exosite_read("sensortemp", cbuffer, 20, &response_length);

Note: replace YOUR_CIK_HERE with your device CIK.

Program Resources:

  1. TI Code Composer Studio 6.1.0.
  2. TI CC3100 SDK, SimpleLink API’s.
  3. Exosite C library for SimpleLink devices.
  4. Tivaware for Tiva Connected Launchpad.
  5. getting_started_with_wlan_station for Tiva Connected Launchpad + CC3100 BP.
  6. temperature_tmp006 example program for Tiva Connected Launchpad + Sensor Hub Booster Pack.

SPI communication between Tiva MCU and CC3100 BP:

  • SPI API’s are mapped to SimpleLink API’s.
    • spi_Open(), initializes the Tiva MCU SPI Peripheral and Interrupt to communicate with CC3100 BP.
    • spi_Open() is mapped to SimpleLink API sl_IfOpen().
    • sl_IfOpen(), is called within sl_Start().
    • sl_Start(), is called within your main function to start the SimpleLink device.

Basic steps to connect your device to Exosite:

  1. Initialize device.
  2. Connect device to WiFi Access Point using SimpleLink API’s.
  3. Create socket to Exosite using SimpleLink API’s.

exosite_write() and exosite_read() key facts:

  • Calls exosite_pal API which internally calls SimpleLink API sl_Socket(), that creates socket to Exosite.
  • Calls exosite_pal API which internally calls SimpleLink API sl_Send(), that sends data to an open TCP Socket.
  • Calls exosite_pal API which internally calls SimpleLink API sl_Close(), that closes socket to Exosite.

exosite_pal(Physical Application Layer) API’s:

  • Part of Exosite C Library for SimpleLink Devices.
  • Calls SimpleLink API’s.

Program Flowchart:

Presentation Flowchart1

 

Slide2

Program: wlan_station_exosite_write_read

Tera Term Output:

TeraTermExosite1

TeraTermExosite2

Tiva Connected Launchpad Led On/Off, from Exosite Dashboard:

 

Send switch press count to Exosite Dashboard:

Links to Resources:

  1. TI Code Composer Studio
  2. TI Tiva Connected Launchpad
  3. TI SimpleLink WiFi CC3100 BP
  4. TI Sensor Hub BP
  5. Exosite Documentation
Advertisements

Testing WLAN Station with CC3100 Booster Pack and Tiva Connected Launchpad

IMG_0218

The WLAN station example program using CC3100 connects to a Wi-Fi access point and then checks for internet connectivity by pinging “www.ti.com”.

Earlier version of CC3100 SDK only includes WLAN station example program for Tiva Launchpad. Several TI e2e members including me modify the WLAN station to work for Booster Pack 1 connector for Tiva Connected Launchpad. From Tiva Connected Launchpad and CC3100 Booster Pack photo on top of the post the Booster Pack 2 connector is at the right side of the Tiva Connected Launchpad, near the debug USB cable.

During my try to modify the WLAN station to work for Booster Pack 1 connector for Tiva Connected Launchpad, I downloaded a fresh copy of CC3100 SDK, and found a WLAN station example program for Tiva Connected Launchpad. I imported the WLAN station example program to my Code Composer Studio workspace for Tiva Connected Launchpad. I build it and I got a build error pointing out that my Tivaware Installation path is not setup at Code Composer Studio.

I corrected the Path Variable TIVAWARE_ROOT and set the folder location to my Tivaware installation directory (C:\EK-TM4C129)

To change Path Variables go to CCS Project Properties->Resource->Linked Resources.

I rebuild the WLAN station example program for Tiva Connected Launchpad and the build errors got resolved.

After reviewing the WLAN station example program for Tiva Connected Launchpad, I found out that it is setup for Tiva Connected Launchpad Booster Pack 2 Connector

Here below is the pin connections table of Tiva Connected Launchpad Booster Pack 2 Connector and CC3100 Booster Pack

.TivaBP2CC3100

The highlighted “green” cells at the table indicates the pin compatibility of Tiva Connected Launchpad and CC3100 Booster Pack.

At Code Composer Studio, I “run” the WLAN station example program and got the desired output at Tera Term.

WLAN Station output at Tera Term

wlanstation

Later on I got to review the WLAN station example program for Tiva Connected Launchpad, to learn in depth how the entire program works.

The WLAN station example program for Tiva Connected Launchpad is a good starting point for anyone, who want to develop products with similar application.

I hope this guide be of some help to those trying out the WLAN station example program with CC3100 Booster Back and Tiva Connected Launchpad.

Texas Instruments CC3100 Booster Pack and CC3100 Emulator Booster Pack

IMG_0075 IMG_0076 IMG_0077 IMG_0078

The CC3100 is a wireless network processor and part of TI SimpleLink WiFi family that simplifies the implementation of internet connectivity.  This device integrates both WiFi and internet connectivity in one package.

I got the CC3100 Booster Pack and CC3100 Emulator after attending a Webex training by Texas Instruments introducing these new products. These are again free gifts by Texas Instruments for my active participation at Texas Instruments Engineer to Engineer Community and also being part of TI E2E MVP group. I am grateful to be receiving these gifts for helping people at E2E. Somehow, I feel like a  sports star getting free gifts from sponsors like Nike, or Adidas.

The CC3100 Booster Pack box got a dent on it, when I received it from Fedex. Luckily, the CC3100 Booster Pack was not damaged.

Here below are links about CC3100 Booster Pack and CC3100 Emulator Booster Pack:

CC31xx & CC32xx

Here below, is to show what it can be used for: