8devices / wakaama

Eclipse Wakaama (formerly liblwm2m) is an implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
0 stars 4 forks source link

Build Status codecov

Wakaama (formerly liblwm2m) is an implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).

Developers mailing list: https://dev.eclipse.org/mailman/listinfo/wakaama-dev

Source Layout

-+- core                   (the LWM2M engine)
 |    |
 |    +- er-coap-13        (Slightly modified Erbium's CoAP engine from
 |                          http://people.inf.ethz.ch/mkovatsc/erbium.php
 |
 +- tests                  (test cases)
 |
 +- examples
      |
      +- bootstrap_server  (a command-line LWM2M bootstrap server)
      |
      +- client            (a command-line LWM2M client with several test objects)
      |
      +- lightclient       (a very simple command-line LWM2M client with several test objects)
      |
      +- server            (a command-line LWM2M server)
      |
      +- shared            (utility functions for connection handling and command-
                            line interface)

Compiling

Wakaama is not a library but files to be built with an application. Wakaama uses CMake >= 3. Look at examples/server/CMakeLists.txt for an example of how to include it. Several compilation switches are used:

Depending on your platform, you need to define LWM2M_BIG_ENDIAN or LWM2M_LITTLE_ENDIAN. LWM2M_CLIENT_MODE and LWM2M_SERVER_MODE can be defined at the same time.

Examples

There are some example applications provided to test the server, client and bootstrap capabilities of Wakaama. The following recipes assume you are on a unix like platform and you have cmake and make installed.

Server example

The lwm2mserver listens on UDP port 5683. It features a basic command line interface. Type 'help' for a list of supported commands.

Options are:

Test client example

DTLS feature requires the tinydtls submodule. To include it, on the first run, use the following commands to retrieve the sources:

You need to install autoconf and automake to build with tinydtls.

Build with tinydtls:

The lwm2mclient features nine LWM2M objects:

The lwm2mclient opens udp port 56830 and tries to register to a LWM2M Server at 127.0.0.1:5683. It features a basic command line interface. Type 'help' for a list of supported commands.

Options are:

If DTLS feature enable:

To launch a bootstrap session: ./lwm2mclient -b

Simpler test client example

In the any directory, run the following commands:

The lightclient is much simpler that the lwm2mclient and features only four LWM2M objects:

The lightclient does not feature any command-line interface.

Options are: