boschow Posted March 27, 2008 Posted March 27, 2008 Hello,i have implemented TCP IP Modbus communication protocol on Freescale ColdFire micro controller. The TCP IP stack is similar to windows TCP IP stack. For the moment it has just the server part of the protocol this means that other devices can connect to it. My problem is that i don't know how to maintain the connection, because it drops after a while. I had in mind, to use interrupts, but i don't know if this is the right solution. My database has around 2000 modbus signals ... Do you guys have any solution to this problem ?thanks andbest regards.BoSCHoW.
boschow Posted March 29, 2008 Author Posted March 29, 2008 (edited) Also when I was observing the communication with ethreal I found out this:- the client send a TCP IP packet SYN- then the servers responds with SYN ACK- and then the client sends ACK- and the client immediately sends a Modbus Query- the server sends Modbus respond- and then immediatly another package that is labeled TCP DUP ACK "11#1"- and then the sequence is repeatedP.S. Sometimes the server also sends TCP Window size changed ...I think the problem is on the server side. I don't use any functions to close the connection. I just use SocketListen, SocketRecieve and SocketSend. I also should check if the server changed the port to keep the connection active ??Best Regards,BoSCHoW. Edited March 29, 2008 by boschow
cluberti Posted March 30, 2008 Posted March 30, 2008 I would check to see if you've implemented any keep-alives, otherwise the socket is going to close without continued usage.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now