_ Receive the data access protocol ESP8266_24MQTT Ali cloud platform

       Prior written agreement ONENET MQTT platform access instructions, but before long, given the information they display may be charged. The access for everyone to update a routine Ali cloud platform, after all, the atmosphere is quite Ma Dad, I believe will not be so stingy.

       Methods, procedures, code is substantially similar, only you need to change the position of the details.

Nonsense a bit much, do not say, let's go!

1, platform account registration

Platform URL: https: //account.aliyun.com

Taobao or Alipay account can log in directly.

  1. Creating Products

And ONENET Similarly, add your product to be controlled.

       I have here has been created, 0926LED01 from my name, which means the product September 26 created. When you create needs to fill some of the parameters and modalities, he experienced himself watching write, did not refer to my experience:

       Then add a device:

       I'm here devicename and product names written in the same, easy to remember. After click OK, a dialog box will pop up, telling you information about the current device:

       This suggest that you copy down the information, saved to a txt document, use the back at any time. devicename become 0926LED02, because I created a device.

       Contrast ONEONET of products, equipment information, you will find that the basic steps are the same. Do not be too optimistic, however, is not the same here. Introduction ONENET, I have mentioned a piece of software to assist tests MQTT functions, Ali used the same cloud here. I put the link here:

https://help.aliyun.com/document_detail/86706.html?spm=a2c4g.11186623.6.831.72175800oCSt6t

       There are three different places: Broker Address, Client ID, Password. Not described in detail here, interested, see for yourself the link.

       先吐槽一下,链接里虽然说了如何生成这三个信息,但我操作了一上午,没有成功过一次。本人自认为动手能力还算可以,没想到在这里栽了跟头。后面还是找到了一个自动生成的工具,才算是解决了问题(不是官网推荐的那个)。

       后面又找了找,发现了一个不错的代码,可以自动生成这三个关键信息,总算是把问题解决了。上电测试:

       功能正常,打完收工!

       对了,说一句,相关的配置信息在aliyun_mqtt.h这个文件里改。

       完整工程源码,扫描下方二维码即可!

单片机爱好者

发布了27 篇原创文章 · 获赞 7 · 访问量 5158

Guess you like

Origin blog.csdn.net/lazyduck/article/details/103957201
Recommended