communicate device by 4G DTU

Forum Home Forums Understanding the Software communicate device by 4G DTU

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #9580
    Zeus
    Participant

    Hi,
    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 2 years, 6 months ago by Mikhail.
    #9581
    manjey73
    Participant

    4G DTU and if the device is used as a client, and the communication line is configured as a Server?

    #9583
    Mikhail
    Moderator

    Hi,

    Does the DTU support TCP client mode? I mean, can it connect to the server by IP?

    #9589
    Zeus
    Participant

    Hi 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.

    #9590
    manjey73
    Participant

    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.

    #9593
    Zeus
    Participant

    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)

    #9595
    Mikhail
    Moderator

    Hi,
    Can the DTU initiate connection to the server by the server IP?

    #9597
    Zeus
    Participant

    Hi,
    Yes. There is a config in the DTU module. TCP Server IP address and port.

    #9598
    Zeus
    Participant

    Hi,
    Random IP address is disgusting.

    #9599
    manjey73
    Participant

    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 server

    #9600
    Zeus
    Participant

    Yes, 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 2 years, 6 months ago by Zeus.
    #9602
    manjey73
    Participant

    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.

    #9603
    Zeus
    Participant

    Hi,
    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 solution

    #9605
    manjey73
    Participant

    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?

    #9608
    Mikhail
    Moderator

    Hi,

    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.

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.