Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
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?
Solved! Go to Solution.
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:
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:
More information about porting is provided in the documentation included with the C SDK
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:
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
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
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.
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