TCP Connections vs TCP Flows

Hello:
I'm trying to track activity on a CSS11800 and have been watching TCP Connections with "sh serv summary" and TCP Flows with "sh flows 0.0.0.0". However, there doesn't appear to be any obvious correlation btw these figures.
Can anyone tell me which command will provide the most accurate picture of current user connections?
Does "sh serv summary" display both inbound and outbound connections whereas "sh flows 0.0.0.0 xx.xx.xx.xx" displays inbound connections only??
We often see high numbers of TCP Connections during off hours when there is no activity occuring. Perhaps this is case of browsers being left open which maintains the TCP flow.
Thanks for the insight.
Best regards,
Dan

Hi Gilles:
We have 3 service balanced to a single VIP for one client. We have been using the TCp Conn's from "show service summary" to gauge the activity of the client.
However, this number seems to fluctuate, but never actually goes below roughly 40 per service, even when there are no active flows to the VIP. And it never correlates directly to the number of flows. Would it count 2 conn's for each flow (inbound and outbound)?
Our HTTP keepalives are running as persistant - could this affect the TCP Conn's number?? Or perhaps it's an IOS issue?
Our test environments on both old IOS and 6.10 seem to display the TCP Conn's correctly, as in the number goes up and down with the creation and teardown of TCP flows. But, it seems on a loaded production environment.
Are there any particular concerns relating to the 5.02 image?? We are planning an upgrade very soon.
Regards,
Dan

