Create Alibaba Cloud IoT Platform

Create Alibaba Cloud IoT Platform

Make a record of the cloud platform device creation process, too lazy to watch the video

Article reference video: https://www.bilibili.com/video/BV1jP4y1E7TJ?p=26&vd_source=50694678ae937a743c59db6b5ff46c31

Aliyun: https://www.aliyun.com

1. Introduction to IoT Platform

LAN communication

insert image description here

Because mobile phones and computers are connected to the Internet through the operator, the operator assigns dynamic IP addresses, and the connection cannot be established stably for a long time, so it is necessary to use a cloud server to obtain a stable connection

insert image description here

How to get a cloud server

insert image description here

At present, many manufacturers on the market have their own IoT platforms, which can be provided to individuals for simple development. This experiment uses the Alibaba Cloud platform

insert image description here

The network communication protocol required to connect to the cloud platform

insert image description here

Most of the communication protocols between embedded devices and Alibaba Cloud are MQTT protocols

insert image description here

communication signal

insert image description here

2. Create products and devices on Alibaba Cloud

insert image description here

Register an account

insert image description here

Click the interface after the console, and then follow the steps below to click

insert image description here

Click IoT Platform in all open projects

insert image description here

Enter the homepage of the Internet of Things platform

insert image description here

A free public instance is used here, which is enough for personal learning

insert image description here

Click on the number of devices according to the steps on the home page of the Internet of Things platform, and jump to the following page to create a product

insert image description here

Set product parameters, product name customization

insert image description here

After creating the product, add a device

insert image description here

insert image description here

insert image description here

Finished creating the device, showing not activated

insert image description here

3. Install the MQTT.fx software

After the cloud platform device is created, it is necessary to verify whether the cloud platform can communicate normally. You can use the software to perform the communication test of the MQTT protocol with the cloud platform.

The tutorial gives the use of MQTT.fx software, but I need a license when I use this software. If there is no license, I can’t use it. If there is, you can follow the steps below

Alibaba Cloud MQTT.fx documentation: https://help.aliyun.com/document_detail/140507.html

MQTTX software can be used without a license. The configuration steps and communication methods are similar to those of MQTT.fx. You can refer to: https://blog.csdn.net/weixin_46251230/article/details/128994554

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

insert image description here

After installing the MQTT.fx software, open the software, then set the software parameters, and establish a connection with the cloud platform

insert image description here

insert image description here

insert image description here

Go back to the Alibaba Cloud platform and find the MQTT connection parameters

insert image description here

insert image description here

insert image description here

insert image description here

click to connect

insert image description here

After clicking Connect in the previous step, refresh the Alibaba Cloud platform to check whether the device is online

insert image description here

4. Test data sending and receiving

Data downlink test

Firstly, the data downlink test is performed. The downlink means that the cloud server sends data, and the MQTT.fx software receives the data.

Before data communication, you need to understand the type of Topic:

Uploading the data collected by the hardware to the cloud is called publishing; sending the data from the cloud to the development board is called subscription.

insert image description here

insert image description here

insert image description here

The MQTT.fx software subscribes to this Topic class, and the subsequent cloud platform sends information through this Topic class, and the MQTT.fx software can receive it. If there is no subscription, it cannot receive

Replace ${deviceName} with your own device name. This is very important. If you use a topic with other permissions, you must also change the device number.

If multiple devices are created, which device you want to communicate with, replace it with the corresponding device name

insert image description here

insert image description here

insert image description here

insert image description here

The MQTT.fx software receives the test data, indicating that the data downlink test is successful

insert image description here

Aliyun platform can view all data sent

insert image description here

insert image description here

Data uplink test

MQTT.fx software sends data, cloud server receives

insert image description here
insert image description here

insert image description here

If the received data is correct, it means that the data uplink test is successful

insert image description here

5. In-depth self-study materials

insert image description here

insert image description here
Then there will be Aliyun platform learning materials

Guess you like

Origin blog.csdn.net/weixin_46251230/article/details/128993864