Windows uses MQTTX equipped with EMQ to build an MQTT server

1. Download

Official website download: free download and try EMQ products (emqx.com)

Select Windows as the system, and choose the latest version for the version

 2. Create and subscribe to the server

Run MQTTX to create a server

Click the + button marked below to create a routine. In the new workspace, set the name of the MQTT subscriber and it will be ok. Everything else will be defaulted. 

3. Complete server port subscription and information sending and receiving

Create two server routines as above (the names I created are esp8266 and esp32, which are called No. 1 and No. 2 below)

 port subscription

Add the subscription port to the subscriber terminal 1 (I added a port named esp8266/message here, referred to as port 1 below)

 

 send information

Specify port 1 in the subscriber terminal 2 to send the corresponding command (here I send JSON data of lon to port 1)

 4. Inspection

sender:

Receiving end:

 

    This article was written independently by the author

 All original articles on this blog may not be used for commercial purposes and traditional media without my permission. Please indicate the source for reprinting by online media, otherwise it is an infringement.

Guess you like

Origin blog.csdn.net/weixin_61908666/article/details/128537630