All Projects → eclipse → Wakaama

eclipse / Wakaama

Licence: epl-2.0
Eclipse Wakaama is a C implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Wakaama

Leshan
Eclipse Leshan is an OMA Lightweight M2M (LWM2M) implementation in Java.
Stars: ✭ 483 (+34.92%)
Mutual labels:  coap, eclipseiot, iot, internet-of-things
Californium
CoAP/DTLS Java Implementation
Stars: ✭ 521 (+45.53%)
Mutual labels:  coap, eclipseiot, iot, internet-of-things
Kura
Eclipse Kura™ project - http://eclipse.org/kura
Stars: ✭ 369 (+3.07%)
Mutual labels:  eclipseiot, iot, internet-of-things
Paho.mqtt.embedded C
Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
Stars: ✭ 887 (+147.77%)
Mutual labels:  eclipseiot, iot, internet-of-things
Paho.mqtt.java
Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
Stars: ✭ 1,620 (+352.51%)
Mutual labels:  eclipseiot, iot, internet-of-things
Iot Technical Guide
🐝 IoT Technical Guide --- 从零搭建高性能物联网平台及物联网解决方案和Thingsboard源码分析 ✨ ✨ ✨ (IoT Platform, SaaS, MQTT, CoAP, HTTP, Modbus, OPC, WebSocket, 物模型,Protobuf, PostgreSQL, MongoDB, Spring Security, OAuth2, RuleEngine, Kafka, Docker)
Stars: ✭ 2,334 (+551.96%)
Mutual labels:  coap, iot, internet-of-things
Designiot
教你设计物联网系统。构建自己的Internet of Things 。
Stars: ✭ 1,983 (+453.91%)
Mutual labels:  coap, iot, internet-of-things
Paho.mqtt.c
An Eclipse Paho C client library for MQTT for Windows, Linux and MacOS. API documentation: https://eclipse.github.io/paho.mqtt.c/
Stars: ✭ 1,056 (+194.97%)
Mutual labels:  eclipseiot, iot, internet-of-things
Smarthome
Eclipse SmartHome™ project
Stars: ✭ 867 (+142.18%)
Mutual labels:  eclipseiot, iot, internet-of-things
Hawkbit
Eclipse hawkBit™
Stars: ✭ 283 (-20.95%)
Mutual labels:  eclipseiot, iot, internet-of-things
Paho.mqtt.android
MQTT Android
Stars: ✭ 2,334 (+551.96%)
Mutual labels:  eclipseiot, iot, internet-of-things
Ditto
Eclipse Ditto Project
Stars: ✭ 245 (-31.56%)
Mutual labels:  eclipseiot, iot, internet-of-things
Mainflux
Industrial IoT Messaging and Device Management Platform
Stars: ✭ 1,341 (+274.58%)
Mutual labels:  coap, iot, internet-of-things
Awalwm2m
Awa LWM2M is an implementation of the OMA Lightweight M2M protocol in C.
Stars: ✭ 93 (-74.02%)
Mutual labels:  coap, iot, internet-of-things
Vorto
Vorto Project
Stars: ✭ 179 (-50%)
Mutual labels:  eclipseiot, iot, internet-of-things
Coapnet
CoAPnet is a high performance .NET library for CoAP based communication. It provides a CoAP client and a CoAP server. It also has DTLS support out of the box.
Stars: ✭ 23 (-93.58%)
Mutual labels:  coap, iot, internet-of-things
Thingsboard
Open-source IoT Platform - Device management, data collection, processing and visualization.
Stars: ✭ 10,526 (+2840.22%)
Mutual labels:  coap, iot
Anjay
C implementation of the client-side OMA LwM2M protocol
Stars: ✭ 115 (-67.88%)
Mutual labels:  coap, iot
Aiocoap
The Python CoAP library
Stars: ✭ 185 (-48.32%)
Mutual labels:  coap, internet-of-things
zestdb
ZestDB
Stars: ✭ 18 (-94.97%)
Mutual labels:  coap, internet-of-things

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)
 |
 +- coap                   (CoAP stack adaptation)
 |    |
 |    +- er-coap-13        (Modified Erbium's CoAP engine from
 |                          https://web.archive.org/web/20180316172739/http://people.inf.ethz.ch/mkovatsc/erbium.php)
 |
 +- data                   (data formats serialization/deserialization)
 |
 +- 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:

  • LWM2M_BIG_ENDIAN if your target platform uses big-endian format.
  • LWM2M_LITTLE_ENDIAN if your target platform uses little-endian format.
  • LWM2M_CLIENT_MODE to enable LWM2M Client interfaces.
  • LWM2M_SERVER_MODE to enable LWM2M Server interfaces.
  • LWM2M_BOOTSTRAP_SERVER_MODE to enable LWM2M Bootstrap Server interfaces.
  • LWM2M_BOOTSTRAP to enable LWM2M Bootstrap support in a LWM2M Client.
  • LWM2M_SUPPORT_TLV to enable TLV payload support (implicit except for LWM2M 1.1 clients)
  • LWM2M_SUPPORT_JSON to enable JSON payload support (implicit when defining LWM2M_SERVER_MODE)
  • LWM2M_SUPPORT_SENML_JSON to enable SenML JSON payload support (implicit for LWM2M 1.1 or greater when defining LWM2M_SERVER_MODE or LWM2M_BOOTSTRAP_SERVER_MODE)
  • LWM2M_OLD_CONTENT_FORMAT_SUPPORT to support the deprecated content format values for TLV and JSON.
  • LWM2M_VERSION to specify which version of the LWM2M spec to support. Clients will support only that version. Servers will support that version and below. By default the latest version is supported. To specify version 1.0, for example, pass -DLWM2M_VERSION="1.0" to cmake.
  • LWM2M_RAW_BLOCK1_REQUESTS For low memory client devices where it is not possible to keep a large post or put request in memory to be parsed (typically a firmware write). This option enable each unprocessed block 1 payload to be passed to the application, typically to be stored to a flash memory.

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

  • Create a build directory and change to that.
  • cmake [wakaama directory]/examples/server
  • make
  • ./lwm2mserver [Options]

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

Options are:

  • -4 Use IPv4 connection. Default: IPv6 connection

Test client example

  • Create a build directory and change to that.
  • cmake [wakaama directory]/examples/client
  • make
  • ./lwm2mclient [Options]

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

  • git submodule init
  • git submodule update

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

Build with tinydtls:

  • Create a build directory and change to that.
  • cmake -DDTLS=1 [wakaama directory]/examples/client
  • make
  • ./lwm2mclient [Options]

The lwm2mclient features nine LWM2M objects:

  • Security Object (id: 0)

  • Server Object (id: 1)

  • Access Control Object (id: 2) as a skeleton

  • Device Object (id: 3) containing hard-coded values from the Example LWM2M Client of Appendix E of the LWM2M Technical Specification.

  • Connectivity Monitoring Object (id: 4) as a skeleton

  • Firmware Update Object (id: 5) as a skeleton.

  • Location Object (id: 6) as a skeleton.

  • Connectivity Statistics Object (id: 7) as a skeleton.

  • Test Object (id: 31024) with the following description:

                        Multiple
       Object |  ID   | Instances | Mandatory |
        Test  | 31024 |    Yes    |    No     |
    
        Resources:
                    Supported    Multiple
        Name | ID | Operations | Instances | Mandatory |  Type   | Range |
        test |  1 |    R/W     |    No     |    Yes    | Integer | 0-255 |
        exec |  2 |     E      |    No     |    Yes    |         |       |
        dec  |  3 |    R/W     |    No     |    Yes    |  Float  |       |
    

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:

  • -n NAME Set the endpoint name of the Client. Default: testlwm2mclient
  • -l PORT Set the local UDP port of the Client. Default: 56830
  • -h HOST Set the hostname of the LWM2M Server to connect to. Default: localhost
  • -p HOST Set the port of the LWM2M Server to connect to. Default: 5683
  • -4 Use IPv4 connection. Default: IPv6 connection
  • -t TIME Set the lifetime of the Client. Default: 300
  • -b Bootstrap requested.
  • -c Change battery level over time.

If DTLS feature enable:

  • -i Set the device management or bootstrap server PSK identity. If not set use none secure mode
  • -s Set the device management or bootstrap server Pre-Shared-Key. If not set use none secure mode

To launch a bootstrap session: ./lwm2mclient -b

Simpler test client example

In the any directory, run the following commands:

  • Create a build directory and change to that.
  • cmake [wakaama directory]/examples/lightclient
  • make
  • ./lightclient [Options]

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

  • Security Object (id: 0)
  • Server Object (id: 1)
  • Device Object (id: 3) containing hard-coded values from the Example LWM2M Client of Appendix E of the LWM2M Technical Specification.
  • Test Object (id: 31024) from the lwm2mclient as described above.

The lightclient does not feature any command-line interface.

Options are:

  • -n NAME Set the endpoint name of the Client. Default: testlightclient
  • -l PORT Set the local UDP port of the Client. Default: 56830
  • -4 Use IPv4 connection. Default: IPv6 connection

Bootstrap Server example

  • Create a build directory and change to that.
  • cmake [wakaama directory]/examples/bootstrap_server
  • make
  • ./bootstrap_server [Options]

Refer to examples/bootstrap_server/README for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].