Cloud enabled Stellaris Cortex M3 using GPRS Cellular connection
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

================================================================================ ReadMe for Stellaris ATDT Cloud

ABOUT: Explains the contents in the stellaris_atdt_cloud project
AUTHOR: Exosite

License of all cloud-specific components is BSD, Copyright 2012, Exosite LLC (see LICENSE file)

General Overview:

This project demonstrates how to use a Stellaris Development Kit to send and receive data to/from the cloud via Exosite's Cloud Data Platform. The communication with the cloud is accomplished over HTTP with the Janus-RC GSM864Q GPRS modem. The project sends AT command over a UART to the Janus modem. The project functionality writes a 'Ping' value to the cloud and reads a value 'interval' from the cloud. Cloud information is shown on the on-board LCD screen. For some development kits with enough screen size, an option to read a public temperature data source is also available to display on the screen.

The source code in this folder is a project called "Stellaris ATDT Cloud" which has been verified with Code Composer Studio 4 and IAR for the following TI Stellaris Development Kits:

  • EK-LM3S6965 (with addition of RS232 Transceiver)
  • EK-LM3S1968 (with addition of RS232 Transceiver)
  • RDK-IDM-L35

Note: This code can be used with any of the Stellaris Development kits that have a UART accessible. Some modification may be required depending on the UART used and the display/LCD available. Also, some kits have RS232 signal levels on UARTs (like the RDK-IDM-L35) and others are only TTL. For TTL UART signals, a RS232 transceiver will need to be connected to properly interface with the cellular modem which accepts a RS232 serial connection.

Project Notes:

  • The project is based on the Stellaris libraries in the Stellarisware package for the relevant Stellaris processor (see Development Guide)

  • PART_LM3S6965
    --) uses UART0 for GRPS comms
    --) uses the OLED display for messages

  • PART_LM3S1968
    --) uses UART2 for GRPS comms
    --) uses the OLED display for messages

  • RDK-IDM-L35
    --) uses UART2 for GRPS comms
    --) uses the QVGA LCD display for messages
    --) can show public temp if #define PUBLICTEMP 1 is undefined in main.c. and 'pubtemp' data source is available.
    --) The application starting location is set to 0x00000800 because these RDK kits come with a serial boot loader loaded at 0x00000000. If using the .bin file and LM Flash utility make sure to program at this location.

CCS4 Quick Start:

  1. Sign-up for an Exosite Portals account (
    -) Create a device (need CIK)
    -) Add data source with Alias 'ping', format 'integer'
    -) Add data source with Alias 'interval', format 'integer'
    -) Write a value to the 'interval' data source (like '60').
    -) Add a public data source using a public temperature data source with an RID, set Alias to 'pubtemp'.

  2. Install TI CCS4 & StellarisWare for a supported processor (see Development Guide)

    • NOTE: Installed CCS4 to C:\CCS4 (ran installer as Admin)
    • NOTE: Installed StellarisWare to C:\StellarisWare (ran installer as Admin)
  3. Open a workspace at C:\StellarisWare\boards\ek-lm3s6965 (or \em-lm3s1968\ or \rdk-idm-l35) and copy the folder "stellaris_atdt_cloud" and all sub-folders & files into that location

  4. Set the Active Build Configuration (Debug or Release version for LM3S6965, LM3S1968, or RDK-IDM-L35) from Project -> Active Build Configuration

  5. Edit the CIK value and APN information in exosite_gprs.h. Get your APN from your cellular provider.

  6. Compile and download

Development Guide:

  1. Read the "Future Improvments" items below - these are items that are need to be fixed before the code base is production-ready

  2. When compiling for a different uP version or board, make modifications to exosite_utils.c. Note the usage of #ifdefs for PART_LM3S6965 for example.

  3. Board-specific development software tools:

    • Development for EK-LM3S6965 (which is defined as PART_LM3S6965) is accomplished by downloading and installing the software from (Version 855, release date 2/01/2012)

    • Development for EK-LM3S1968 (which is defined as PART_LM3S1968) (also supports LM3S1958) is accomplished by downloading and installing the software from (Version 855, release date 2/01/2012)

    • Development for RDK-IDM-L35 (which is defined by PART_RDK-IDM-L35 and PART_LM3S1958) is accomplished by downloading and installing the software from (Version 855, release date 2/01/2012)

  4. NOTE that the environment variable "SW_ROOT" must be defined. If it is not, for some reason (you will get build errors about include option missing dir), add a user environment variable "SW_ROOT" as "C:\Stellarisware" under Window -> Preferences -> C/C++->Managed Build

  5. NOTE that you must first build a Release version of the $\StellarisWare\driverlib\ccs-cm3 to generate library files for UART, etc... before release versions of the project can be build. Stellarisware default install only includes precompiled Debug versions of the dependencies.

  6. NOTE that the Janus Terminus Modem must have RTS and CTS tied together on the RS232 side. The Stellaris UARTs used are not using flow control. Buffer over-flows will happen, inconsistent modem responses, and not data socket communications will work if this is not done.

Future Improvements:

  • Add record function
  • Add flash write function to store CIK
  • Add Provisioning
  • AT# SGACT turns off automatically
    • The OFF condition cause is unknown
    • Add Error retry
  • Modem usually needs 30 to 40 seconds to be ready to use after power-on, look to see if code can detect this better and not try to configure socket until it's ready.
  • Add support for Serial and Ethernet bootloaders for RDK kits.
  • Not totally satisfied with the stability of CloseSocket... may need to make more robust
  • Not totally satisfied with failure retries, although hard failures do eventually catch themselves
  • Fix up GPRS state machine for GPRS_STATE_AT_SGACT_GET & GPRS_STATE_AT_SGACT_SET (backwards retry logic)

================================================================================ Release Info

Release 2012-04-23

--) Initial release