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.

CC3200 XMPP Reference Application

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


Overview[edit]

This example code demonstrate how to connect and work with Extensible Messaging and Presence Protocol(XMPP) server using CC32xx. This code doesn't implement a full XMPP SW stack\library. Please check the Limitation Section for more details.

Warning Warning: The service used by this example, Google Chat, has been phased out. This example no longer works as-is.

Application details[edit]

The application performs the following steps:

  • Initializes the device networking layers.
  • Connect to Access Point with SSID "cc3200demo" and Security as "Open"
  • Wait for the Connection to the AP
  • Once AP connection is done, It Configures the XMPP Server and Login Information
  • It then Connects to Configured XMPP Server (google.com) followed by authentication using Base64 Encrypted Login Credential
  • Once Authentication is Successful, It waits for a chat message from another Client
  • Once it receives the Chat Message, It replies back with the Same message


NoteNote: Use your own email-id (CLIENT_USER_NAME) & password(CLIENT_PASSWORD) in source code (main.c) and build the project before running the application.
This example can be used either on TI-RTOS or FreeRTOS.

For the application to work with TI-RTOS, ti_rtos_config project needs to be imported into the application workspace. These projects can be found in CC3200-SDK under ti_rtos folder. Please follow this link for CC3200 TI-RTOS usage CC3200 TI-RTOS

Source Files briefly explained[edit]

  • main - Simple Application demonstrating XMPP Client Functionalities.
  • netapps\xmpp\client - libxmpp is Platform Independent Library and can be Integrated to any XMPP Client Software using below APIs
    1. sl_NetAppXmppSet - Configure XMPP Server, Login Information
    2. sl_NetAppXmppConnect- Connect to XMPP Server
    3. sl_NetAppXmppSend - Send Chat Message to another XMPP Client
    4. sl_NetAppXmppRecv - Receive Chat Message from another XMPP Client

Usage[edit]

  1. Choose an AP and Configure the SSID as "cc3200demo" and Security as Open
  2. In source code set e-mail username and password
#define CLIENT_USER_NAME    "cc32xx.apps"
#define CLIENT_PASSWORD     "xxxxxx"

NoteNote: By default, the expected message length and user ID length (Jabber ID) is set to 50, please modify the following MACRO as per your requirement

#define REMOTE_USERID_LEN   50
#define RECV_MSG_LEN        50
  1. Login into Your Gmail Account on Chat/Hangout Application and add cc32xx.apps@gmail.com as Contact
  2. Login into Gmail Account with cc32xx.apps@gmail.com and accept Invite on Chat/Hangout Application. Logout from cc3200 apps Account.
  3. Login into Your Gmail Account on Chat/Hangout Application
  4. Run the reference application (Flashing the bin/IAR/CCS)
    • Open the Project as mentioned in the 'docs\CC3200-Getting Started Guide.pdf' or flash xmpp.bin to the device.
    • XMPP Reference Application on CCS runs on TI RTOS which requires additional tools to be Installed. Refer to CC3200 TI-RTOS for more information.
    • Build and download the application to the board
  5. Run Application and Wait for it connect to XMPP Server
  6. Wait till you see "CC3200 SimpleLink" in your Chat/Hangout Application
  7. Send Chat Message to "CC3200 SimpleLink"
  8. Check the Reply
    CC3200 xmpp chat window.png

LED Status Notification

  • Red LED will glow when device is connected to AP
  • Orange LED will glow when device gets any chat message from the server.




Limitations/Known Issues[edit]

  • It only implements a limited set of functionality and has some limitations.

E.g:

  1. Retreiving the full friend roster isn't supported
  2. Not checking the remote friend status (online, off line) before sending him a message

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 CC3200 XMPP Reference 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 CC3200 XMPP Reference Application here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article CC3200 XMPP Reference Application here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article CC3200 XMPP Reference Application here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article CC3200 XMPP Reference Application here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CC3200 XMPP Reference Application here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CC3200 XMPP Reference Application here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article CC3200 XMPP Reference Application here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article CC3200 XMPP Reference 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