WRT55AGv2 dropping idle TCP connections

I have a WRT55AGv2 and it constantly is just dropping idle TCP connections. This has made it totally useless for me until I can find some fix for this. I usually have multiple SSH and FTP sessions that I just leave open all day.
This happens on both the wired and wireless interfaces.
Can anyone suggest something that could fix this?

I don't use any P2P applications and I do not use anything that generates a huge number of connections in short periods.
I've already changed the MTU setting to 1300.
I've tried disabling the wireless interfaces and just use a wired connection and it still happens. Idle TCP connections just get dropped.
What else could I try?

Similar Messages

  • SRP541W drops idle connections fast

    I have installed SRP541W and found a big anoying issue with this router - it drops idle TCP connections after a couple of minutes (more than 5 but less than 20) of inactivity. Namely, this "feature" becomes apparent when using ssh connections - if nothing happens in an ssh terminal for a given time, the connection is lost and the ssh client must be reconnected. As having a lot of ssh terminals open simultaneously (and, of course, leaving some them idle for a while) is a core of my work, this behavior annoys me a lot. Does anyone know how to solve this problem?
    I understand that dropping idle connection is needed to keep the NAT tables reasonably small, but dropping connections after less than 20 minutes of inactivity is just way too fast and useless. Even cheap home routers usually do not drop idle connections after many hours or days of inactivity.

    Also, if I switch the Airport Express to connect to the 2.4GHz network instead, the same thing happens on that network. After a few hours, the base station stops authenticating clients on the 2.4GHz network, and only the 5GHz network works.

  • Outgoing TCP connections from VM have very low firewall state idle timeout -- how do you adjust?

    When I create a TCP connection from a VM to the internet, if I'm idle for more than a few minutes (say a SSH session), the TCP flow is torn down by some AZURE networking element in between.
    Incoming connections from the internet in don't seem to be affected.
    I assume this is an Azure firewall timeout somewhere.
    Is there any way to raise this?

    Hi,
    Thanks for posting here.
    Here are some suggestions:
    [1] - You can make sure the TCP connection is not idle. To keep your TCP connection active you can keeping sending some data before 60 seconds passes. This could be done via chunked transfer encoding; send something or you can just send blank lines to keep
    the connection active.
    [2] - If you are using WCF based application please have a look at below link:
    Reference:
    http://code.msdn.microsoft.com/WCF-Azure-NetTCP-Keep-Alive-09f50fd9
    [3] - If you are using TCP Sockets then you can also try ServicePointManager.SetTcpKeepAlive(true, 30000, 30000) might be used to do this. TCP Keep-Alive packets will keep the connection from your client to the load balancer open during a long-running HTTP
    request. For example if you’re using .NET WebRequest objects in your client you would set ServicePointManager.SetTcpKeepAlive(…) appropriately.
    Reference -
    http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.settcpkeepalive.aspx
    Hope this helps you.
    Girish Prajwal

  • TCP CONNECTIONS DROPPED

    Hi All,
    I have a cisco 3745 router on a network I manage. of late I have had with one of the links I manage. the issue is that when a tcp connection is being established from an external network to my internal network, the traffic does not go past the router. on closer inspection of the traffic, I notice that I am getting SYN packets from the host in the external network but it seems like they all get dropped by the router because there is no trace of the same packets beyond the router to my internal network. I have searched for what the reason for this kind of behavior could be but I have not found anything. Has anyone experienced this before and how do I remedy this?
    Thanks in advance.

    When a router does not know the destination network it drops the packet.
    Do a sh route for the "external network" on the router.
    Cheers,
    Michel

  • MacBook Pro drops Wi-Fi connection after upgrading to 10.6.5. Fixed!

    MacBook Pro drops Wi-Fi connection after upgrading to 10.6.5. Airport says no IP is detected then suddenly reconnects?
    This has been a problem I’ve been troubleshooting for the last month. I’m new to the Mac family and have loved my experience up until this point. I was under the impression that mac’s are supposed to be so user friendly that even your grandmother could use one with out having any technical knowledge. I mean I shouldn’t have to be deleting drivers or reformat my mac because of an OS update glitch? (That’s what the guy at the Genius Bar told me to do.) What I refused to succumb to was that I’m really good with computers. I get at least a phone call every other week from someone asking me for tech support. So I’d like to think that nothing I’ve done to the system would have caused this anomaly.
    After numerous attempts of troubleshooting and researching forms I believe I’ve discovered a solutions that seems to be working for me.
    Here are the steps I took to create a consistent connection to my Wi-Fi. I believe it was a combination of all these steps to create success.
    1.) Changed my router to use G Wireless Only. (I’m assuming this removed any unnecessary frequencies to allow G to broadcast stronger?)
    2.) Did a scan on the other networks in my area to find out what channel everyone else was broadcasting on. Copy and past the text below into a terminal window.
    sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resourc es/airport /usr/sbin/airport
    This will allow you to simply type “airport” in the terminal window to execute the command.
    Type airport –s
    This will display all the networks in your area and what channel they are broadcasting on.
    3.) Changed my router to use a channel that no one in my area was using. (This helped to make my network stronger and free of interference.)
    The last steps will help your home network improve but these next steps I believe helped fix any install errors caused maybe by the 10.6.5 update on my mac.
    4.) Boot your Mac into safe mode by holding down the shift key while booting.
    5.) Open System Preferences and Click on Network.
    6.) Click the drop down menu from Locations at the top of the screen. Click edit locations..
    7.) Create a new location by clicking the + and give it a new name.
    8.) Delete the old location by clicking on the old locations name and click the – to remove.
    9.) Reboot
    10.) Open System Preference and click on Network.
    11.) Click on the settings sprocket next to the + and – and click on Set Service Order…
    12.) Drag Airport to the top of the list of devices then click Ok.
    Now this last step is what seemed to eliminate the issue. I hardcoded my IP address to my network. This way my computer will always use the same IP and not have to search.
    13.) Click on Advanced under Network.
    14.) Click on TCP/IP. Click on the drop down for Configure IPv4 and change it to Manually.
    15.) Fill out the fields with your IPv4 Address: 192.168.1.1xx (x=whatever number) Subnet Mask: 255.255.255.0 Router: 192.168.1.1 (All of these settings are pretty standard for most home networks.)
    16.) Click on the drop down for Configure IPv6 and change it to Off.
    17.) Next click on the DNS tab at the top.
    18.) Click the + to add a DNS Record.
    To find your DNS Server open a Terminal window by launching Applications --> Utilities --> Terminal
    Then Type cat /etc/resolv.conf
    (There is a space between cat and /. Without it you’ll get no such file or directory.)
    This should return two addresses. Your ISP’s DNS Servers.
    19.) Add both records to the DNS and click Ok.
    20.) Click Ok then under Network Click Ok.
    21.) Reboot router then Mac
    22.) Fixed my connection issue
    The symptoms I experienced eluded me to believe that something with the DHCP is going into an idle then disconnecting. Before when DHCP was set to automatically assign the network signal would time out then searchers for a new IP resulting in Airport displaying No IP is detected. By setting my IP to a fixed address I still notice a slight drop in bandwidth at moments but because of the assigned IP I never loose connection. I can now stream video, play games, chat all without getting disconnected.
    I believe this fix will work for my home network but I also noticed this issue at work so for each location that I connect for the time being I’ll create each there own location and hardcode the IP address to that network. I’ve been reading that 10.6.6 is coming soon so maybe this will be resolved for good in the next update.
    Let me know if this helps or if you have any questions.
    Best of luck.
    Message was edited by: erockdabass
    Message was edited by: erockdabass

    I have been having the same issue for the last two weeks. No real indication as to why it ever began other than I had turned off my router and Airport Extreme Base Station off for a weekend while I was away from my place.
    iPad, iPhone, iPod Touch, all have no issues at all with my Airport Extreme Base Station. Can stay connected throughout my living room, bathroom, bedroom, no issues whatsoever.
    My 5 month old MacBook Pro 2.66 GHz Core i7 Airport is sometimes perfect, able to connect, DHCP, and browse without issue. Then, for no reason, I won't be able to join my wireless network, or when I can join, I can't pick up an IP address. And then it will connect, pick up and IP, and then it won't browse. No real rhyme or reason to when this will happen, or when it works.
    I thought that it was an issue with my MacBook Pro, but then my sister visited with her brand new MacBook Pro 2.26 Intel Core 2 Duo, and while a month ago she was able to connect, DHCP, and browse without issue, this weekend she had all of the same issues I was having.
    My XBOX 360 and MacBook Pro have absolutely no issues with the wired connection. Only my WAN seems to have this issue.
    Did you ever find anything more to this?

  • ASA 5505:Static Routing and Deny TCP connection because of bad flag

    Hi Everybody,
    I have a problem. I made a VPN site-2-site with 2 ASA 5505. The VPN works great. And I create a redondant link if the VPN failed.
    In fact, I use Dual ISP with route tracking. If the VPN fails, the default route change to an ISDN router, situated on the inside interface.
    When I simulated a VPN fail, the ASAs routes switch automatically on backup ISDN routers. If I ping elements, it works great. But when i try TCP connection like telnet, the ASAs deny connections:
    %PIX|ASA-6-106015: Deny TCP (no connection) from 172.16.10.57/35066 to 172.16.18.1/23 flags tcp_flags on interface interface_name.
    the security appliance discarded a TCP packet that has no associated connection in the security appliance connection table. The security appliance looks for a SYN flag in the packet, which indicates a request to establish a new connection. If the SYN flag is not set, and there is not an existing connection, the security appliance discards the packet.
    thanks!
    EDIT: On the schema, The interface of the main asa is 172.16.18.148...

    Check if the xlate timer is set greater than or equal to what the conn timer, so as not to have connections waiting on xlates that no longer exist. To minimize the number of attempts, enable "service resetinbound" . The PIX will reset the connection and make it go away. Without service resetinbound, the PIX Firewall drops packets that are denied and generates a syslog message stating that the SYN was a denied connection.

  • TCP connections on Cisco ASA disconnects the database session every 30 Minutes

    Right after a firmware upgrade form 8.4.2 to 8.4.7   on our ASA 5540:
    the database app that makes a tcp connection with the database  loses connection to the database servers on the inside of the firewall
    -Nothing changed on the process servers.
    -Nothing but firmware version changed on the firewalls.
    -Rebooting did not help.
    -Connections don't always drop every 30 minutes, but it's still almost exactly at that time, with a 90% chance of it happening. And it reestablishes in about 52 second
    -The client is not willingly terminating the connections to the database servers on the inside. The connection is just going away.

    I am not seeing any error in the logs in ASA but in our client we see:
    Latest from PROD (times are in UTC):
    Sun Apr 13 10:22:10 2014 - ERR: Read from the server failed (err[36],sev[78],state[0],line[0],server[],proc[],sql[exec sp_events_insupd :p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12,:p13,:p14,:p15,:p16,:p17],err_type[client])
    Sun Apr 13 11:47:09 2014 - ERR: Read from the server failed (err[36],sev[78],state[0],line[0],server[],proc[],sql[exec sp_events_insupd :p1,:p2,:p3,:p4,:p5,:p6,:p7,:p8,:p9,:p10,:p11,:p12,:p13,:p14,:p15,:p16,:p17],err_type[client])

  • Unable to establish TCP connection when enabling internet sharing (Phone acting as hotspot)

    I have developed a small .NET Desktop application which hosts a TCP service. In addition, it sends UDP Multicasts to anounce that service.
    Service consumer is a Phone 8.1 app, which listens for these UDP multicasts and when it receives such a multicast, it creates a TCP connection to the service.
    The following snippet shows how the Phone 8.1 app listens for UDP packets and then connects via TCP
    const string UdpPort = "42";
    const string TcpPort = "43";
    const string MultiCastIp = "224.5.6.7";
    const int TimeoutForServerLookup = 10000;
    //-- listen for UDP multicasts
    HostName hostNameOfServer = null;
    var udp = new DatagramSocket();
    var clientFound = false;
    udp.MessageReceived += delegate(DatagramSocket sender, DatagramSocketMessageReceivedEventArgs args)
    try
    hostNameOfServer = args.RemoteAddress;
    catch (Exception ex)
    s_Log.Error("Error in handling UDP packet", ex);
    await udp.BindServiceNameAsync(UdpPort);
    udp.JoinMulticastGroup(new HostName(MultiCastIp));
    var waitedTimeInMs = 0;
    const int delayInMs = 250;
    while (waitedTimeInMs < TimeoutForServerLookup && hostNameOfServer == null)
    waitedTimeInMs += delayInMs;
    await Task.Delay(TimeSpan.FromMilliseconds(delayInMs));
    udp.Dispose();
    //-- we now have the adress of the TCP server (hostNameOfServer)
    //-- connect now to the server. this works when being in a "normal" WLAN, does not work when the phone is the hotspot
    var socket = new StreamSocket();
    await socket.ConnectAsync(hostNameOfServer, TcpPort);
    This works well when the Desktop computer and the Windows Phone 8.1 are within the same WLAN. For some customers it is important that this also works when the Windows Phone 8.1 acts as hotspot (by enabling internet sharing on the phone) and the desktop computer
    (or Laptop) connects itself to this WLAN. In this scenario the Phone 8.1 still receives the UDP packets, but when trying to connect via TCP, the connection attempt fails.
    Any ideas how to get rid of this problem?

    Have you tracked down if the phone actually sends the TCP connection to the desktop? I'm feeling that this is a firewall issue that shows itself when the firewall zone changes (public/private/domain).
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • Airport keeps dropping the wireless connection to my network 2 or 3 times a day.

    Hi,
    Since apple's recent firmware update for my macbook pro, airport keeps dropping the wireless connection to my network 2 or 3 times a day. It then searches for a network but can't find it, but if I select my network manually it connects immediately ???
    Any fixes for this ..... in layman's language please!
    Thanks,
    Steve

    It is not the router. There are a number of factors that are involved. If the router is a G/N router you may have to switch to G-Only (or disable N). You may also have a 5 GHz wireless phone or other routers in the neighborhood interfereing with the signal.
    Try this:
    1. Open network preferences. Take note of what IP address is assigned. Then, click Advanced.
    2. Click on TCP/IP and select Using DHCP with manual address and type the IP address below that.
    3. Click OK.
    4. Set your Router to Wireless-G only (or disable N) and change the channel to 11 or some higher number.
    This should keep it from dropping the wireless connection. It is a bug in the OS. Apple has not fixed it in 3 years.
    You wireless connection will be a tad slower, but you really won't notice.
    Hope that helps.
    DB

  • Have a MacMini that is dropping NFS Share connections, Using cifs://servername/path however the NFS Share is dropped everyday without fail.

    Have a MacMini that is dropping NFS Share connections, Using cifs://servername/path however the NFS Share is dropped everyday without fail.  Is there a better way to setup this share?  I've got 5 other Macs that use the same NFS Share and none of them are dropping the shared connection.  This is on OSX 10.9.x Maverick.

    cifs:// is not NFS cifs:// is effectively SMB i.e. Windows filesharing, NFS is Unix filesharing, furthermore cifs:// is a way of forcing Mavericks to use SMB version 1 protocol. Normally you would use smb:// which will default to trying to use SMB version 2 protocol.
    Saying all that, SMB version 1, SMB version 2, and NFS should all normally work fine. It is possible that the server may be configured to disconnect idle users although one would expect this to happen with other users as well. It is perhaps more likely that your problem Mavericks Mac maybe going to sleep periodically, while asleep the connection to the server maybe being lost. Apple's own server software has specific cleverness to allow clients to sleep and resume their connection when they wake.
    Therefore it might be worth checking your Energy Saver settings on this Mac and disabling computer sleep.

  • Opening and closing Multiple TCP connection​s issues

    Hi all I am having an issue with the TCP VI’s and wondering if anyone has experienced this issue.
    My application is required to scan 50-100 IP addresses (statically assigned) and discover if an Ethernet device is connect at that IP address. Currently I am able to achieve this by opening a TCP connection and testing the error cluster to determine if a timeout has occurred (no timeout error  means Ethernet device available at the IP address). I then ensure that the TCP connections are closed.
    The issue I am have is that I require a 1 second delay between the  TCP open and the TCP close which significantly slows down the process. Without the 1 second delay the vi successfully connects to the device once then fails to make any TCP connect regardless of the time delay until the PC is reset.  
    If anyone has any advice I would be very grateful
    David Barr
    P.S. I have attached a simplified section of code showing this issue
    Attachments:
    TCP Open close issue.vi ‏15 KB

    smercurio_fc wrote:
    If I understand you correctly you want the time delay to be 1 second if there's a successful connection....
    While I don't have a specific answer for this problem. I want to clarify for him. I believe the issue is, what if all connections ARE there? That means you keep returning a wait of 1 second 50-100 times so It takes 50-100 seconds just to initialize. I think the user is looking for a way to check for valid connections, but do so in such a way that eliminates the need for a wait which is greatly slowing things down.
    CLA, LabVIEW Versions 2010-2013

  • Anyone else having an issue with TCP connections using iCloud for Windows?

    Hi,
    Before I asked this question, I did wait to see if any related questions came up, but none did, so I submit it now.
    On my admittedly older laptop running Windows 7 64b Home, I've run into difficulties with the iCloud for Windows app to the extent that I had to uninstall it.
    It would that, as my laptop was running, in the background, iCloudServices.exe would endlessly iterate TCP connections, which, while not actively sending or receiving any data, after some hours would number over 100 instances, taking up resources, and grinding my laptop's WiFi connection to a grindingly slow pace. I ended up, within the app, turning off everything, iCloud Drive and Photos, (I never used bookmarks), but still this would continue to occur.
    I contacted Apple Support, explaining what was going on, and they stated they only dealt with IOS and gave me a Microsoft Support number. When I called Microsoft support, I came more and more to the realization that the issue was specifically with the iCloud for Windows app, as that was the only software that was endlessly creating and not closing TCP connections as it was. How was Microsoft supposed to solve an issue with Apple code?
    So I called Apple back, whereupon they insisted it was a Microsoft issue. I explained other cloud services installed on the same computer were not having the same issue, it was unique to ICloudServices.exe. They stated they only dealt with IOS. I stated I purchased an iPad Air less than 7 months ago, and was trying to run iCloud in support of that.  They again stated they only dealt with IOS, and suggested I again try Microsoft. I asked them if it was reasonable to expect Microsoft to solve issues with Apple code? They said regardless, there was zero support offered for anything having to do with Windows, and all I could do was uninstall the app, which I did, though that did not feel very satisfactory to me. My thinking is, if Apple writes a Windows app in support of their hardware, they should offer support for it.
    Anyway, I was just wondering, is this an issue unique to me? or have others experienced a similar issue? I found this issue by opening the Windows Resource Monitor, looking under the Networking tab, and scrolling through the TCP Connections section to find 100+ concurrent iCloudServices.exe instances listed, whereas even Chrome, with multiple tabs and extensions, topped out at around 20.
    My one month old Desktop, DYI, sports a solid Asus 1150 MoBo, i7-4790k cpu, 16GB Ram, and an EVGA GTX 970 video card. I list some specs only to illustrate this computer has no hardware issues in comparison to my long in tooth laptop. On this desktop, running Win 8.1 Pro 64b,  at least as many, identifiably Apple, background service TCP connections are created even compared to Chrome, regardless of many tabs being open, many extensions, and even some related apps. Adobe does not even come close, though I run the full CC subscription. On this new computer, running Windows 8.1 Pro 64b, there are currently over 50 TCP connections and loopbacks that do not identify themselves, with just a - for the Image, and PID. With the experience on my laptop, I wonder how many of these are generated by Apple software, if not specifically iCloud software?
    The frustrating aspect of these connections is they seem in no way active, While the Chrome and Adobe connections can be seen to be transferring data, as long as I am not running iTunes, or so have my iPad actually plugged in, it seems 99% of the time these iCloudServices.exe connections are just taking up ports, neither sending nor receiving any data discernable to me under the Processes with Network Activity, or Network Activity lists, both displayed in the same window as the TCP Connections in the Windows Resource Monitor.
    Though I am fairly ignorant as regards coding, it seems as if there is no call to close a connection, very specifically, iCloudServices.exe, when it is no longer needed, and the next time a connection is needed, a new one is opened, rather than accessing the one previously opened. The only other reason I could imagine this might be occurring is if my Norton Internet Security software might mask and/or block the port after a certain time of inactivity.
    Anyone out there have any ideas or advice about this? Thanks in advance.

    Thanks jared,
    I'm still dealing with this issue through Apple. Some time after I posted this, I contacted Apple again. They did start a case up for me, as I was experiencing the same behavior on two different machines, with two different versions of Windows.
    So far it remains unsolved. I've logged iClouds for Windows on my desktop, which is brand new, then logged for awhile after completely uninstalling Norton Security Suite, depending on the Microsoft security for some time, and finally logged after I uninstalled iCloud for Windows, restarted, installed a clean download, and connected using a completely different test account, which Apple set up for me. None of this made any difference. Looking at the logs, it seems every 10 minutes, iCloudServices.exe creates a new TCP connection to confirm I'm using less than 5GB on iCloud, (which I am by a good margin, using less than 2GB), it seems this connection is not closed, and when the next iteration rolls around 10 minutes later, a new TCP connection is created. I come very close to having 6 TCP connections created per hour, until I restart my computer. This works out to... 6 x 24 = 144/day.
    Perhaps the article you posted will shed some further light on this. I'm thinking seeing the state of the connection through netstats, at the least, could help.
    For the last week, I've been putting a hold on further logging, as Apple wants me to create a new user account on one of my computers, install iCloud for Windows there, and log it running in the other account. This however basically means I cannot use my computer for a fair number of hours, and I've been busy enough with work the past week that I haven't the time or energy to afford to set this up and run it. I've had need of my computers too much for the past week.

  • MacBook Pro drops Wi-Fi connection after upgrading to 10.7.4

    Hi
    My MacBook pro Mid 2010 i7 start do drop Wi-Fi connection after i uppgradet Os X Lion from 10.7.3 too 10.7.4.
    The behavior is that the network is working for a while but suddenly is Wi-Fi Signal Status completely empty. I need to go in and select the network again. Often loses MBP Wi-Fi directly, but the third time will keep the MBP signal until I restart the computer, then precessen same again.
    I have tried is to delete the network and add the network for OS X also resetar (Netgear WNDR3700), and no help
    Does anyone know what to do?

    I have been having the same issue for the last two weeks. No real indication as to why it ever began other than I had turned off my router and Airport Extreme Base Station off for a weekend while I was away from my place.
    iPad, iPhone, iPod Touch, all have no issues at all with my Airport Extreme Base Station. Can stay connected throughout my living room, bathroom, bedroom, no issues whatsoever.
    My 5 month old MacBook Pro 2.66 GHz Core i7 Airport is sometimes perfect, able to connect, DHCP, and browse without issue. Then, for no reason, I won't be able to join my wireless network, or when I can join, I can't pick up an IP address. And then it will connect, pick up and IP, and then it won't browse. No real rhyme or reason to when this will happen, or when it works.
    I thought that it was an issue with my MacBook Pro, but then my sister visited with her brand new MacBook Pro 2.26 Intel Core 2 Duo, and while a month ago she was able to connect, DHCP, and browse without issue, this weekend she had all of the same issues I was having.
    My XBOX 360 and MacBook Pro have absolutely no issues with the wired connection. Only my WAN seems to have this issue.
    Did you ever find anything more to this?

  • Wifi keeps scanning and dropping even after connected to home network.  Never had this issue until the update, and now my phone runs slow and terrible.  Horrible update!!  Any ideas on a fix?

    Wifi keeps scanning and dropping even after connected to home network.  Never had this issue until the update, and now my phone runs slow and terrible.  Horrible update!!  Any ideas on a fix?

    It's important that you have a steady WiFi connection, ZealousEdge. What phone do you have? Is your phone unable to connect to any WiFi network? If you can, please try deleting the saved WiFi network and re-adding it.
    AndreaS_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • TCP connection error when sending MODBUS commands to WAGO 750-881 controller after 113655 bytes of data have been sent

    Hi all,
    I am new to the world of labview and am attempting to build a VI which sends commands to a 750-881 WAGO controller at periodic intervals of 10ms. 
    To set each of the DO's of the WAGO at once I therefore attempt to send the Modbus fc15 command every 10ms using the standard Labview TCP write module. 
    When I run the VI it works for about a minute before I recieve an Error 56 message telling me the TCP connection has timed out. Thinking this strange, I decided to record the number of bytes sent via the TCP connection whilst running the program. In doing so I noticed that the connection broke after exactly 113655 Bytes of data had been sent each time. 
    Thinking that I may have been sending too many messages I increased the While-loop delay from 10ms to 20, 100 and 200 ms but the error remained. I also tried playing with the TCP connection timeout and the TCP write timeout but neither of these had any effect on the problem. 
    I cannot see why this error is occuring, as the program works perfectly up untill the 113655 Bytes mark. 
    I have attached a screenshot of the basic VI (simply showing a MODBUS command being sent every second) and of a more advanced VI (where I am able to control each DO of the WAGO manually by setting a frequency at which the DO should switch between ON and OFF). 
    If anybody has any ideas on where the problems lie, or what I could do to further debug the program this would be greatly appreciated. 
    Solved!
    Go to Solution.
    Attachments:
    Basic_VI.png ‏84 KB
    Expanded_VI.png ‏89 KB

    AvdLinden wrote:
    Hi ThiCop,
    Yes the error occurs after exactly 113655 bytes every time. The timeout control I would like to use is 10ms, however even increasing this to 1s or 10s does not remove the error, which leads me to believe that this is not the issue (furthermore, not adding any delay to the while loop, thus letting it run at maximum speed, has shown that the TCP connection is able to send all 113655 bytes in under 3 seconds again pointing towards the timeout control not being the issue here). 
    I attempted Marco's suggestion but an having difficulty translating the string returned into a readable string, (rightnow the response given is "      -#   +   ").
    As to your second suggestion, I implemented something similar where I created a sub VI to build a TCP connection, send a message and then close the connection. I now build each message and then send the string to this subVI which successfully sends the command to my application. Whilst not being the most elegant method of solving the issue, it has resolved the timeout problem meaning I am able to send as many commands as I want. So in that sense the problem has been solved. 
    If you still have tips on how to correctly read the TCP read output, I would however like to see if I could not get my first program to work as it is slightly more robust in terms of timing. 
    Modbus TCP RTU is a binary protocol, as you show in your Basic VI, where you format the data stream using byte values. So you have to interprete the returned answer accordingly with the Modbus RTU spec in hand. Now what is most likely happening is that the connection gets hung after a while since you do NOT read the data the device sends as response to your commands. The TCP/IP stack buffers those bytes and at some point the internal buffers overflow and the connection is blocked by the stack. So adding the TCP Read at strategic places (usually after each write) is the proper solution for this. Is there any reason that you didn't use the NI provided Modbus TCP library?
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for