cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

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

gkumar-21
5-Regular Member

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

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

 

4 REPLIES 4
supandey
19-Tanzanite
(To:gkumar-21)

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.

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

Hi, 

Were you able to get this working?

Hi,

yes i have solved this issue regarding that error,

you need to install one library. just download "libssl1.0.0_1.0.1t-1+deb8u8_armhf.deb " file in Raspberrypi and  cd into Downloads folder  and run this command:    dpkg --install libssl1.0.0_1.0.1t-1+deb8u8_armhf.deb

 

 

 

 

Regards,

Akshay

Announcements


Top Tags