Skip to main content
1-Visitor
Jan 3, 2017 10:11 AM UTC
Question

TCP communication issue

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.

7 replies

5-Regular Member
Jan 3, 2017 9:27 PM UTC

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

Translate
1-Visitor
Jan 4, 2017 4:53 AM UTC

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

Translate
5-Regular Member
Jan 4, 2017 4:27 PM UTC

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?

Translate
1-Visitor
Jan 5, 2017 9:57 AM UTC

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​

Translate
1-Visitor
Jan 10, 2017 4:57 AM UTC

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

Translate
5-Regular Member
Jan 19, 2017 8:08 PM UTC

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

Translate