Skip to main content
1-Visitor
January 3, 2017
Question

TCP communication issue

  • January 3, 2017
  • 3 replies
  • 4144 views

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.

3 replies

5-Regular Member
January 3, 2017

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

1-Visitor
January 4, 2017

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

SendTextTCPMessage - Test Service

5-Regular Member
January 4, 2017

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?

1-Visitor
January 5, 2017

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

1-Visitor
January 10, 2017

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

5-Regular Member
January 19, 2017

Does the disconnect occur immediately or after a set period of time? WSCommunicationsSubsystem (under Subsystems) controls the WebSocket Communication Settings.