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

Compile server&client example with DTLS #775

Open Pmctst opened 4 months ago

Pmctst commented 4 months ago

Hi,

I want to try the server and client with DTLS support. I have seen in the source code that I need to compile with WITH_TINYDTLS define but I haven't seen a place where that define is commented or where I have to write it.

Besides that, in case of enabling, how can I include the PSK ID and the PSK content for each client? Is there a new command in the server and another one in the client?

LukasWoodtli commented 4 months ago

There is a target lwm2mclient_tinydtls that builds a client with DTLS support. For the server side, there is no ready to use example.

Have a look at examples/client/CMakeLists.txt and related code, for inspiration to implement something similar for the server.

I don't know about any command regarding PSK ID (and related data). But I had no exposure to that code so far.