Inbound TCP connection denied

Feb 27 2014 17:02:10: %ASA-2-106001: Inbound TCP connection denied from 192.168.211.56/3376 to 200.x.x.x/10000 flags RST on interface visitor
Feb 27 2014 17:02:04: %ASA-2-106001: Inbound TCP connection denied from 192.168.211.56/3376 to 200.x.x.x/10000 flags ACK on interface visitor
Feb 27 2014 17:01:58: %ASA-2-106001: Inbound TCP connection denied from 192.168.211.56/3376 to 200.x.x.x/10000 flags SYN on interface visitor
Hi Everyone,
I was testing  new VPN  IPSEC Remote connection from our visitor network and got the logs above.
Is these Logs indicate that ASA sees no route from interface name visitor from source 192.168 to 200.x.x?
Remote VPN works fine from the Internet.
Regards
MAhesh
Message was edited by: mahesh parmar

Mahesh
In your original post you ask it if might be an issue that the ASA does not see a route for the destination. In my experience when the ASA does not have a route it will have that in the error message. So I do not believe that this issue is a routing issue. I suspect that it is more likely an issue of security level between the interface where you are connected and the interface through which you need to go. Can you identify the security level of the interfaces involved on ASA1? And are any access lists configured on the ASA for those interfaces?
HTH
Rick

