Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
I am facing some issue during TCP communication, I want some help from community, I already spent two days in this . For this TCP communication I am following the guide which is inside the TCP extension.
I was downloaded TCP Extension from PTC market place, then I imported the zip file into Thingworx composer, Now I creted my own thing and I included TCPThing template in General information page Thing Template option. and I configured the IP & port in SendTextTCPMessage - Test Service page, After that I am not ale to communicate with my TCP server. I am getting Connection timed out error some times connection refused error .
Thank you in advance.
Thangarasu, is the ThingWorx server and the TCP server in the same network? The reason I'm asking this is because you're trying to hit a '192.168.xx.xx' server (which is a local address).
Thanks for your response Aanjan.
Yes,Thingworx server and TCP server both are in same network. Both servers are running in one laptop. These are all my Thing and TCP configuration screens, Anything I have to modify here...?
Have you setup your Java security/ permissions correctly? Since this is on a local machine, can you try using 0.0.0.0 or 127.0.0.1 as the IP address (on both ThingWorx and the TCP server) instead?
Hi,
Where I have to setup the java permissions...?
1) I tried with IP:127.0.0.1 port:8080 (with TCP server listening mode and withour TCP server listening mode I am getting the same result)
2) IP:127.0.0.1 port:21
I unable to connect with TCP server... anything i have to include in TCP Thing..?Stephen Harmon
Can you remote into the server directly and run everything as localhost? I just tested TCPThing with SocketTest, it worked correctly on my end. I ran that on port 8080 and had to give security permissions for Java to allow 'sockettest.sourceforge.net' to be exempted. If you search for 'Configure Java' in the Start menu, the security settings can be set/ changed in the Security tab.
Hey Ravi,
Thanks for your support, Finally I am able to communicate through TCP extension.
But still I have some issues, During TCP communication I am sending one TCP request from Thingworx TCP client to TCP server. So TCP connection was created. But, Suddenly my Thingworx TCP client closing this connection.
Here every time I have to create a new connection. I don't want this, By creating one TCP connection I have to communicate certain amount of time.
Is it possible to overcome this automatic connection close....?
Does the disconnect occur immediately or after a set period of time? WSCommunicationsSubsystem (under Subsystems) controls the WebSocket Communication Settings.