---
title: "W5500EVB_MQTT_Blinker"
url: "https://maker.wiznet.io/ronpang/projects/w5500evb-mqtt-blinker/"
markdown_url: "https://maker.wiznet.io/ronpang/projects/w5500evb-mqtt-blinker/md"
type: "UCC: User Created Content"
author: "westlu"
author_url: "https://github.com/westlu/W5500EVB_MQTT_Blinker"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "westlu"
original_url: "https://github.com/westlu/W5500EVB_MQTT_Blinker"
published: "2023-02-02"
language: "en"
likes: 8
views: 624
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# W5500EVB_MQTT_Blinker

> W5500EVB_MQTT_Blinker

Original author: westlu (source: https://github.com/westlu/W5500EVB_MQTT_Blinker)

## Article

W5500EVB connects to Blinker cloud platform through MQTT protocol
Hardware platform
W5500EVB W5500EVB uses STM32F103RCT6, the mainstream single-chip microcomputer as the MCU, and the Ethernet interface part uses W5500. This chip not only integrates the MAC and PHY of Ethernet, but also implements the network layer and transport layer with hardware logic. W5500 performs data interaction with MCU through standard four-wire high-speed SPI interface. The outstanding hardware TCP/IP protocol stack core of W5500 can not only provide 8 channels of independent communication, but also is high-speed, safe and stable, and is widely used in industrial fields. https://www.w5500.com/index.html

cloud platform
Diandeng Technology https://www.diandeng.tech/home

MQTT protocol
MQTT is a message transmission protocol in the publish/subscribe mode of the client server architecture. Its design philosophy is lightweight, open, simple, standardized, and easy to implement. These characteristics make it a good choice for many scenarios, especially for constrained environments such as machine-to-machine communication (M2M) and Internet of Things (IoT) environments.

The specific specifications of the protocol can be browsed at https://mcxiaoke.gitbooks.io/mqtt-cn/content/.

This routine uses the version library-Eclipse Paho MQTT
https://github.com/eclipse/paho.mqtt.embedded-c

The specific use of the agreement
We only need to transplant the src of the MQTTPacket folder in the library to our own project, and then transplant the transport.c and transport.h in the sample to our own project. Since the paho library has implemented the MQTT function, we only need to modify the functions in transport.c to correspond to the input and output of the device we use. There are also official demos in the sample folder for reference.

Routine operation steps
1. Register the blinker platform, register the device on the mobile app, and get the authkey of the registered device. Such as authkey: ae655874d3f1

2. Send a get request, and the link carries authkey and communication protocol information (can be done at the browser input URL)

https://iot.diandeng.tech/api/v1/user/device/diy/auth?authKey=ae655874d3f1&protocol=mqtt

Add the parameter protocol to specify the connection protocol. Currently supported protocols are: mqtt, mqtts, ws, wss

The server returns information:

{
"detail":
{
"broker": "blinker",
"deviceName": "41A7E676A8DL98SZNS2AP7AB", //clientID
"host": "mqtt://broker.diandeng.tech", //mqtt server address, you can ping to the ip address
"iotId": "7Q5QNKSYBzEoZR3c9j9N9cjxM2", //account
"iotToken": "GQmBgLYpihzZC22DjQbcgMZixrfUFBVE", //password
"port": "1883", //port number
"productKey": "blinker",
"uuid": "2146c54356de11eb81bb5254" //device identity
},
"message": 1000
}
3. Add the obtained information into the code, you can connect to the mqtt server of Dian Deng Technology, and see the online information of the device on the mobile app.

---

Source: https://maker.wiznet.io/ronpang/projects/w5500evb-mqtt-blinker/
