NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

CC3100 Email Demo Application

From Texas Instruments Wiki
Jump to: navigation, search
Cc31xx cc32xx return home.png
Cc31xx return sample apps.png

Overview and application details[edit]

This sample application demonstrates how CC3100 can be used to send an email over SMTP. The application configures CC3100 to connect w/ an SMTP server and sends email to it. SMTP server forwards it to the recipient's email-server and the recipient receives the email from his email-server using IMAP/POP3 and/or other proprietary protocol.

CC3101_Email_app_email_setup.png


NoteNote: This wiki page is only applicable for CC3100-SDK v1.0.0 and upward releases. For documentation on older SDKs' examples, refer corresponding file in <cc3100-sdk-installation-location>\cc3100-sdk\docs\examples\

Email application's sequence[edit]

CC3101 Email app sequence.png


  • Client first makes a TCP connection with SMTP server.
  • SMTP server replies back w/ response-code and greeting-message containing FQDN
  • HELO/EHLO – Client sends Hello Message to the server. ESMTP accepts EHLO
  • The SMTP server replies with Code 250 and Hello Message. ESMTP Server replies with SMTP extensions it supports such as Email maximum Size, authentication etc.
  • If SMTP server requires authentication, the client sends “auth login” followed by “Username” and “Password” encoded with proper encryption accepted by SMTP Server.
auth login
334 VXNlcm5hbWU6
  • Client sends "Username" encoded with proper encryption accepted by SMTP server
a2F1c2hmmdmdmdmhbGt1a2thckBnhfjdhfdjjsksbWFpbC5jb20
  • Client sends "Password" encoded with proper encryption accepted by SMTP Server
334 UGFzc3dvcmQ6
Mlklkdldldl21haWxhYjskjdkskjss2Mzc3M=
  • SMTP server replies with Authentication Success/Failure.
535 Incorrect authentication data/ 235 Authentication Successful
  • SMTP client then sends From-Address
MAIL FROM: xyz@abc.com
  • SMTP client sends To-Address
RCPT TO: abc@ti.com
  • SMTP client sends DATA command
DATA
  • SMTP client sends email data.
  • SMTP server responds with the acknowledgement


Source Files briefly explained[edit]

  1. main - Initializes the device, connects to an access-point and configures the email
  2. email - Wrapper functions to connect to SMTP-Server and send the configured email. These functions are called from main
  3. base64 - Functions to convert the raw bytes in quasi-big-endian order to Base64 string

Usage[edit]

Prerequisite: This application requires an access-point with internet connectivity

  • Connect the board to a Windows-PC and configure the terminal-program for seeing the logs - CC3100 & CC3200 Terminal Setting has detailed instructions for configuring the terminal-program
  • Open sl_common.h and change SSID_NAME, SEC_TYPE and PASSKEY as per your access-point properties - SimpleLink device will connect to this AP when the application is executed
  • Open config.h and change values for USER and PASS for setting up the source email.
  • Edit the same file and change values for DESTINATION_EMAIL, EMAIL_SUBJECT and EMAIL_MESSAGE for setting up the email properties
  • Compile and run the application
  • See the self explanatory logs on the terminal-program's console. On success, below message will be displayed on the terminal and an email is sent to the destination email-ID
Email_1.png


Note: User may need to turn on the access for the less secure apps from the Google account settings to run this example.



Limitations/Known Issues[edit]

  • The size of the message is currently 64.
  • Subject should be less that 30 characters
  • Destination email should be less that 30 characters.
  • For this example users must alter the default Gmail security settings to a lower security level. If this modification is not made, the server will reject the sending action.

Links[edit]

{{#invoke: Navbox | navbox }} {{#invoke: Navbox | navbox }}

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article CC3100 Email Demo Application here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article CC3100 Email Demo Application here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article CC3100 Email Demo Application here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article CC3100 Email Demo Application here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article CC3100 Email Demo Application here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CC3100 Email Demo Application here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CC3100 Email Demo Application here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article CC3100 Email Demo Application here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article CC3100 Email Demo Application here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity