How to use mbed-client-c

Hi,

I hope this is right place to ask this question.
I have FRDMK64F with me. I am using this board for different application.
My build tool : IAR
Build code : written in C.
RTOS : freertos

How can I Add support of mbed client in my existing project using mbed-client-c. Do we have any guide/doc/way for doing this.

If we have any client example using mbed-client-c module. then I can start porting same thing to freertos. Is this Idea feasible? Please share any related guide or document.


Regards,
Meet Shah

Hi @meet,

Did you ever find an answer to this. I am working on a project that is set up similar to yours and would like any help I can get to get started. I am using Eclipse and am using freeRTOS on my device that has API’s already been written in C. Now I would like to port the mbed-client-c over if possible.

Thank you for your help, Chris

Hi,
As you would have noticed that mbed-client-c is a pure C library with no specific hardware dependency. So, simple answer , yes you can use it to run on top of FreeRTOS. But, you need to remember that this is a a very simplistic resource library that have no logic for resource management or connectivity management which you would have to implement on your application side.
However, there is also available mbed-client C++ API library, which takes care of the resource management issues and can also handle connectivity management (available for mbedOS and Linux) . So, if you are trying to put in porting effort for FreeRTOS , I would suggest that you can try at C++ level, that way you need not implement resource management part.

Regards,
Yogesh

Yogesh,

Thank you for your reply. I am working with a system which already has API’s written in C for all of it’s sensors and communication protocols. Which is why I need to stick with C code. I hope that the mbed-client-c is exactly what I need to link the device to the MBED cloud. I am starting work on this project full swing so will start with trying to build this C library and linking it on the device.

Thanks again,

Chris

Hi Chris,
How about you check this example available in mbed-client-c repo mbed-client-c/test/multithread-linux-test at master · ARMmbed/mbed-client-c · GitHub
This can get you started on how you can use mbed-client-c for your module.

Regards,
Yogesh

Hello Yogesh,

Can you tell me how to run the mbed-client-c test example: multithread-linux-test? How to view the result in mbed cloud server like we see it for mbed-client C++ linux test example? I see we dont have security credentials in the C-library, if so how will the cloud server differentiate myself with some one else?

Thanks

Hi,
Posting the link where there are more details for the discussion

Regards,
Yogesh