
485 TO ETH (B) User Manual
11
/
36
The test result shows that the meter simulated by the Modbus slave tool can be
collected by the gateway. at the same time,it can be sent to the server software simulated
by SocketDlgTest according to the json format regularly.
3. JSON complex example
3.1. ENABLE NTP
In order to be able to use JSON with time, you must first enable the NTP function of the
device. The NTP function can get the current time through the network.
In the web download directory, which is the directory where httpd.txt is located, create
an empty txt file with the content as down:
[NTP]
NTP_SERVER1=a1.a2.a3.a4
NTP_SERVER2=b1.b2.b3.b4
NTP_SERVER3=c1.c2.c3.c4
RE_ARUIRE_TIME=0
NTP_SERVER1, NTP_SERVER2, NTP_SERVER3 are the IP of the NTP time server
Address, fill in according to the actual situation. Up to 3 servers can be set up, but you must
NTP_SERVER1 starts to write, if there is only one, write NTP_SERVER1, if there are only two,
write
NTP_SERVER1 and NTP_SERVER2.
After saving, ntp.txt and other files are downloaded to the inside of the device.
3.2. NESTED JSON DESIGN
Suppose we need to design the following JSON:
{"header":{"DEVID":"285301020304",
"time":" 2019-05-13 22:23:31"},
"data": {"id":"MyData123456",
"alarm":{"alarm1":123.4C
"alarm2":567.8C
}
},