Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hello All,
I am trying to use the SteamSensor example from the C SDK and I have the following requirements:
I have already created a thing from the RemoteThing Template and an application key in my Thingworx webbased GUI on my Windows 7.
I also adjust all the paramerts like host, port, appkey and so in my SteamSensor main.c.
When I am trying to run the example I got errors like this on my linux client:
Do I always need an additional Edge Micrsoserver with my Edge SDK running on my linux client? Or how can I handle this error?
Thank you so much!
Greetings
Artur, how have you formatted your connection string?
What kind of connection string do you mean?
in main.c
#define TW_HOST "xxx.xx.xx.xx" //IP Adress of my thingworx server (I am able to ping the server from my client)
in twDefaultSettings.h
#define TW_URI "Thingworx/WS"
The Adress in the browser of my server is:
xxx.xx.xx.xx:8080/Thingworx/Composer/index.html
A 400 error is a bad/malformed request. What all have you modified in your code? Were you able to connect with OOTB source and modified AppKey, IP, and port?
Meghan
Hello Meghan,
I wasn't able to connect with the OOTB source so I modified some values.
In the main.c I modified the thingName to the name of the created thing in my Thnigworx Composer.
I also modified the TW_HOST and the TW_APP_KEY.
In the twTls.c I modified the two variables like
tls->validateCert = FALSE;
tls->isEnabled = FALSE;
because I got SSL Connection errors. After this modification I don't get this SSL errors anymore.
In the twDefaultSettings.h I don't modified something. My TW_URI looks like:
"Thingworx/WS"
Thank you for your response!
You don't want to go into the twTls.c or twDefaultSettings.h file and change anything right away. Let's start with a fresh copy of the OOTB C SDK and modify the following:
This should be all you need to do for proper communication to occur. If this still does not work let me know and post any error message you are seeing.
Meghan
So I have done the steps you mentioned on a fresh copy of the OOTB C SDK:
1. char * thingName = "exampleApp";
2. #define TW_HOST "172.27.30.68" <-- my server is running on antother machine (WIN 7)
3. #define TW_APP_KEY "1724be81-fa15-4485-a966-287bf8f6683c" <-- change this value to my generated app key
4.
5. I've added the twApi_DisableEncryption(); before the twApi_Initialize(); in the main function
No I am getting the following output. It seems there's no possibilty to build the socket.
If I am changing the port from 443 to 8080 I am getting the SSL Error again. This failure I have solved with changing the pointers in twTls.c, because i read about that in another dissucsion. So now I am getting this error without changing the pointers.
I also deactivated all firewalls server - sided, where my thingworx composser is running.
Thank you!
Also need to change the port (TW_PORT) since apparently the server is listening on 8080 and the SDK defaults to 80 when TLS is disabled
"The Adress in the browser of my server is:
xxx.xx.xx.xx:8080/Thingworx/Composer/index.html"
I changed the port to 8080, but then I'm getting the SSL error mentioned in the second screen cap in my last posting.
Greetings