Forum Home › Forums › Understanding the Software › communicate device by 4G DTU
- This topic has 18 replies, 3 voices, and was last updated 4 years, 1 month ago by
Mikhail.
-
AuthorPosts
-
October 22, 2021 at 8:10 am #9580
ZeusParticipantHi,
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.-
This topic was modified 4 years, 1 month ago by
Mikhail.
October 22, 2021 at 10:14 am #9581
manjey73Participant4G 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
MikhailModeratorHi,
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
ZeusParticipantHi both,
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
manjey73ParticipantSo 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
ZeusParticipantIt 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
MikhailModeratorHi,
Can the DTU initiate connection to the server by the server IP?October 27, 2021 at 1:19 am #9597
ZeusParticipantHi,
Yes. There is a config in the DTU module. TCP Server IP address and port.October 27, 2021 at 1:20 am #9598
ZeusParticipantHi,
Random IP address is disgusting.October 27, 2021 at 6:36 am #9599
manjey73ParticipantI 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 server
October 27, 2021 at 6:40 am #9600
ZeusParticipantYes, The DTU module is a TCP client and the line is a TCP server. you can see it in my question.
-
This reply was modified 4 years, 1 month ago by
Zeus.
October 27, 2021 at 8:37 am #9602
manjey73ParticipantThen 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
ZeusParticipantHi,
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
manjey73ParticipantTake 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
MikhailModeratorHi,
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.
-
This topic was modified 4 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.