Skip to main content
1-Visitor
June 18, 2018
Question

Using the C SDK to Deliver Data to ThingWorx from a Raspberry PI

  • June 18, 2018
  • 1 reply
  • 4100 views

Hi,

I am referring to the article  posted in knowldge base

https://community.ptc.com/t5/IoT-Tech-Tips/Using-the-C-SDK-to-Deliver-Data-to-ThingWorx-from-a-Raspberry-PI/m-p/534864#M547

 

About setting up C -SDK on Raspberry Pi.

 

I had downloaded the  C-SDK-2-1-1-636

When I unzipped the file I do not find an Makefile any where in the zip file to compile the examples and run.

However the above article which posted says that the examples comes with a makefile. Can anyone help me on the process to compile the latest C SDK on Raspberry Pi.  I tried on other platforms too with out a good make file it is very hard to compile all the dependencies. 

 

Regards

Girish

 

This topic has been closed for replies.

1 reply

5-Regular Member
June 27, 2018

Hi @gkumar-21 after downloading and unzipping the csdk you should see the cmakelists.txt file available under the root folder.

 

If you are running from linux based platform:

1. create a directory under the c sdk root folder, with any name something like this 

26-06-2018 17-47-47.jpg

 

I have named the folder as cmake, notice that i am under csdk folder which contains the CmakeLists.txt

 

2. CD into the cmake and check for the available compilers with cmake -G list

26-06-2018 17-53-51.jpg

 

and then use the required compiler e.g. cmake -G  "Unix Makefiles" ..

 

3. CD into one of the example folder within the cmake, e.g. ~/csdk/cmake/examples/SteamSensor/ and execute make to build the solution

 

4. Once the make finishes you should get an executable e.g.  SteamSensor

 

If you are building on the windows platform the steps are same, you just need to be careful of the compiler you are picking. If you run into issue of not having Cmake already available on your system you can download it for required platform from https://cmake.org/ though I think this is something available OOTB on Ubuntu.

1-Visitor
July 24, 2018

Hi ,

I followed each steps as you suggested, i can get build files but when i run "./SteamSensor"  the library files not loading, 

I have attached a Screenshot of that. Please Suggest me what should i do.

The steps i have followed:

1) Made changes in  (SteamSensor example folder)   TW_HOST ,TW_PORT and AppKey

2)Disabled HTTPS in twLinux.h file (porting folder)

3)Followed your Steps

1-Visitor
September 20, 2018

Hi, 

Were you able to get this working?