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
Contents
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.
![]() |
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
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[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
- 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
Usage[edit]
- 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 cc32xx.apps@gmail.com as Contact
- Login into Gmail Account with cc32xx.apps@gmail.com 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.
Limitations/Known Issues[edit]
- It only implements a limited set of functionality and has some limitations.
E.g:
- Retreiving the full friend roster isn't supported
- Not checking the remote friend status (online, off line) before sending him a message
Links[edit]
{{#invoke: Navbox | navbox }} {{#invoke: Navbox | navbox }}