1. Introduction

Attention

With release of Anjay 3.0, the library’s license terms have changed. Please make sure that you have reviewed it before updating to the new major release. Previous versions of Anjay remain with the old, Apache 2.0 license.

Anjay is a library that implements the OMA Lightweight Machine to Machine protocol, including the necessary subset of CoAP.

The project has been created and is actively maintained by AVSystem.

1.1. Protocol support status

The basis for this implementation were the following documents:

  • Lightweight Machine to Machine Technical Specification: Core, document number OMA-TS-LightweightM2M_Core-V1_1_1-20190617-A

  • Lightweight Machine to Machine Technical Specification: Transport Bindings, document number OMA-TS-LightweightM2M_Transport-V1_1_1-20190617-A.

In case of ambiguities, existing implementations were considered as a reference.

The following features are supported:

  • Bootstrap - full support

  • Client Registration - full support

  • Device Management and Service Enablement - full support

  • Information Reporting - full support

  • Data formats

    • Plain Text

    • Opaque

    • CBOR

    • TLV

    • SenML JSON

    • SenML CBOR

    • LwM2M JSON (output only)

  • Security

    • DTLS with Certificates, if supported by backend TLS library

    • DTLS with PSK, if supported by backend TLS library

    • NoSec mode

    • Support for Hardware Security Modules (available commercially)

  • Transport

The following features are not implemented:

  • RPK DTLS mode

  • LwM2M JSON (input)

1.2. Technical information

Anjay is written in standards-compliant C99. It partly relies on some POSIX library extensions, although it can be easily ported to non-POSIX platforms.

Some optional features require C11’s stdatomic.h header to be available (ANJAY_WITH_EVENT_LOOP, AVS_COMMONS_COMPAT_THREADING_WITH_ATOMIC_SPINLOCK).

Its only external dependency is the open source AVSystem Commons Library. That library in turn may additionally depend either on OpenSSL or Mbed TLS or TinyDTLS for DTLS support.

To build Anjay from source, CMake version 3.6.0 or newer is necessary.

1.3. Deprecated and experimental features

Anjay’s Doxygen documentation contains, among others, @deprecated and @experimental tags:

  • features tagged with @deprecated are no longer supported and will be deleted in the future versions,

  • features tagged with @experimental may contain changes (in the future versions) that will break their backward compatibility.