Skip to main content
Jan 30, 2020 2:47 PM UTC
Solved

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

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?

Feb 12, 2020 7:27 PM UTC

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

9 replies

Jan 30, 2020 4:11 PM UTC

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 

ravi2Author
Jan 31, 2020 6:07 AM UTC

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

Feb 12, 2020 7:27 PM UTC

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