Similar Messages

  • Inbound TCP connection denied from x to y

    Hi Everyone,
    Seeing following logs on ASA:
      Inbound TCP connection denied from x to y flags SYN ACK on interface Net
      Inbound TCP connection denied from x to y flags ACK on interface Net
    Does this mean that there is Asymmetric route or missing ACL?
    Regards
    MAhesh

    Hello Maheshm
    First option Asymmetric routing, use the TCP state-bypass option as a workaround.
    Remove the asymetric routing as the real fix
    Check my blog at http:laguiadelnetworking.com for further information.
    Cheers,
    Julio Carvajal Segura

  • ASA5510 %ASA-2-106001 connection denied

    Hi,
    I am having issues for one service to connect to a monitor on the inside of my ASA firewall. I am getting %ASA-2-106001 as the log error and there is a inbound TCP connection denied from 172.X.X.X (source behind firewall) to the monitor at my HQ side on the inside interface.
    I have the following NAT allowed:
    global (outside) 1 interface
    nat (inside) 0 access-list vpn
    nat (inside) 1 0.0.0.0 0.0.0.0
    I do not have an ACL going inside. The basic connection is as follows:
    [Monitor] ---- [Main Core Switch] ------ [Router to COLO] ----- [ASA5510] --- Off inside interface device.
    Regular traffic is able to pass through, but on port 2300 I am seeing the block.
    Thank you,

    Hi,
    I think this might be generaic detail for isolating this issue. I would request you to post the relevant configuration and run a packet trace on the ASA device for the traffic direction which is not working and see what action is seen in the output.
    Refer:-
    https://supportforums.cisco.com/document/29601/troubleshooting-access-problems-using-packet-tracer
    Thanks and Regards,
    Vibhor Amrodia

  • Cisco ASA Connection Denied syslog messages

    Hi,
    Could you please provide the connection denied syslog messages, I'm not able to differentiate the messages from syslog guide
    Regards,
    Shalendra

    Hi Shalendra,
    For TCP connection denied syslog , 106001 is the id.
    For protocol denied connection, 106002 is the id.
    For connection denies due to logging permit-hostdown policy, 414006 is the id.
    Refer to this link:
    http://www9.cisco.com/c/en/us/td/docs/security/asa/syslog-guide/syslogs/logsevp.html#13063
    Regards,
    Shrinkhala

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

  • ATA- Getting "TCP connect err: -33"

    In my setup, from G/w I am able to ping the ATA, but I am not able to make any outbound calls from the Analog phones ( not tried the inbound yet).
    I ran prsrv.exe and found the following error
    Connect to <0xdce08005 1720>..
    12:00;0,0,0,0,
    12:30;0,0,0,0,
    TCP connect err: -33
    SCC:ev=7[0:0] 3 0
    [0]StartTone 2
    According to the document on cisco site
    http://www.cisco.com/en/US/products/hw/gatecont/ps514/products_configuration_example09186a0080094adf.shtml
    it is a IP connectivity issue. But from G/w I am able to ping the ATA.
    Can you suggest what problem it could be?
    Regards..

    since you can ping from the gateway its not a connectvity issue with the router, may be your router is not properly configured to route the call out , check for the router configuration.

  • 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

  • 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

  • FWSM on 6500 TCP connection issues after crash on primary

    I'm experiencing a rather strange issue that has me stumped.
    We are running an FWSM on a 6509 with a SUP720. Firmware 3.2(18), in MultiContext Routed Mode, with shared MSFC.
    Everything runs fine on this baby most of them time, however occasionally without warning and with no specific pattern the Primary node will fail (as in completely stop responding) and the secondary will takover as active.
    Two get the primary up agian, I reset the hw-module and then no failover active on the secondary to return the primary as active. However, after this event, I start to experience strange issues with connectivity. Certain TCP src dst combinations will just not work. Take the following example:
    A TCP/1433 connection from Inside IP: 10.3.3.196 to outside IP: 10.252.20.63, logs look like this:
    2012-08-07 13:43:13:0868          + 13435          2012-08-07 13:43:09     Local5.Info     192.168.2.7     Aug 07 2012 11:31:19: %FWSM-6-302013: Built outbound TCP connection 145674175523995444 for servers:10.3.3.196/64112 (10.3.3.196/64112) to outside:10.252.20.63/1433 (10.252.20.63/1433)
    2012-08-07 13:43:13:0868          + 13436          2012-08-07 13:43:09     Local5.Info     192.168.2.7     Aug 07 2012 11:31:19: %FWSM-6-302014: Teardown TCP connection 145674175523995444 for servers:10.3.3.196/64112 to outside:10.252.20.63/1433 duration 0:00:00 bytes 128 TCP Reset-O
    2012-08-07 13:43:13:0868          + 13526          2012-08-07 13:43:09     Local5.Info     192.168.2.7     Aug 07 2012 11:31:19: %FWSM-6-106028: Deny TCP (Connection marked for Deletion) from 10.3.3.196/64112 to 10.252.20.63/1433 flags SYN  on interface servers
    2012-08-07 13:43:13:0875          + 13670          2012-08-07 13:43:10     Local5.Info     192.168.2.7     Aug 07 2012 11:31:20: %FWSM-6-302013: Built outbound TCP connection 145674175523995445 for servers:10.3.3.196/64112 (10.3.3.196/64112) to outside:10.252.20.63/1433 (10.252.20.63/1433)
    2012-08-07 13:43:13:0875          + 13671          2012-08-07 13:43:10     Local5.Info     192.168.2.7     Aug 07 2012 11:31:20: %FWSM-6-302014: Teardown TCP connection 145674175523995445 for servers:10.3.3.196/64112 to outside:10.252.20.63/1433 duration 0:00:00 bytes 124 TCP Reset-O
    However I create a specific ACL on the upstream routers interface, to see if I get any matches and the traffic is not even leaving the 6509. I can however ping the remote device without any issues. And I can confirm that the xlate has been built.
    This connection was working fine prior to the crash, and the ACL rules are correct and do allow the connection on both the local FWSM and the remote firewall.
    Currently my only resolution is to  reboot the FWSM on both nodes at the same time so that we have a complete fresh start. This is not ideal!
    Anyone know of issues like this? Any suggestions for workarounds or perhaps ways to troubleshoot the reason for the crash?
    Thanks!
    Craig

    Hi Bro
    Perhaps, this could be a hardware related issue concerning your Primary FWSM. However, before we can conclude that, could you upgrade your FWSM to the latest image v4.1.7?

  • Does flash player use inbound rtmp connections

    so I'm using fiddler to monitor network traffic and I don't see any requests to port 80 while playing back FMS streams. And the same happens even when I block port 1935 inbound. So my question is this, does flash require port 1935 be open on the client machine's firewall inbound. Or can it playback and see live video with DVR functionality simply using outbound requests? If yes, then this is great news because it appears that windows 7 default firewall settings are to allow outbound requests on 1935.
    But if not is there some tool I can use like fiddler to detect exactly what requests are being sent from the flash player and to which port.

    Hi,
    Though I did not get your question correctly, I will try to answer a few things that I understand. In case you are talking about Firewall restrictions on the client, asl long as your firewall does not restricts incoming RTMP packets from FMS you should be able to play the media. When you connect to FMS on port 1935, a socket connection is established between FMS on 1935 and a port on client which is essentially a TCP connection. Also when you need to play the media your Flash player security sandbox settings should also allow you to access the internet. Also check this page to get more information on ports and firewalls http://kb2.adobe.com/cps/164/tn_16499.html.Hope this helps.
    Thanks,
    Abhishek

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

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

Maybe you are looking for