ZHC4931Manual
Public
Chengdu Zongheng Intelligent Control Co., Ltd
33
www.iotrouter.com
3.8.8.
Disconnection and reconnection mechanism
Function description:
When the device is in TCP_Client, this mechanism can be
enabled to protect the traffic. In actual applications, you may encounter frequent remote
server exceptions or business needs that cause frequent connection disconnections. In order to
ensure that it is always online, ZHC4931 will continuously try to establish a connection,
which will cause unnecessary traffic consumption. Disconnect, ZHC4931 will first make a
connection attempt according to the "reconnection times". If the connection cannot be
confirmed successfully, ZHC4931 will enter the sleep state, and the sleep time is the set
"interval between reconnection tasks". After the sleep time is over, the ZHC4931 will try to
establish a connection again.
TCP disconnection reconnection times / interval time holding register address
:
44157~44158
(
0x103C~0x103D
)
Support function codes:
03 (read holding registers), 10 (write multiple holding registers)
Default value
:
0x00 0x05 0x00 0x00
The disconnection reconnection mechanism occupies 2 register addresses, and the
allocation space is as follows:
CHART14
Disconnection Reconnection Mechanism Register
Storage content
Reconnection times
Reconnect task interval
Length
1
1
ZHC4931 disconnection reconnection mechanism parameter introduction,
CHART15 ZHC4931
disconnection reconnection mechanism parameter introduction
ITEMS
Parameter range
Reconnection times
5~65535
Reconnect task interval
0~65535 unit: s