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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Success in using ThingWorx REST calls to communicate sensor values from Texas Instruments devices

jamesso
10-Marble

Success in using ThingWorx REST calls to communicate sensor values from Texas Instruments devices

I want to thank Adrian for his patience in handling my requests for assistance.

I will summarize my situation. I have TI SmartRF06 boards with TI CC2538 System-on-Chip (SOC) that include 6LowPAN radios for communication with a local router that can bridge traffic to the internet. These devices run an open source OS called Contiki which offers a quite rich programming environment based in a dialect of C. The OS includes support for Web Socket requests as well as ordinary http socket usage. I did not want to resort to the Thwx SDK for C if I did not have to. Based on a URL example from Adrian, I discovered that the Contiki API to pass a URL to the http socket used fixed strings whose default sizes were too small for the long URLs needed to make the REST calls.

Like (actual APIkey removed):

http://54.172.133.168/Thingworx/Things/RestTestThing/Properties/Prop_Humidity?appKey=<<myAPIKey-here>>&method=put&x-thingworx-session=true&value=91

But I discovered where the sizes were set, lengthened them considerably, and compiled a program to push sensor values (Light Sensor and Accelerometer X, Y and Z axis values) to my ThingWorx things. Once I install this program on the device, I see property values update on ThingWorx!

I have yet to make a mashup to take advantage of this, but I suspect it won't be too hard.

The things are not based on the RemoteThing template since there is no EMS brokering them. I can provide more information if someone is interested.

This slideshare link provides some context for the devices I am using:  http://www.slideshare.net/ADunkels/building-day-1-upload-3

Jim

1 REPLY 1

James,

I am interested.  I have just become part of the Academic Program and I have a multitude of TI products at my disposal ... TI micro-controller boards, sensors, wireless adapters, etc.

Tom Dillon

Top Tags