Skip to main content
1-Visitor
January 30, 2020
Solved

C-SDK support on the uClibc standard C library and mbedTLS

  • January 30, 2020
  • 1 reply
  • 3283 views

Today, many of the IoT devices in field are based on uClibc and mbedTLS instead of the glibc and openSSL toolchain. Is there any version of such a C-SDK available from PTC targeting such devices. If not, can the C-SDK be simply ported on to uClibc/mbedTLS safely?

Best answer by Rick-Stanley

Some changes are required to run the C SDK on a new processor. All required changes can be made in the twOSPort.h file where the processor specific code is defined.

 

I see a TLS library for mbed is available here:

https://www.mbed.com/en/technologies/security/mbed-tls/

You would need to include this library in your build and reference the appropriate mbed specific functions from your mbed specific file in the porting directory

Information about the specific steps required in porting to a new OS is available here:

http://support.ptc.com/help/thingworx_hc/thingworx_edge_sdks_ems/index.html#page/thingworx_edge_sdks_ems%2Fc_sdk%2Fc_csdk_requirements_for_platforms.html%23

1 reply

5-Regular Member
January 30, 2020

Yes, the C SDK is designed with porting in mind. Both the networking and SSL functions are abstracted into separate files to make them "pluggable". Some porting information is available in the ThingWorx Foundation documentation:

 

http://support.ptc.com/help/thingworx_hc/thingworx_edge_sdks_ems/index.html#page/thingworx_edge_sdks_ems%2Fc_sdk%2Fc_csdk_requirements_for_platforms.html%23

 

More information about porting is provided in the documentation included with the C SDK 

ravi21-VisitorAuthor
1-Visitor
January 31, 2020

Hi Rick-Stanley,

 

Thank you for sharing the link.

 

However, since Mbed TLS does not yet offer an OpenSSL API (interface), I wanted to know if the C-SDK would be compatible with it without any code changes in the SDKs src code?

 

Regards,

Ravi

5-Regular Member
February 12, 2020

Some changes are required to run the C SDK on a new processor. All required changes can be made in the twOSPort.h file where the processor specific code is defined.

 

I see a TLS library for mbed is available here:

https://www.mbed.com/en/technologies/security/mbed-tls/

You would need to include this library in your build and reference the appropriate mbed specific functions from your mbed specific file in the porting directory

Information about the specific steps required in porting to a new OS is available here:

http://support.ptc.com/help/thingworx_hc/thingworx_edge_sdks_ems/index.html#page/thingworx_edge_sdks_ems%2Fc_sdk%2Fc_csdk_requirements_for_platforms.html%23