eclipse-wakaama / wakaama

Eclipse Wakaama is a C implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
BSD 3-Clause "New" or "Revised" License
498 stars 374 forks source link

How to use the wakaama library for Espressif #757

Closed Hariprabhu13 closed 6 months ago

Hariprabhu13 commented 7 months ago

Hi, I have developping the openthread device's and I want to implement the lwm2m client in it. So, anyone can tell me that it is supported esp32c6 device firmware's. And how to add the Library for my project to enable lwm2m client in it...

jvermillard commented 7 months ago

In the past, I started from the example (for example, the light client) and adapted the connection piece (socket) to replace the POSIX socket call with what is available for your target IP stack.

Hariprabhu13 commented 7 months ago

Thanks for your reply @jvermillard In my end device I've using the UDP socket for Communicate from the Leshan server for Light Control, Instead of I'm want to use the LWM2M Client in my Device for Light Control from the Server...

LukasWoodtli commented 7 months ago

Try something like this:

  1. Add the Wakaama repo as submodule to your project.
  2. Include wakaama.cmake in your CMake project.
  3. Call the CMake functions target_sources_data and target_sources_wakaama on your target.
  4. Implement the C functions listed under Platform abstraction functions to be implemented by the user in liblwm2m.h somewhere in your project.
  5. Implement a connection with your UDP socket. Get inspiration from the examples (examples/shared/).
  6. Take a suitable example as basis for your code. And work from there.

Feel free to ask for help if you get stuck. Unfortunately, we did not manage yet to write a tutorial on how to get started with Wakaama.

Hariprabhu13 commented 7 months ago

Hi @LukasWoodtli , I'll try this in my code as your reference and Let you Know...

LukasWoodtli commented 6 months ago

Closing this issue due to no action lately. @Hariprabhu13 feel free to reopen it if you need support.