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

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

SOLVED
ravi2
12-Amethyst

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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...

View solution in original post

9 REPLIES 9

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...

 

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

ravi2
12-Amethyst
(To:Rick-Stanley)

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

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...

View solution in original post

slangley
22-Sapphire III
(To:Rick-Stanley)

Hi @ravi2.

 

If one of the previous replies answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

ravi2
12-Amethyst
(To:slangley)

@slangley I don't agree with the reply marked as the solution.

slangley
22-Sapphire III
(To:ravi2)

Hi @ravi2.

 

No worries.  I have unmarked the solution.

 

It would be helpful for you to elaborate regarding your disagreement.  Have you found another solution?

 

Regards.

 

--Sharon

ravi2
12-Amethyst
(To:slangley)

Hi Sharon,

 

As stated in one of my previous post, since mbedTLS is not API compatible with openSSL, the C-SDK cannot be ported "as-is", and code changes are required (in my opinion) inside the C-SDK to use mbedTLS API's instead of openSSL. This looks to me like C-SDK does not support mbedTLS and the person doing code changes will have to test the library completely.

 

Also, the file mentioned by Rick-Stanley, twOSPort.h, is to include OS specific changes, and has nothing to do with either of my concerns:

1. Support for the uClibc standard C library by the C-SDK

2. Support for mbedTLS by the C-SDK

 

Regards,

Ravi

The C SDK should work when linking to either uClibc or glibc.

 

The C SDK was designed to be ported to different toolchains and has been successfully ported to many small microcontrollers. openSSL is included with the C SDK and the security layer of the C SDK can be easily removed or changed. Let us know if you have any specific questions following the the porting instructions in Chapter 10 of "ThingWorx Edge C SDK Developer's Guide", or problems with the included example code and templates showing how to include external security libraries.

slangley
22-Sapphire III
(To:slangley)

Hi @ravi2.

 

If the previous post has now answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Announcements