October 22, 2021 at 8:10 am #9580
I am trying to communicate with device by 4G DTU. And the portocol is modbus.
I have two DTU. The IP address of DTU will change after restart.
I configured the line mode tcp server. I tried all device selection. It works not right.
I saw the source code. And I don’t know how to deal with it.
Could you give me some advice.
October 22, 2021 at 10:14 am #9581
- This topic was modified 8 months, 1 week ago by Mikhail.
4G DTU and if the device is used as a client, and the communication line is configured as a Server?October 22, 2021 at 1:49 pm #9583
Does the DTU support TCP client mode? I mean, can it connect to the server by IP?October 26, 2021 at 1:21 am #9589
The DTU has a random IP address. So we could not connect it by IP.
There is a way to handle it but it’s stupid. Config each line a TCP port.October 26, 2021 at 8:48 am #9590
So there is no need to specify the IP of the device, choose a different mode. The connection is Shared and specify only the port on the TCP server through which the 4G modem will be connected as a client.October 26, 2021 at 9:28 am #9593
It won’t work. I saw the source code.
Both of the modes below could not deal with that.
protected bool BindConnByFirstPackage(TcpConnection tcpConn, string firstPackage)
protected void BindConnByDeviceLibrary(TcpConnection tcpConn, KPLogic kpLogic)October 26, 2021 at 12:20 pm #9595
Can the DTU initiate connection to the server by the server IP?October 27, 2021 at 1:19 am #9597
Yes. There is a config in the DTU module. TCP Server IP address and port.October 27, 2021 at 1:20 am #9598
Random IP address is disgusting.October 27, 2021 at 6:36 am #9599
I mean, can the DTU be a TCP client and not a server, and being a client connect to a Scada server, in which, in turn, the communication line is configured as a TCP serverOctober 27, 2021 at 6:40 am #9600
Yes, The DTU module is a TCP client and the line is a TCP server. you can see it in my question.
October 27, 2021 at 8:37 am #9602
- This reply was modified 8 months, 1 week ago by Zeus.
Then why do you set the packet definition by IP in the line settings if you can just specify the General?
And then it won’t matter that the DTU’s IP address is changing.October 27, 2021 at 9:35 am #9603
You did not get my point. I tried all modes. they are all not working correctly. By IP is not the solution and the other two modes are also not the solutionOctober 27, 2021 at 10:29 am #9605
Take screenshots of the DTU settings preferably in English 🙂 and then it’s not clear what you want and what does the changing IP have to do with it when restarting the DTU, if it’s not important at all when using a TCP client on the DTU. Is only the IP address from the server side important, or do you have a Scada system located behind one of the DTUS?October 27, 2021 at 1:17 pm #9608
Not related to the particular SCADA software, when DTU is connected to the main server, what method would you like to use by the server to recognize the remote site?
In such situation, a remove device usually sends “hello” packet that contains the device name. This feature is supported by some 3G routers.
- You must be logged in to reply to this topic.