lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Not able to get stable connection from lwip client to Modbu


From: Tritek Main
Subject: [lwip-users] Not able to get stable connection from lwip client to ModbusTCP slave.
Date: Fri, 4 Aug 2023 14:10:45 +0530

Hello,

1. We have implemented a lwip client on a custom made embedded LPC1778 board and have
   implemented the lwip stack that is distributed with NXP LPCOpen package.

2. We are trying to communicate with a device (AC Drive) that has implemented
   ModbusTCP Slave with RAW API.
   
3. We are able to establish the connection and are able to exchange frames as
   per ModbusTCP slave's specs.
   
4. The problem we are facing is to get the stable connection.

5. Enclosed is the wireshark capture of the frames.

   192.168.1.2 - lwip Client
   192.168.1.10 - ModbusTCP Slave

6. It seems that, the stack implemented on the slave side, is expecting an immediate ACK
   on every response frame that slave sends.

7. It can be seen that whenever the lwip side (client) does not send an ACK immediately on receipt of the frame,
   the slave sends a [PSH, ACK] packet.

8. When this goes on for a while, finally I receive a 'close connection' request from the
   slave side.    
 
I have disabled the nagle protocol for this connection in the 'tcp_connected' callback.

What settings I need to do on the lwip side to get around this issue.

Any pointer on this would be much appreciated

Thanks a lot,
- Vijay Vaidya

Attachment: Tes01tModbusTCP_Slave.pcapng
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]