TCP mode Dual Center data transfer
Example description
This instance uses TCP mode to forward the data received by the serial port to the server and forwards the data sent by the server to the string. Data is not encrypted during transmission.
Configuring the server network
1. Confirm the external IP address or domain name of the native server
A, the IP address for the fixed IP leased line outside this instance is 220.160.156.233.
B, if the external network is a dial-up method, you need to use the domain name.
Condition One:
Through the peanut shell or other domain name resolution terminal bound external network IP
Condition Two:
If it is only a short time test communication, you can use the current extranet IP directly
Query the current extranet IP method: Search "IP" with Baidu
If there is a network through the router server can also be logged on the router, query the running state of the WAN Port current external IP
The IP addresses that are obtained are consistent if the inconsistency may have been translated by the carrier's internal network NAT and cannot be used as a server network.
2. Confirm the network structure of the server intranet, if the server is through the router Sisu network, please do port mapping or DMA on the router.
The port mappings made by this instance are as follows:
Example one:
Query the native server intranet IP as follows:
Windows7 system, Start > Control Panel > Network and Sharing Center > change adapter settings
Right-click Local Area Connection > Status > Details
3, if there is a router Sisu network, please confirm whether the firewall above the router open this port.
4, if a firewall is installed on the server PC, make sure the firewall is open for this port.
Device parameter Configuration
Open the Configuration tool: Open and debug serial port connected to the string number, baud rate, data bits, stop bit, flow control is the default value, the right prompt to open the serial port successfully power on the device, if the device has been powered, please re-power the device.
Successfully entered the configuration state after power-on is re-
Configure the Hub server
Number of hub servers: 2
Center 1IP Address: The server's extranet address or domain name (220.160.156.233)
Center 2IP Address: The server's extranet address or domain name (weidejiaweige.vicp.cc)
Hub 1 Port: Server external network open port (30039)
Backup Hub port is: Server extranet open port (30040)
Communication serial parameters
Baud rate set to: 115200
Check bit set to: None
Data bit set to: 8
Stop bit set to 1
Protocol parameters
The communication protocol is set to: for that
Device ID is set to: FFFFFFFF
User ID is set to: 0000001
The packet response is set to: Enabled
The packet re-send interval is set to: 15
Packet re-send number set to: 3
The control pack response is set to: Enabled
The control pack restart interval is set to: 15
The number of times the control pack has been re-sent is: 3
The escalation protocol parameter is set to Enabled
Working parameters
The communication mode is set to: TCP
The network idle interval is set to: 60
Heartbeat packet interval is set to: 60
Other
Other parameters are set to factory settings.
Server Center Configuration
Registering Device information
Click the "Add Device Info" button. As shown in the following:
The registration management interface appears.
Click on the "Add Device" button and the "Add Device" screen appears. As shown in the following:
Set the user ID and device ID that were consistent with the previous device. The user ID is set to 00000000, and the device ID is set to FFFFFFFF. As shown in the following:
Click Confirm to complete the setup and close the registration management interface.
Server parameter settings
Create a new two TCP server receive center
The server type is set to: TCP
Local ports are set to: 30039, 30040, respectively
The log path is set to: You can set the available paths arbitrarily
Other parameters Default
Click the "Confirm" button to start the service.
Communication test
Device connection
Restart the device and let the device connect to the server. When the device status light is blue and the device information is displayed on the server, the device is connected to the server. As shown in the following:
Dtu/rtu Connection Dual Center configuration instructions