OneNET IoT Platform Platform Introduction Introduction Manual Guidline for Device Development Guideline for Application Development
Other Service Common Question

# Modbus Access Instructions

The test access process includes platform domain and device domain, to help you experience the first access, to gain a general understanding of the platform's functions and access protocols.

Test flow chart is as follows:


Access steps are as follows:

Step1 Create product, and select access protocol First you need to create a product with access protocol is MODBUS on the platform, view Product Create If you don't have an OneNET account, you can proceedUser Registration

Step2 Create device, record device ID and other information Click add device on the page, input device name and authentication information (i.e. device number). For the specific platform resource model, refer to Chapter I Resource Model, and record the device number.

Step3 Create datastream Add sampling datastream, one sampling datastream corresponds to a periodic acquisition command pic

Configure related sampling information, click save pic

Step4 Establish device connection

The product ID, number and password input when create device are used as parameters. Serialize message in the following order and send it to the platform to establish device connection

Field Length/byte Description
type 11 device type, ending with '/0', currently reserved
name 9 device name, ending with '/0', currently reserved
phone 12 DTU phone number, ending with '/0', used for device login authentication
svrpwd 9 DTU password, ending with '/0', used for device login authentication
id 11 Product ID, ending with '/0', product ID assigned by platform when applying for the project

After device connection succeeds, online status will be seen (as shown below), and the platform will issue acquisition command according to stated data period pic

Step6 Keep device online

When device is idle, in order to keep connection with OneNET platform, heartbeat packets (0x0000) need to be sent periodically to make sure TCP connection keeps open. The time interval must be less than 5 minutes**, recommend to be 1 to 3 minutes.

results matching ""

    No results matching ""