Development Guide

Service Address

MQTTS Access Suite supports Standard MQTT V3.1.1 and TLS encryption. The access service address is as follows:

Connection Protocol Certificate Address Port Description
MQTT Certificate Download 47.244.72.233 8883 Cryptographic interface
MQTT - 47.244.72.233 1883 Non-cryptographic interface

Create Products and Devices

According to the information about Create Product and Create Device in Quick Start, create MQTTS products and devices,

in which:
device name is unique within a product, so it is recommended to name devices using information such as device sn, mac address and IMEI.

Device Security Authentication

When devices are created, the platform assigns a unique key to each device. When a device logs on, it has to use the access token calculated by the key for access security authentication. See the Token Algorithm.

The device can log in using MQTT Connect messages that consist of three elements, as shown below:

Parameter Required? Description
clientId Yes Device name
username Yes Product ID assigned by platform
password Yes Token calculated by key

Common Security Solutions

Solution 1

During assembly line flash programming, write Device Name, Product ID and Device Key corresponding to each device. At startup, calculate a token using the key and implement device login.

Solution 2

At first startup, device key is obtained from the Access Administrator and stored locally. Then user can access the device using a token generated by the key.

Solution 3

Device key is managed by the Access Administrator. When access is required, the device should get a temporary access token from the Access Administrator which can customize the validity period (i.e. expiration time) of the token as needed, before accessing the OneNET platform.

Device Keepalive

Set a keepalive time in a MQTT Connect message, in the range: 10-1,800 seconds.

If a device needs persistent connection, it must have uplink data messages (including publish, ping, subscribe, etc.) within the set consecutive keepalive time.

If the platform does not receive the uplink data from the device within 1.5 times the set consecutive keepalive time, the device will be disconnected.

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “