Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.
CC3200 XMPP Reference Application
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: The service used by this example, Google Chat, has been phased out. This example no longer works as-is.|
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
Note: 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
- 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
- sl_NetAppXmppSet - Configure XMPP Server, Login Information
- sl_NetAppXmppConnect- Connect to XMPP Server
- sl_NetAppXmppSend - Send Chat Message to another XMPP Client
- sl_NetAppXmppRecv - Receive Chat Message from another XMPP Client
- Choose an AP and Configure the SSID as "cc3200demo" and Security as Open
- In source code set e-mail username and password
#define CLIENT_USER_NAME "cc32xx.apps" #define CLIENT_PASSWORD "xxxxxx"
Note: 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
- Login into Your Gmail Account on Chat/Hangout Application and add email@example.com as Contact
- Login into Gmail Account with firstname.lastname@example.org and accept Invite on Chat/Hangout Application. Logout from cc3200 apps Account.
- Login into Your Gmail Account on Chat/Hangout Application
- 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
- Run Application and Wait for it connect to XMPP Server
- Wait till you see "CC3200 SimpleLink" in your Chat/Hangout Application
- Send Chat Message to "CC3200 SimpleLink"
- Check the Reply
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.
- It only implements a limited set of functionality and has some limitations.
- Retreiving the full friend roster isn't supported
- Not checking the remote friend status (online, off line) before sending him a message