Similar Messages

  • Error type: COMPONENT_ERROR Could not start TCP connection listener

    Hi All,
    I am working with EDI to SAP R/3 scenario with Seeburger. In this i am using EDI message ORDERS V9A .
    i have configured OFTP adapter for this.
    when i enter into the Runtimeworkbench i have seen adapter monitoring. in this i got one error mentioned below.
    Please give me solution for this error
    Processing Details for Cluster Node Server 0 1_39044
    Type
    Time Stamp
    Message ID
    Explanation
    03/04/08 14:22:12
    Error type: COMPONENT_ERROR >> Error date: 03/04/08 14:22 >> Description: Error occurred while trying to start connection listeners. Could not start TCP connection listener [[TCP listener Channel: CC_SOURCE_EDI;Party: GXSMAILBOX;Service: GXSMAILBOX (ID: ): 198.133.252.208:11551]]. Reason: Could not start connection listener [03/04/08 14:22]
    Thanks and regards
    sai

    Hi,
    The date format which can seen in error in not suppoted in SAP ECC system.......it will take yyyymmdd as the date format......change the date  format in XI.......in mapping we can use standard funtion fro date transformation.
    Regards,
    Phani

  • Combining UDP and TCP connections

    I am trying to build a simple client -server app, where multiple client sends price quotes to a server and the server does some analysis on these numbers and spits it back out to all the clients every 5 seconds or so. Before I start, I want to make sure I am thinking about it correctly. I was thinking that I could have on each client a UDP connection and a TCP connection, the TCP connection would be used to send the quotes to the server. This way I have a live connection and confirmed packet reception from client to server.
    The UDP would be used for when the server sends back out the quotes to all the clients, since the server is just sending out back certain ones (the best quotes that is) to all the clients. Does that seem like a reasonable design?

    The only reason is because the server should be sending out it's information via datagrams because it wants to send the same message to all the clients. So in my point of view it looks like it would be more efficient to send out one datagram, broadcasted instead of going through each client and sending the same thing, especially when I'm trying to send an update every 5 seconds or so.

  • %ASA-5-305013: Asymmetric NAT rules matched for forward and reverse flows; Connection for tcp src outside:10.159.159.3/49204 dst tru777:10.1.34.19/3389 denied due to NAT reverse path failure

    Hi,
    I have an ASA5510 running version 8.2(5). I have set up a new network on interface Ethernet0/1.777 of the fwl. The firewall works perfectly with remote access VPNs but has now given me the error with the new network that has been set up:
    %ASA-5-305013: Asymmetric NAT rules matched for forward and reverse flows; Connection for tcp src outside:10.159.159.3/49204 dst tru777:10.1.34.19/3389 denied due to NAT reverse path failure
    The difference between the other networks and the new one that I have set up is that this is the first one using a private addressing scheme. I understand that NAT is not allowing something along the way but I cant figure out what needs to change in order to get it to work. My config is as follows:
    interface Ethernet0/1.777
    description TRU 777
    vlan 777
    nameif tru777
    security-level 50
    ip address 10.1.34.17 255.255.255.240 standby 10.1.34.18
    access-list acl_tru777 remark * ALLOW ALL OUTBOUND *
    access-list acl_tru777 extended permit ip any any
    access-list RA-VPN extended permit ip 10.1.34.16 255.255.255.240 10.159.159.0 255.255.255.0
    access-list acl_no-nat extended permit ip 10.1.34.0 255.255.255.0 10.0.0.0 255.0.0.0
    access-list acl_no-nat extended permit ip 10.1.34.0 255.255.255.0 172.16.0.0 255.240.0.0
    access-list acl_no-nat extended permit ip 10.1.34.0 255.255.255.0 192.168.0.0 255.255.0.0
    access-list acl_ra-lock-tru777 extended permit ip 10.1.34.16 255.255.255.240 10.159.159.0 255.255.255.0
    access-list acl_ra-lock-tru777 extended permit ip 10.159.159.0 255.255.255.0 10.1.34.16 255.255.255.240
    ip local pool ra-pool 10.159.159.0-10.159.159.254 mask 255.255.255.0
    nat (tru777) 4 access-list acl_no-nat
    nat (tru777) 2 10.1.34.16 255.255.255.240
    global (outside) 2 x.x.x.x
    crypto isakmp nat-traversal 20
    I think that is everything you should need, if not please just ask.
    Thank you very much in advance,
    Chris

    Hi Julio,
    Here you go:
    FWL01# sh nameif
    Interface                Name                     Security
    Ethernet0/0              outside                    0
    Ethernet0/1              CLIENTS                 50
    Ethernet0/1.314        tru01                      50
    Ethernet0/1.313        dmz01                    50
    Ethernet0/1.316        tru02                      50
    Ethernet0/1.776        dmz776                  50
    Ethernet0/1.777        tru777                     50
    Management0/0       management           100
    FWL01#  sh run nat
    nat (tru02) 1 192.168.3.0 255.255.255.240
    nat (tru777) 4 access-list acl_no-nat
    nat (tru777) 2 10.1.34.16 255.255.255.240
    FWL01#    sh run glob
    global (outside) 1 interface
    global (outside) 2 x.x.x.x
    Thanks,
    Chris

  • 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

  • Excessive Port 80 TCP Connections?  How many connections are normal?

    Hi. I'm running MacOS X 10.3.9 on a Mac Powerbook (with all of Apple's latest Security Updates installed. It is a virgin installation and no other software programs have been installed). I then installed Norton Personal Firewall 3.0.2 in order to monitor all my ports.
    By default, Norton Personal Firewall (NPF) is not set to log the number of outgoing connections for port 80, although port 80 is the port typically used by most web browsers to contact other sites on the web. If you disable port 80, then your browser will not be able to function or access the web. Therefore it is mandatory that you leave that port open. But what if some unknown hacker wrote a Trojan program to specifically ferry information out of your computer and back to him using that port, then there'd be no way to stop it once the Trojan was in place. If you disabled the port to prevent it, then you'd also disable yourself from the web. If you opened the port for your browser, then the trojan would have free and open access. At least that is the theory that has me wondering about the seemingly high number of outgoing port 80 connections displayed in my NPF logging window. Therefore, I'd very much like to find out if other users who are running a version of Panther with NPF are experiencing the same high connections behavior on port 80.
    To create the scenario for this behavior, basically you just open your NPF panel and enable all logging for port 80 (by default it is disabled). For those of you who don't specifically know how to do this, the following is the directions . . .
    . . . Open your NPF Service Settings pane. From this pane, highlight the service called Web Sharing Port 80. Click the Edit button at the bottom of the selection window. A new pane will then show the controls named Ports, Logging, and Notification. Bring forward the Logging controls and enable both checkboxes for Allowed and Denied for the Outgoing direction. Click Save and close the window.
    Once the above is done, close all other windows and open your NPF Logging window on your desktop and keep it visible for you to look at. Clear all existing entries in the log so you'll start with a clean slate. With everything set up and a web connection available, open your Safari browser (or any browser) to an online web site. On my computer, my Safari bowser is set to open to Apple's website - www.apple.com. Once the browser is open, Apple's website is then displayed.
    The result . . . surprisingly, after only a few seconds, a HUGE number of port 80 TCP connections to that website address start to show up and flow into my log. In a matter of only 3 or 4 seconds, at least 250 separate TCP connection entries will show up in my log, and they all have the same web address. If I then click on anything on the page or surf to any other website, the log entries will change to the new site address and start up again, and in some cases, in a matter of less than a minute the number of entries can easily reach into the thousands. I've seen 20,000 entries or more flow into my log after a couple of minutes. And the only way to stop the madness and the entries is to disconnect from the web. Those many entries and this behavior does not seem normal to me, no matter what port is selected and no matter what log settings are enabled. A dozen to 15 or 20 entries for a given site I can understand (I've been told some browsers can open at least 10 connections at a time), but hundreds to thousands, I cannot. I can't understand why any program under any circumstance would need to generate those many log entries in such a short time frame. My problem is I have nothing to compare this data to, I only have my suspicions and have no way of knowing whether this behavior is normal or not. So I am asking for others to make a comparison on their computer if you are running any version of Panther and Norton Personal Firewall and give me your results so I can determine what is normal or not. I've heard of certain hacker attacks called TCP flooding and other forms of attacks, and I don't want my computer to have been secretly taken over by a hacker or the initiator of such attacks unknowingly. Furthermore, this is not anything an average user would even normally notice, simply because Port 80 logging is not usually enabled in NPF. Nevertheless, I need to find out the root of this problem and learn whether this is normal. Other than these high number of connection entries, my web surfing seems normal and I haven't yet experienced any seeming sluggishness accessing sites. Any help anyone can offer I would appreciate. Thanks to everyone in advance.
    Here are some images of my own settings and results:
    http://homepage.mac.com/starshone/misc/Port80Settings.jpg
    http://homepage.mac.com/starshone/misc/Port80Log.jpg
      Mac OS X (10.3.9)  

    But all those connections are how the web works. Each HTML page has dozens or more links. Each graphic or other page element is a new HTTP request on port 80 back to the originating server (or another server even). So it's normal to have a lot of port 80 connections going out if you surf the web.
    You can see the individual elements that make up a page in Safari by going to the "Window" menu and showing the "Activity" window. I see CNN's web site tonight has 113 items on its home page. Apple's is 41. My home page is 10. So it's easy to get a lot of connections.
    Some applications also use port 80 to check for updates, so you might see the occasional port 80 connection even when you're not surfing the web. These are also nothing to worry about.
    charlie

  • CSS11000 - Configuring Maximum TCP Connections

    Hi,
    Maybe this is a stupid question. But I'm going to ask it anyway :)
    If I set the max connection on a service can I redirect the connections that are over the max connection to an error page?
    Or I'm I looking in the wrong place. I'll try to explain what I’m trying to do.
    I want to protect my application servers, if my application servers reaches a certain threshold I want to redirect the connection to a error page.
    How should I tackle this problem.
    Thanks in advance for your help.
    Geert

    Hi Gilles,
    First of all I wanted to thank you for help. Very kind of you to take time helping us.
    Second of all I want to apologies for my first post. I should have been clearer about the problem.
    Let me try again.
    Our web servers connect to our backend vip. Now the specific application doesn’t like being switched from one server to the other while in the same session. We tried to solve this problem but we didn’t succeed.
    Now we gave up balancing that application.
    But now we want to set a limit on how much connections can flow to that one application server. So the application server won’t give up under high load.
    Now when the load goes above a certain value we want to display an error page. Something like sorry try again later. But if server 1 crashes we want all connection goes to server 2. We don’t want the connections to go to server 2 when the max of connections is reached. Because than we want to see the error page.
    When I tried to create a redirect service to an url I got :
    %% Cannot have a redirect service on a Layer 4 rule.
    Now the redirect to an error page isn’t a real must. More a nice to have. But what we would like is that the server2 only takes over if server1 is down and not when the max connections is reached.
    Now this is what I have by now. But now I’m a little bit stuck. We noticed than if we are load testing the webserver thinks app1 is down because it reaches the max connections and goed to server two. Witch we don’t want.
    service geert
    type redirect
    keepalive type none
    redirect-string "www.cisco.com"
    active
    service cisco_1
    ip address xxx.xxx.xxx.xxx
    protocol tcp
    keepalive type tcp
    port xxxx
    keepalive port xxxx
    string 5
    max connections 40
    active
    service cisco_2
    ip address xxx.xxx.xxx.xxx
    protocol tcp
    keepalive type tcp
    port xxxx
    keepalive port xxxx
    string 5
    max connections 40
    active
    content cisco
    protocol tcp
    port xxxx
    vip address xxx.xxx.xxx.xxx
    add service cisco_1
    primarySorryServer cisco_2
    flow-reset-reject
    active
    with kind regards,
    Geert

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

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

  • I have a MacBook Pro.  My mac can detect wifi.  But will not connect. I did get connected vis TCP/IP settings but I can't connect to any wifi anywhere.  Network diagnostic has a green light for wi-fi and wi-fi settings.  Red light for the rest.

    I have a MacBook Pro.  My mac can detect wifi.  But will not connect anywhere. I did get connected via TCP/IP settings but I can't connect to any wifi anywhere.  Network diagnostic has a green light for wi-fi and wi-fi settings.  Red light for the rest. (Network settings, ISP, Internet and server.)

    Hello NotAppleSavy,
    Thanks for the question. After reviewing your post, it sounds like the computer wont connect to networks. I see you have used network diagnostic. I would recommend that you read this article, there are a lot of other things you can do in this article that may be able to help you resolve or isolate the issue.
    Wi-Fi: How to troubleshoot Wi-Fi connectivity
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • 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

  • How to send joystick data over TCP connection

    Hi all,
    I am a long time Labview discussion forum user for learning, but this is my first time posting a question, I hope somebody can help me!
    In the attached VI I am trying to send data from a joystick over a TCP connection. I can send data fine using the TCP examples (in fact the majority of my VI is just a copy of the example). However I am to the point where I do not know how to send all the data necessary (3 axis data, 12 buttons, and the POV data) over TCP. Strings, clusters, and arrays were never my strong suite and converting between them is a nightmare for me.
    Basically I am trying to send each axis data (X,Y, and Z), button data (12 buttons), and POV data (the POV data will be calculated to adjust the position of a camera, so the immediate data is not important, I will add functions to add the change in the button movements to write a standing position for two servos [pan and tilt], for which that I will need to send over the TCP connection) over the TCP connection to control various cameras and motors. I don't know if it is posible to send that much data over a TCP connection in one write VI through a string, and also how to separate the string on the other side in order to control the client VI.
    Again, the actual TCP communication I get, and can operate fine, just formatting all the data into a string (or whatever is required) so that I can unpack on the other side is the issue here.
    Another question I have (not impotant to get the program running just might make it easier on me) is can a TCP server (which sends the data to the client) also recieve data back from the client on the same port ( for example sensor data and digital positions [on,off])? Or do I need to set up two TCP communication loops with the first client acting as the server on a different port than the first, which then sends the data to the original server, which also has a client TCP configuration in another loop? I hope this makes sense...
    One final question.....I already have a solution to this but using labview for the entirety of this project would be nice. I use skype to stream 1080p video from a webcam to my computer so I can view live feed. Can labview do this? This would be awesome if so, I am just not sure if the communication protocols in use could support real time (or as close as possible to streaming) for 1080p video.
    Thanks all in advance for your help,
    Physicsnole
    Attachments:
    cameraserver.vi ‏24 KB
    cameraclient.vi ‏18 KB

    Physicsnole wrote:
    In the attached VI I am trying to send data from a joystick over a TCP connection. I can send data fine using the TCP examples (in fact the majority of my VI is just a copy of the example). However I am to the point where I do not know how to send all the data necessary (3 axis data, 12 buttons, and the POV data) over TCP. Strings, clusters, and arrays were never my strong suite and converting between them is a nightmare for me.
    Well, you cast the axis info cluster to a string, but then you cast it back to an array of DBL. Thatr's not compatible. You should probably cast it back to an "axis info" cluster of exactly the same type. Go the the other VI and right-click the cluster wire to create a constant. Now move that diagram cluster constant to the other VI and use it as type.
    Your default ports don't seem to match. You seem to have client and server roles confused. In the sever you create a listener, but then you start sending packets, even though no connection is established. The connection needs to be initiated by the client.
    Your client stops the loop the first time a timeout is encountered. Shouldn't that be more permanent? Also, please retain code clarity and avoid unecessary complexities. For example, replace the "not or" with a plain "or" and change the loop to "stop if true"
    Physicsnole wrote:
    Basically I am trying to send each axis data (X,Y, and Z), button data (12 buttons), and POV data (the POV data will be calculated to adjust the position of a camera, so the immediate data is not important, I will add functions to add the change in the button movements to write a standing position for two servos [pan and tilt], for which that I will need to send over the TCP connection) over the TCP connection to control various cameras and motors. I don't know if it is posible to send that much data over a TCP connection in one write VI through a string, and also how to separate the string on the other side in order to control the client VI.
    You can send as much as you want. The casting to/from string is the same as described above.
    Physicsnole wrote:
    Another question I have (not impotant to get the program running just might make it easier on me) is can a TCP server (which sends the data to the client) also recieve data back from the client on the same port ( for example sensor data and digital positions [on,off])? Or do I need to set up two TCP communication loops with the first client acting as the server on a different port than the first, which then sends the data to the original server, which also has a client TCP configuration in another loop? I hope this makes sense..
    The primary function of a "server" is to wait for a connection and then communicate with the client once a conenction is established. An established TCP/IP connection is fully two-way and both sides can send and receive.
    LabVIEW Champion . Do more with less code and in less time .

  • Connect to a printer via TCP connection with wifi

    Hi,
    what i would like to do, is to connect a printer to the iPhone via wireless.
    The printer is in the same wifi as the iPhone and the ip adress is known.
    So what i started to to is, to create a SocketConnection with CFStreamCreatePairWithSocketToHost(...). But if i switch of the printer, the inputstream is created too, and is not NULL as expected.
    Is this the right approach im using or is there a better possibilty to send strings to my printer using a tcp connection over wifi?
    Regards,
    Grinarn

    Welcome to Apple Discussions!
    In the Help menu of the Finder is a little app called Mac Help. Most Apple apps and many 3rd party apps also use Mac Help. In Mac Help is an article called *Adding a printer shared by a Windows computer via SMB/CIFS*. This article is regarding sharing a printer that is connected to a PC over a network however, and not to a router, but may have info useful to troubleshooting. You might also check with your Linksys user guide for info on sharing this printer with a Mac over the network.

  • How to prevent a TCP connection being closed when the VI that opened it finishes.

    Hello everyone.
    I am developing an application based around servers and clients communicating over TCP in LabVIEW 2012.
    When the server/client opens a TCP connection ,it launches an asynchronosly running "connection handler", to which it passes the connection reference which then takes over all the communcation. This all works fine.
    However - I have a situation where a client's connection handler can be informed of another "new" server. I would like it to open the connection (to see if it is still valid) and then pass this connection reference back to the client's main code to spawn a new connection handler. This prevents me locking up the Client's main code with a long-ish timeout if the "new" server is not actually accepting connections.
    The issue is that if the connection handler that opened up the connection to the "new" server is stopped, then it appears to destroy the reference that it opened. This means that the other connection handler that was merrily communcating with the "new" server has its TCP communciations closed (I get an Error code 1 on a write).
    I have created an example to demonstrate the issue which should be used as follows:
    1. Run server.vi - it will listen for a connection on the port specifed on its BD.
    2. Run CH Launcher.vi - it will open a connection to the server and pass the TCP reference to an instance of Connection Handler.vi which it launches.
    3. The Connection Handler should send data to the Server
    4. Stop the CH Launcher.vi
    5. The Connection Handler.vi will error.
    Any suggestions would be much appreciated.
    Cheers
    John
    Solved!
    Go to Solution.
    Attachments:
    TCP Test.zip ‏35 KB

    John_Neutron escreveu:
    In my case I have changes the part of the code that opens the TCP connection to a VI that has the same lifetime as the main VI so that any connections that have been opened will only be closed automatically when the main VI stops.
    And what are the effects? You are still facing the same problem or closing the connection only when the whole applicaton stops solved your problem?
    Regards
    Mondoni

Maybe you are looking for