MQTT.fx and MQTTX link the ONENET IoT development platform with detailed information to avoid pitfalls.

MQTT.fx and MQTTX are used as debugging methods to connect to ONENET.

MQTT.fx has been charging since 1.7.1, and it is also difficult to find.
Shared links to MQTT.FX, MQTTX and ONENET token tools, which you can pick up yourself.
Link: https://pan.baidu.com/s/1hHJDCkJQ-xGqyW5pE1FA0w
Extraction code: af25

You can also download the latest version from the onenet official website and EMQ official website.
MQTTX: https://mqttx.app/zh/downloads
ONENET: https://open.iot.10086.cn/

OneNET 2023-4-24 After integrating and upgrading the NB-IoT suite, MQTT suite, and IoT Life Platform, the IoT development platform can create MQTT products, replacing the previous MQTT suite.

Create a product:

First click on Developer Center. (I won’t explain how to create an account, etc.)
Insert image description here

The second step is product development.
Insert image description here
The third step is to create the product:
Insert image description here

Step 4: Set parameters according to your needs.
Insert image description here
The selection of the following networking methods does not affect the use of mqtt.fx and mqttx connections:
Insert image description here

Step 5: The important parameters marked in red boxes are then entered into product development.
Insert image description here

Step 6: These three parameters are the device name device id acess_key that need to be filled in. These are the three major authentications of ONENET. This is the so-called necessary parameter required for login. Access_key is required and requires verification of the mobile phone. (Pay attention to this mqtt_device here. If your device name is consistent with the product ID, the client ID is the product ID of this sign. If the device ID is inconsistent, it is not the client ID marked in this picture) onenet document reference: https
Insert image description here
: //open.iot .10086.cn/doc/v5/fuse/detail/Iot_platform

This domain name and port number also need to be filled in:
Insert image description here
Note: Be sure to pull down, otherwise only part of the access_key will be copied.
Insert image description here
This mqtt_device is only the mqtt_device when the created device name/ID is consistent with the product ID.
Insert image description here
Device management creates devices:
Insert image description here
Two devices are created here. It must be noted that it is
best to add the name ID of your device to be consistent with your product ID. This way there won't be too many misunderstandings. More convenient.
If the device name you create must be inconsistent with the product name. After that, you must pay attention to the client id and the device name in res in the token to fill in the device name/ID. Otherwise, a Bad user name or password error will occur.

Insert image description here

It is best to match the name of the product to avoid some errors:
Insert image description here

MQTT.FX connection

First, you need a token calculation tool to calculate the TOKEN, which is
Insert image description here
the description of the password Password onenet. To explain to et, we need to fill in the time after your current time, which is the future time. If the time you fill in is relative to the current past time. The authentication token parameter will become invalid.
Timestamp conversion tool: https://tool.lu/timestamp/

MQTT setting button: Insert image description here
Add parameters after entering: (Note that when copying some names, such as product names, the copy will include more spaces, and the final generated token will be different. This requires great attention. It is best to type some names by hand. )
Insert image description here

Device name location: (I am using aDF as an example to connect here)
Insert image description here
Version: You must uncheck Use Default here, and then select V3.1.1 otherwise an error will be reported

Insert image description here
Note, which can also be ignored:
This guy chose SSL/TLS encryption, which requires a certificate, domain name, port number, etc. All need to be modified. The default is unchecked. Not used here. Interested readers can take a look at the introduction of onenet documentation.
Insert image description here

MQTTX connects ONENET

The following takes the device name mqtt_device as an example:
Insert image description here
Insert image description here
final connection effect: two connections are connected. (Inactive status has no effect, it just means that you have never connected)
Insert image description here

By the way, this is a test of ONENET’s multi-protocol access MQTT:
Insert image description here

Mentioned: Connecting to Alibaba Cloud

You can also use Alibaba Cloud's IoT platform, which is also free. You can directly query the parameters and fill them all in. There is no need to go through the trouble of generating tokens and other parameters like onenet. There are no pictures attached, you can try it yourself.

Summary: In short, onenet is still more troublesome to fill in relative parameters, compared to Alibaba Cloud. Finally, I would like to thank the lady from onenet’s technical customer service for helping to solve the problem. As for which one to use, it’s up to the wise and the benevolent to decide. If anything is incorrect, please leave your comments in the comment area.

Guess you like

Origin blog.csdn.net/qq_53502688/article/details/131484184