I am trying the SteamSensor example available in the C SDK folder. But on finally running the exe file I get the following error:
I am using the 30 day trial online composer whose address is : https://pp-180103xxxxxx.devportal.ptc.io/Thingworx/Composer/index.html
In the main.c file I set:
#define TW_HOST "pp-180103xxxxxx.devportal.ptc.io"
#define TW_APP_KEY "18ecb3d9-xxxx-yyyy-zzzz-ab6b29dc21a8"
What could be the problem? Any help is appreciated
How do I check that?
I am not using #define NO_TLS in the main.c file. So port no should be 443. Has it got something to do with that?
I am sorry. I am new to this field and was just following the steps mentioned in the tutorial. (https://developer.thingworx.com/resources/guides/thingworx-c-sdk-setup-guide/connection-test-setup)
The error in the command prompt is highlighting issues with creating SSL connection, it seems to be using the 443 which inherently points to the secured websocket. I've not tried this online guide, will check if there's anything that can be configured there, but could you check if there's any possibility that the pc from which you are executing this piece of code is not blocking e.g. firewall or some anti virus this SSL connection to ThingWorx server.
I turned off the Windows Firewall on my system. It didn't work but the error log changed slightly.
The error now reads: "Error initialising socket connection" instead of "Error initialising SSL connection".
Hmm.. interesting. So if I use the link that you have shared in your above response and if you check the Troubleshooting section the error you are receiving (which has error code of 201) seems to require users to check the websocket configuration. Some questions about your setup
1. What sort of machine are you working with, from screenshot looks like Win7, is that right?
2. How are you connected to the network? via LAN or WiFi?
Somehow I feel this kind of relates to the network adaptor, (I could be wrong though but it's worth checking) . Could you give this a try How to fix failed Windows sockets initialization? - Microsoft Community it basically points to use the Window's NetShell utility for resetting the see this: TCP/IP How to reset TCP/IP by using the NetShell utility
So I tried the above mentioned steps and it doesn't work. Instead it again started giving the previous error: "Error initialising SSL connection" as mentioned in the original post.
I also tried another Windows 7 system with a LAN connection but it still gives the same error.