Introduction
This example demonstrates the use of the WINC1500 with the SAMD21 Xplained Pro board to implement an MQTT based chat. It uses the following hardware:
- the SAMD21 Xplained Pro.
- the WINC1500 on EXT1.
Main Files
- main.c : Initialize the WINC1500, connect to MQTT broker and chat with the other devices.
- mqtt.h : Implementation of MQTT 3.1
Usage
- Configure below code in the main.h for AP information to be connected.
- Build the program and download it into the board.
- On the computer, open and configure a terminal application as the follows.
* Baud Rate : 115200
* Data : 8bit
* Parity bit : none
* Stop bit : 1bit
* Flow control : none
* Line-Ending style : LF or CR+LF
*
- Start the application.
- In the terminal window, First of all enter the user name through the terminal window.
- And after the text of the following is displayed, please enjoy the chat.
- Initialization operations takes a few minutes according to the network environment.
* Preparation of the chat has been completed.
*
Known Issue
- The user name cannot contain space (' ').
- Cannot send more than 128 bytes.
- User name must be unique. If someone uses the same user name, Which one will be disconnected.
- USART interface has not error detection procedure. So sometimes serial input is broken.
Compilation Information
This software was written for the GNU GCC compiler using Atmel Studio 6.2 Other compilers may or may not work.
Contact Information
For further information, visit Microchip.