OMA TS LightweightM2M V1!0!20170208 A
OMA TS LightweightM2M V1!0!20170208 A
Use of this document is subject to all of the terms and conditions of the Use Agreement located at
http://www.openmobilealliance.org/UseAgreement.html.
Unless this document is clearly designated as an approved specification, this document is a work in process, is not an
approved Open Mobile Alliance™ specification, and is subject to revision or removal without notice.
You may use this document or any part of the document for internal or educational purposes only, provided you do not
modify, edit or take out of context the information in this document in any manner. Information contained in this document
may be used, at your sole risk, for any purposes. You may not use this document in any other manner without the prior
written permission of the Open Mobile Alliance. The Open Mobile Alliance authorizes you to copy this document, provided
that you retain all copyright and other proprietary notices contained in the original materials on any copies of the materials
and that you comply strictly with these terms. This copyright permission does not constitute an endorsement of the products
or services. The Open Mobile Alliance assumes no responsibility for errors or omissions in this document.
Each Open Mobile Alliance member has agreed to use reasonable endeavors to inform the Open Mobile Alliance in a timely
manner of Essential IPR as it becomes aware that the Essential IPR is related to the prepared or published specification.
However, the members do not have an obligation to conduct IPR searches. The declared Essential IPR is publicly available
to members and non-members of the Open Mobile Alliance and may be found on the “OMA IPR Declarations” list at
http://www.openmobilealliance.org/ipr.html. The Open Mobile Alliance has not conducted an independent IPR review of
this document and the information contained herein, and makes no representations or warranties regarding third party IPR,
including without limitation patents, copyrights or trade secret rights. This document may contain inventions for which you
must obtain licenses from third parties before making, using or selling the inventions. Defined terms above are set forth in
the schedule to the Open Mobile Alliance Application Form.
NO REPRESENTATIONS OR WARRANTIES (WHETHER EXPRESS OR IMPLIED) ARE MADE BY THE OPEN
MOBILE ALLIANCE OR ANY OPEN MOBILE ALLIANCE MEMBER OR ITS AFFILIATES REGARDING ANY OF
THE IPR‟S REPRESENTED ON THE “OMA IPR DECLARATIONS” LIST, INCLUDING, BUT NOT LIMITED TO THE
ACCURACY, COMPLETENESS, VALIDITY OR RELEVANCE OF THE INFORMATION OR WHETHER OR NOT
SUCH RIGHTS ARE ESSENTIAL OR NON-ESSENTIAL.
THE OPEN MOBILE ALLIANCE IS NOT LIABLE FOR AND HEREBY DISCLAIMS ANY DIRECT, INDIRECT,
PUNITIVE, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR EXEMPLARY DAMAGES ARISING OUT OF OR IN
CONNECTION WITH THE USE OF DOCUMENTS AND THE INFORMATION CONTAINED IN THE DOCUMENTS.
© 2017 Open Mobile Alliance All Rights Reserved.
Used with the permission of the Open Mobile Alliance under the terms set forth above.
Contents
1. SCOPE ................................................................................................................................................................................ 8
2. REFERENCES .................................................................................................................................................................. 9
2.1 NORMATIVE REFERENCES .......................................................................................................................................... 9
2.2 INFORMATIVE REFERENCES ..................................................................................................................................... 10
3. TERMINOLOGY AND CONVENTIONS .................................................................................................................... 12
3.1 CONVENTIONS ........................................................................................................................................................... 12
3.2 DEFINITIONS.............................................................................................................................................................. 12
3.3 ABBREVIATIONS ........................................................................................................................................................ 12
4. INTRODUCTION ........................................................................................................................................................... 13
4.1 VERSION 1.0 .............................................................................................................................................................. 14
5. INTERFACES.................................................................................................................................................................. 15
5.1 ATTRIBUTES .............................................................................................................................................................. 16
5.1.1 Attributes Definitions and Rules ........................................................................................................................ 16
5.1.2 Attributes Classification ..................................................................................................................................... 17
5.2 BOOTSTRAP INTERFACE ........................................................................................................................................... 19
5.2.1 LwM2M Bootstrap-Server ................................................................................................................................. 20
5.2.2 Bootstrap Information ........................................................................................................................................ 20
5.2.3 Bootstrap Modes ................................................................................................................................................ 20
5.2.4 Bootstrap Sequence ............................................................................................................................................ 23
5.2.5 Bootstrap Security.............................................................................................................................................. 24
5.2.6 Bootstrap and Configuration Consistency.......................................................................................................... 24
5.2.7 Bootstrap Commands ......................................................................................................................................... 24
5.3 CLIENT REGISTRATION INTERFACE......................................................................................................................... 26
5.3.1 Register .............................................................................................................................................................. 27
5.3.2 Update ................................................................................................................................................................ 30
5.3.3 De-register ......................................................................................................................................................... 32
5.4 DEVICE MANAGEMENT & SERVICE ENABLEMENT INTERFACE.............................................................................. 32
5.4.1 Read ................................................................................................................................................................... 34
5.4.2 Discover ............................................................................................................................................................. 34
5.4.3 Write .................................................................................................................................................................. 35
5.4.4 Write-Attributes ................................................................................................................................................. 35
5.4.5 Execute............................................................................................................................................................... 36
5.4.6 Create ................................................................................................................................................................. 37
5.4.7 Delete ................................................................................................................................................................. 37
5.5 INFORMATION REPORTING INTERFACE ................................................................................................................... 37
5.5.1 Observe .............................................................................................................................................................. 38
5.5.2 Notify ................................................................................................................................................................. 39
5.5.3 Cancel Observation ............................................................................................................................................ 40
6. IDENTIFIERS AND RESOURCES............................................................................................................................... 41
6.1 RESOURCE MODEL ................................................................................................................................................... 41
6.2 OBJECT VERSIONING ................................................................................................................................................ 42
6.2.1 General Policy.................................................................................................................................................... 42
6.2.2 Object Version format ........................................................................................................................................ 43
6.2.3 Object Definition and Object Version Usage ..................................................................................................... 43
6.3 IDENTIFIERS .............................................................................................................................................................. 44
6.3.1 Endpoint Client Name ........................................................................................................................................ 45
6.3.2 Reusable Resources ........................................................................................................................................... 46
6.4 DATA FORMATS FOR TRANSFERRING RESOURCE INFORMATION........................................................................... 46
6.4.1 Plain Text ........................................................................................................................................................... 47
6.4.2 Opaque ............................................................................................................................................................... 47
6.4.3 TLV.................................................................................................................................................................... 47
6.4.4 JSON .................................................................................................................................................................. 55
7. SECURITY ....................................................................................................................................................................... 58
7.1 DTLS-BASED SECURITY ........................................................................................................................................... 58
7.1.1 Requirements ..................................................................................................................................................... 58
7.1.2 DTLS Overview ................................................................................................................................................. 58
7.1.3 Ciphersuites ....................................................................................................................................................... 59
7.1.4 Bootstrapping ..................................................................................................................................................... 59
7.1.5 Endpoint Client Name ........................................................................................................................................ 60
7.1.6 LwM2M and DTLS Roles ................................................................................................................................. 60
7.1.7 Pre-Shared Keys................................................................................................................................................. 60
7.1.8 Raw Public Keys ................................................................................................................................................ 61
7.1.9 X.509 Certificates .............................................................................................................................................. 61
7.1.10 “NoSec” mode ................................................................................................................................................... 62
7.1.11 Certificate mode with EST ................................................................................................................................. 62
7.2 SMS CHANNEL SECURITY ........................................................................................................................................ 63
7.2.1 SMS “NoSec” mode .......................................................................................................................................... 63
7.2.2 SMS Secured mode ............................................................................................................................................ 64
7.3 ACCESS CONTROL ..................................................................................................................................................... 67
7.3.1 Access Control Object ....................................................................................................................................... 67
7.3.2 Authorization ..................................................................................................................................................... 70
8. TRANSPORT LAYER BINDING AND ENCODINGS ............................................................................................... 73
8.1 REQUIRED FEATURES ............................................................................................................................................... 73
8.2 URI IDENTIFIER & OPERATION MAPPING............................................................................................................... 73
8.2.1 Firewall/NAT ..................................................................................................................................................... 74
8.2.2 Alternate Path .................................................................................................................................................... 74
8.2.3 Bootstrap Interface ............................................................................................................................................. 74
8.2.4 Registration Interface ......................................................................................................................................... 76
8.2.5 Device Management & Service Enablement Interface ...................................................................................... 77
8.2.6 Information Reporting Interface ........................................................................................................................ 80
8.3 QUEUE MODE OPERATION ....................................................................................................................................... 81
8.4 UPDATE TRIGGER MECHANISM ............................................................................................................................... 84
8.5 RESPONSE CODES...................................................................................................................................................... 85
8.6 TRANSPORT BINDINGS .............................................................................................................................................. 87
8.6.1 UDP Binding...................................................................................................................................................... 88
8.6.2 SMS Binding...................................................................................................................................................... 88
APPENDIX A. CHANGE HISTORY (INFORMATIVE) .............................................................................................. 89
A.1 APPROVED VERSION HISTORY ................................................................................................................................. 89
APPENDIX B. STATIC CONFORMANCE REQUIREMENTS (NORMATIVE) ..................................................... 90
B.1 SCR FOR LWM2M CLIENT ...................................................................................................................................... 90
B.1.1 Bootstrap Interface ............................................................................................................................................. 90
B.1.2 Client Registration ............................................................................................................................................. 91
B.1.3 Device Management and Service Enablement Interface .................................................................................... 91
B.1.4 Information Reporting ....................................................................................................................................... 92
B.1.5 Data Format ....................................................................................................................................................... 92
B.1.6 Security .............................................................................................................................................................. 92
B.1.7 Mechanism ......................................................................................................................................................... 93
B.1.8 Objects ............................................................................................................................................................... 93
B.2 SCR FOR LWM2M SERVER...................................................................................................................................... 93
B.2.1 Bootstrap Interface ............................................................................................................................................. 93
B.2.2 Client Registration ............................................................................................................................................. 93
B.2.3 Device Management and Service Enablement Interface .................................................................................... 94
B.2.4 Information Reporting ....................................................................................................................................... 94
B.2.5 Data Format ....................................................................................................................................................... 95
B.2.6 Security .............................................................................................................................................................. 95
B.2.7 Mechanism ......................................................................................................................................................... 95
B.2.8 Objects ............................................................................................................................................................... 95
Figures
Figure 1: The overall architecture of the LwM2M Enabler. ............................................................................................... 13
Figure 2: The protocol stack of the LwM2M Enabler. ......................................................................................................... 14
Figure 3: Bootstrap .................................................................................................................................................................. 15
Figure 4: Client Registration .................................................................................................................................................. 15
Figure 5: Device Management and Service Enablement ...................................................................................................... 16
Figure 6: Information Reporting ............................................................................................................................................ 16
Tables
Table 1: Relationship of operations and interfaces ............................................................................................................... 16
Table 2: Attribute Characteristics ......................................................................................................................................... 17
Table 3: <PROPERTIES> Class Attributes .......................................................................................................................... 18
Table 4: <NOTIFICATION> class Attributes ...................................................................................................................... 19
Table 5: Bootstrap Information List ...................................................................................................................................... 20
Table 6: Bootstrap Discover parameters ............................................................................................................................... 25
1. Scope
This document specifies version 1.0 of the Lightweight Machine-to-Machine (LwM2M) protocol. This Lightweight M2M 1.0
enabler introduces the following features:
Simple resource model with the core set of objects and resources defined in this specification. The full list of
registered objects can be found at [OMNA].
Operations for creation, update, deletion, and retrieval of resources.
Asynchronous notifications of resource changes.
Support for several serialization formats, namely TLV, JSON, Plain Text and binary data formats and the core set of
LightweightM2M Objects.
UDP and SMS transport support.
Communication security based on the DTLS protocol supporting different types of credentials.
Queue Mode offers functionality for a LwM2M Client to inform the LwM2M Server that it may be disconnected for
an extended period and when it becomes reachable again.
Support for use of multiple LwM2M Servers.
Provisioning of security credentials and access control lists by a dedicated LwM2M bootstrap-server.
2. References
2.1 Normative References
[3GPP-TS_23.003] 3GPP TS 23.003 “Numbering, addressing and identification”
[CoAP] Shelby, Z., Hartke, K., Bormann, C., and B. Frank, “The Constrained Application Protocol (CoAP)”
IETF RFC 7252 – June 2014
[CoAP-EST] S. Kumar, P. van der Stok, “EST based on DTLS secured CoAP (EST-coaps)”, draft-vanderstok-core-
coap-est-00, October, 2016
[ETSI TS 102.221] “Smart Cards; UICC-Terminal interface; Physical and logical characteristics”, (ETSI TS 102 221 release
11), URL:http://www.etsi.org/
[ETSI TS 102.223] “Smart Cards; Card Applications Toolkit (CAT) (Release 11)”
URL:http://www.etsi.org/
[ETSI TS 102.225] ETSI TS 102 225 (V11.0.0): “Smart Cards; Secured packet structure for UICC based applications
(Release 11)” URL:http://www.etsi.org/
[FLOAT] IEEE Computer Society (August 29, 2008). IEEE Standard for Floating-Point Arithmetic. IEEE.
doi:10.1109/IEEESTD.2008.4610935. ISBN 978-0-7381-5753-5. IEEE Std 754-2008
[GP SCP03] GlobalPlatform Secure Channel Protocol 03 (SCP 03) Amendment D v1.1 Sept 2009
[IEEE 754-2008] IEEE Computer Society (August 29, 2008). IEEE Standard for Floating-Point Arithmetic. IEEE.
doi:10.1109/IEEESTD.2008.4610935. ISBN 978-0-7381-5753-5. IEEE Std 754-2008
[IOPPROC] “OMA Interoperability Policy and Process”, Version 1.13, Open Mobile Alliance™, OMA-IOP-Process-
V1_13, URL:http://www.openmobilealliance.org/
[PKCS#15] “PKCS #15 v1.1: Cryptographic Token Information Syntax Standard”, RSA Laboratories, June 6, 2000.
URL:ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-15/pkcs-15v1_1.pdf
[RFC2119] “Key words for use in RFCs to Indicate Requirement Levels”, S. Bradner, March 1997,
URL:http://www.ietf.org/rfc/rfc2119.txt
[RFC2234] “Augmented BNF for Syntax Specifications: ABNF”. D. Crocker, Ed., P. Overell. November 1997,
URL:http://www.ietf.org/rfc/rfc2234.txt
[RFC4122] “A Universally Unique Identifier (UUID) URN Namespace”, P. Leach, et al. July 2005,
URL:http://www.ietf.org/rfc/rfc4122.txt
[RFC5280] D. Cooper, et al., “Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List
(CRL) Profile”, RFC 5280, May 2008.
[RFC5289] TLS Elliptic Curve Cipher Suites with SHA-256/384 and AES Galois Counter Mode (GCM)
[RFC5487] Pre-Shared Key Cipher Suites for TLS with SHA-256/384 and AES Galois Counter Mode
[RFC6347] Rescorla, E. and N. Modadugu, “Datagram Transport Layer Security Version 1.2”, RFC 6347, January
2012.
[RFC6655] McGrew, D. and D. Bailey, “AES-CCM Cipher Suites for TLS”, RFC6655, July 2012.
[RFC6690] Shelby, Z. “Constrained RESTful Environments (CoRE) Link Format”, RFC6690, Aug 2012.
[RFC7292] K. Moriarty, et al., “PKCS #12: Personal Information Exchange Syntax v1.1”, RFC 7292, July 2014.
[SENML] C. Jennings, Z. Shelby, J. Arkko, “Media Types for Sensor Markup Language (SENML)”, draft-jennings-
senml-10 (work in progress), April 2013.
[TR-069] Broadband Forum: “TR-069 CPE WAN Management Protocol” Issue: 1 Amendment 5.
URL:http://www.broadband-forum.org/technical/download/TR-069_Amendment-5.pdf
[WAP-WDP] Wireless Application Protocol Forum, “Wireless Datagram Protocol”, June 2001.
[3GPP2 C.S0078-0] 3GPP2 C.S0078-0 (V1.0): “Secured packet structure for CDMA Card Application Toolkit (CCAT)
applications”
[3GPP2 C.S0079-0] 3GPP2 C.S0079-0 (V1.0) “Remote APDU Structure for CDMA Card Application Toolkit (CCAT)
applications”
[DYNAMIC LINK] “Dynamic Resource Linking for Constrained RESTful Environments”, Z.Shelby, Z.Vial, M.Koster,
C.Groves, Oct 2016, draft-ietf-core-dynlink-01
[ETSI TS 102 226] ETSI TS 102 226 (V11.0.0): “Smart cards; Remote APDU structure for UICC based applications (Release
11)”
[ISO/IEC18031:2011] ISO, “ISO/IEC 18031:2011: Information technology -- Security techniques -- Random bit generation”,
November 2011, available at http://www.iso.org/iso/catalogue_detail.htm?csnumber=54945
[RESOURCE “CoRE Resource Directory”, Z.Shelby, M.Koster, C.Bormann, P.Van Der Stok Oct 2016, draft-ietf-core-
DIRECTORY] resource-directory-09
[RFC3986] T. Berners-Lee, R. Fielding, L. Masinter, “Uniform Resource Identifier (URI): Generic Syntax”, RFC
3986, January 2005.
[RFC4086] D. Eastlake, J. Schiller, S. Crocker, “Randomness Requirements for Security”, RFC 4086, June 2005.
[RFC6698] P. Hoffman, J. Schlyter, “The DNS-Based Authentication of Named Entities (DANE) Transport Layer
Security (TLS) Protocol: TLSA”, RFC 6698, August 2012.
[RFC7459] “Representation of Uncertainty and Confidence in the Presence Information Data Format Location Object
(PIDF-LO)”, M. Thomson, J. Winterbootom, February 2015. URL:https://tools.ietf.org/html/rfc7459
[SMS-DTLS] “Transport Layer Security (TLS) / Datagram Transport Layer Security (DTLS) Profiles for the Internet of
Things”, H. Tschofenig, T. Fossati, July 2016, URL:http://www.ietf.org/rfc/rfc7925.txt
[SP800-90A] Elaine Barker, John Kelsey, “Recommendation for Random Number Generation Using Deterministic
Random Bit Generators, NIST Special Publication 800-90A”, Revision 1, June 2015, available at
http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf
3.2 Definitions
LwM2M Bootstrap-Server LwM2M Security Object Instance with Bootstrap-Server Resource true
Account
LwM2M Server Account LwM2M Security Object Instance with Bootstrap-Server Resource false and associated LwM2M Server
Object Instance
3.3 Abbreviations
4. Introduction
This enabler defines the application layer communication protocol between a LwM2M Server and a LwM2M Client, which is
located in a LwM2M Device. The OMA Lightweight M2M enabler includes device management and service enablement for
LwM2M Devices. The target LwM2M Devices for this enabler are mainly resource constrained devices. Therefore, this
enabler makes use of a light and compact protocol as well as an efficient resource data model.
A Client-Server architecture is introduced for the LwM2M Enabler, where the LwM2M Device acts as a LwM2M Client and
the M2M service, platform or application acts as the LwM2M Server. The LwM2M Enabler has two components, LwM2M
Server and LwM2M Client. Four interfaces are designed between these two components as shown below:
Bootstrap
Client Registration
Device management and service enablement
Information Reporting
This architecture is shown in Figure 1. The LwM2M Enabler uses the Constrained Application Protocol (CoAP) with UDP
and/or SMS bindings. Datagram Transport Layer Security (DTLS) provides security for UDP transport layer. The LwM2M
Enabler protocol stack is shown in Figure 2.
LwM2M Server
Interfaces Stack
LwM2M Client
Objects
M2M Device
Figure 1: The overall architecture of the LwM2M Enabler
LwM2M
Objects
CoAP
DTLS
SMS
SMS on-
UDP on- Smartcard
device
5. Interfaces
According to the architecture diagram [LwM2M-AD], there are four interfaces: 1) Bootstrap, 2) Client Registration, 3)
Device Management and Service Enablement, and 4) Information Reporting. The operations for the four interfaces can be
classified as uplink operations and downlink operations. The operations of each interface are defined in this section, and then
mapped to protocol mechanisms in Section 8 Transport Layer Bindings and Encodings.
Figure 3 shows the operation model for interface “Bootstrap”. For this interface, the operations are an uplink operation
named “Bootstrap-Request” and downlink operations named “Discover”, “Write”, “Delete” and “Bootstrap-Finish”. These
operations are used to initialize the needed Object(s) for the LwM2M Client to register with one or more LwM2M Servers.
With the “Write” operation on this interface, the LwM2M Client MUST write the value included in the payload regardless of
an existence of the targeting Object Instance(s) or Resource(s) and access rights. In the mode where the Server is addressing
the Bootstrap Information to the LwM2M Client, the Server MUST inform the LwM2M Client when this transfer is over by
sending a “Bootstrap-Finish” command.
Bootstrapping is also defined using Factory Bootstrap (e.g., storage in Flash) or Bootstrap from Smartcard (storage in a
Smartcard).
Figure 3: Bootstrap
Figure 4 shows the operation model for the interface “Client Registration”. For this interface, the operations are uplink
operations named “Registration”, “Update” and “De-register”.
Figure 5 shows the logical operation model for interface “Device Management and Service Enablement”. For this interface,
the operations are downlink operations named “Read”, “Create”, “Delete”, “Write”, “Execute”, “Write-Attributes”, and
“Discover”. These operations are used to interact with the Resources, Resource Instances, Objects, Object Instances and/or
their attributes exposed by the LwM2M Client. The “Read” operation is used to read the current values; the “Discover”
operation is used to discover attributes and to discover which Resources are implemented in a certain Object; the “Write”
operation is used to update the values; the “Write-Attributes” operation is used to change attribute values and the “Execute”
operation is used to initiate an action. The “Create” and “Delete” operations are used to create or delete Instances.
Figure 6 shows the operation model for interface “Information Reporting”. For this interface, the operations are downlink
operations “Observe” or “Cancel Observation” and an uplink operation “Notify”. This interface is used to send the LwM2M
Server a new value related to a Resource on the LwM2M Client.
The relationship between operations and interfaces is listed in the following Table 1.
Interface Direction Operation
Device Management and Service Downlink Create, Read, Write, Delete, Execute,
Enablement Write-Attributes, Discover
5.1 Attributes
5.1.1 Attributes Definitions and Rules
Attributes are metadata which can be attached to an Object, an Object Instance or a Resource. The value of an Attribute is
LwM2M Server specific. These attributes can fulfil various roles: from just carrying information (e.g., Discover), up to
containing parameters for Notification for example.
Attributes attached to Object, Object Instance, Resource, are respectively named O-Attribute, OI-Attribute, R-Attribute.
These Attributes MAY be carried in the message payload of Registration and Discover operations; they also MAY be
updated - when writable - through the “Write-Attributes” operation.
Regardless to the LwM2M entity a given Attribute is attached to, the value of such an Attribute can be set at various levels:
Object, Object Instance, Resource levels. Additionally, precedence rules apply when the same Attribute receives a value at
different levels.
Several rules govern usage of LwM2M Attributes
Attribute Description
characteristics
Name Attribute Name used to reference a specific Attribute in that Enabler (e.g., “Minimum Period”)
CoRE Link Param the string used when this Attribute is transferred to CoAP as a CoRE link parameter (ex pmin)
Assignation Level The Level (Object, Object Instance, Resource) where the value of the Attribute MAY be set.
Value The Value carried by this Attribute : its data type must be of “Value Type”
Some Attributes MAY be exposed to the LwM2M Server in the payload response to a “Discover” command (Section 5.4.2).
The value of some Attributes MAY be changed by the LwM2M Server in using the “Write-Attributes” command (Section
5.4.4); which Attribute are concerned are marked as “W” (writable) in the table of the next Section.
Note: A payload response to a “Discover” command is a list of application/link-format CoRE Links [RFC6690] which will
include the LwM2M Attributes.
The role of these Attributes is to provide metadata which may communicate helpful information to LwM2M Server for
example easing data management.
Except when specifically mentioned as required, the LwM2M Server and LwM2M Client SHOULD support
<PROPERTIES> Class Attributes listed Table 3.
Attribute
CoRE Attachment Assignation Support Access Value Default Applicabili Notes
Name Link Level Required Mode Type Value ty
param
The role of these R-Attributes is to provide parameters to the “Notify” operation; any readable Resource can have such R-
attributes.
In the message sent by a LwM2M Client in response to an “Observe” operation, the current Resource value is reported; this
event can be considered as the initial notification.
Each time a Resource notification is sent, the “Minimum Period” and “Maximum Period” timers associated to this Resource
are restarted.
The notification of a Resource value will be sent when the combination of a change value condition (“Greater Than”, “Less
Than”, “Step”) and the “Minimum Period” timing conditions are both fulfilled for that Resource.
The LwM2M Server MUST support and LwM2M Client SHOULD support all the <NOTIFICATION> Class Attributes
listed Table 4.
Attribute CoRE Attachment Assignation Level Required Access Value Default Apply
Name Link Mode Type Value Condition
param
Minimum pmin Resource Resource No RW Integer 0 (sec) Readable
Period Object Instance Resource
Object
Notes: The Minimum Period Attribute indicates the minimum time in seconds the LwM2M Client MUST wait between
two notifications. If a Resource value has to be notified during the specified quiet period, the notification MUST be sent
as soon as this period expires. In the absence of this parameter, the Minimum Period is defined by the Default Minimum
Period set in the LwM2M Server Account.
Maximum pmax Resource Resource No RW Integer - Readable
Period Object Instance Resource
Object
Notes: The Maximum Period Attribute indicates the maximum time in seconds the LwM2M Client MAY wait between
two notifications. When this “Maximum Period” expires after the last notification, a new notification MUST be sent. In
the absence of this parameter, the “Maximum Period” is defined by the Default Maximum Period set in the LwM2M
Server Account. The maximum period parameter MUST be not smaller than the minimum period parameter.
Greater gt Resource Resource No RW Float - Numerical
Than &Readable
Resource
Notes: This “Greater Than” Attribute defines a threshold high value. When this Attributes is present, the LwM2M Client
MUST notify the Server each time the Observed Resource value crosses the “Greater Than” Attribute value with respect
to pmin parameter.
Less Than lt Resource Resource No RW Float - Numerical
&Readable
Resource
Notes: This “Less Than” Attribute defines a threshold low value. When this Attributes is present, the LwM2M Client
MUST notify the Server each time the Observed Resource value crosses the “Less Than” Attribute value with respect to
pmin parameter.
Step st Resource Resource No RW Float - Numerical
&Readable
Resource
Notes: This “Step” Attribute defines a minimum change value between two notifications. When this Attribute is present,
the change value condition will occur when the value variation since the last notification of the Observed Resource, is
greater or equal to the “Step” Attribute value.
When the “Step” change value condition occurs, the LwM2M Client MUST notify the Server with respect to “Period
Minimum” rule.
Note: the following rules MUST be respected (“lt” value + 2*“st” values <“gt” value)
Table 4: <NOTIFICATION> class Attributes
Examples illustrating Attributes setting are provided in Section 8.2.5 (Device Management & Service Enablement Interface).
*the LwM2M Client MUST have at least one LwM2M Server Account after completion of Bootstrap Sequence specified in
5.2.4.
Please note that the LwM2M Client MUST accept Bootstrap Information sent via Bootstrap Interface without applying
access control as specified in Section 7.3.2 Authorization.
LwM2M LwM2M
Client Bootstrap
-Server
Bootstrap-Request for endpoint name
Bootstrap Information
Transfer finished
Server; otherwise a “4.06 Not Acceptable” Response code MUST be returned, and the previous Bootstrap-Server Account is
still the only one active.
Note: If the original LwM2M Bootstrap-Server Account is purged from the device, and a new LwM2M Bootstrap-Server
Account has NOT been created, further adding or removing of LwM2M Server Accounts will no longer be possible.
Furthermore, updating security credentials e.g., X.509 certificates will also no longer be possible.
5.2.3.4 Server Initiated Bootstrap
In this mode, the LwM2M Bootstrap-Server configures the Bootstrap Information in the LwM2M Client without the
LwM2M Client sending a Bootstrap-Request to the LwM2M Bootstrap-Server.
As the LwM2M Client does not initiate the “Bootstrap-Request” operation to the LwM2M Bootstrap-Server, the LwM2M
Bootstrap-Server needs to know if a LwM2M Device is ready for bootstrapping before the LwM2M Client can be configured
by the LwM2M Bootstrap-Server. The mechanism that a LwM2M Bootstrap-Server gains this knowledge is implementation
specific. A common scenario is that elements in the Network Provider‟s network informs the LwM2M Bootstrap-Server of
the LwM2M Device when the LwM2M Device connects to the Network Provider‟s network.
The Server Initiated Bootstrap mode requires a LwM2M Bootstrap-Server Account preloaded in the LwM2M Client. The
minimum information that needs to be preloaded, is the security credentials required for a secure DTLS connection to the
LwM2M Bootstrap-Server.
Once the LwM2M Bootstrap-Server has been notified that the LwM2M Device is ready to receive the Bootstrap Information,
the LwM2M Bootstrap-Server configures the LwM2M Client with the Bootstrap Information by strictly replicating the
procedures of the step#1 step#2 and step#3 specified in the LwM2M Client Initiated Bootstrap mode.
The figure below depicts the Server Initiated Bootstrap flow.
LwM2M LwM2M
Client Bootstrap -
Server
4. If LwM2M Client fails to register to all the LwM2M Servers or the Client doesn‟t have any LwM2M Server Object
Instances, and the LwM2M Client hasn‟t received a Server Initiated Bootstrap within the ClientHoldOffTime, the
LwM2M Client performs the Client Initiated Bootstrap.
5. A Server Initiated Bootstrap attempt (e.g., for updating an LwM2M Server Account) remains possible, but only if
the LwM2M Client retains the corresponding LwM2M Bootstrap-Server Account.
5.2.7.2 BOOTSTRAP-FINISH
The Bootstrap-Finish operation is only performed to terminate the Bootstrap Sequence previously initiated either in “Client
Initiated Bootstrap” mode or in “Server Initiated Bootstrap” mode.
This command informs the LwM2M Client, that all the Bootstrap Information have been provided by the LwM2M Bootstrap-
Server.
The Bootstrap-Finish operation has the following parameter:
Parameter Required Default Value Notes
/bs Yes - -
For example:
when the “Discover” operation targets an Object with Object ID of 0 (Security Object), the response to the operation
could be:
lwm2m="1.0",</0/0>;ssid=101, </0/1/>, </0/2>;ssid=102 with the meaning 3 LwM2M Servers are supported in that
Client (that supports the LwM2M Enabler in version 1.0), while the Instance ID:1 of the Security Object ID:0
contains the credentials for the LwM2M Bootstrap-Server.
when the “Discover” operation targets an Object with „/‟ the response to the operation could be
lwm2m="1.0",</0/0>;ssid=101,</0/1>, </1/0/>;ssid=101, </3/0>,</5>,</4> with the meaning the Client is
supporting (in LwM2M version 1.0) a Bootstrap-Server Account (/0/1), a Server Account (/0/0, /1/0) with a Short
Server ID=101, A Device Object Instance (/3/0) and 2 other Objects which are not instantiated yet (Firmware
Update /5, and Connectivity Monitory Object /4).
When the “Discover” addresses a LwM2M Client supporting the LwM2M Enabler in release 2.0, and containing a
configuration with an hypothetical LwM2M Object ID:55 in Version 1.9, with one Instance (/55/0)
lwm2m="2.0",</0/0>,</0/1>;ssid=101, </1/0/>;ssid=101, </3/0>,</5>,</4>,</55>;ver=1.9, </55/0>
5.2.7.4 BOOTSTRAP WRITE
The “Write” operation in Bootstrap Interface is different from the “Write” Operation in Device Management and Service
Enablement interface; the LwM2M Client MUST write the value included in the payload regardless of an existence of the
targeted Object Instance(s) or Resource(s).
When the “Write” operation targets an Object or an Object Instance, the LwM2M Client MUST ignore optional resources it
does not support in the payload. If the LwM2M Client supports optional resources not present in the payload, it MUST NOT
instantiate these optional resources.
The Write operation can be sent multiple times.
Only in Bootstrap Interface, the “Write” MAY target just an Object ID, which will allow a Bootstrap-Server in using a TLV
or JSON formatted payload, to populate a LwM2M Client in a single message containing several Instances of the same
Object.
The Bootstrap “Write” operation has the following parameters:
1
The mapping to CoAP Methods of the LwM2M Client Registration Interface operations specified in this section, is detailed in chapter 8
of the present document (Transport Layer Binding and Encodings).
During “Register” or “Update” Operations, the parameter Lifetime – if present – MUST match the current value of the
Mandatory Lifetime Resource of the LwM2M Server Object Instance.
Finally, when shutting down or discontinuing use of a LwM2M Server, the LwM2M Client performs a “De-register”
operation.
The Binding Resource of the LwM2M Server Object informs the LwM2M Client of the transport protocol preferences of the
LwM2M Server for the communication session between the LwM2M Client and LwM2M Server. The LwM2M Client
SHOULD perform the operations with the modes indicated by the Binding Resource of the LwM2M Server Object Instance.
LwM2M LwM2M
Client Server
Register ep=node1
</1/1>, </2/1>, </3/0>
2.01 Created
Update
2.04 Changed
De-register
2.02 Deleted
5.3.1 Register
Registration is performed when a LwM2M Client sends a “Register” operation to the LwM2M Server. After the LwM2M
Device is turned on and the bootstrap procedure has been completed, the LwM2M Client MUST perform a “Register”
operation to each LwM2M Server that the LwM2M Client has a Server Object Instance. Table 7 describes the parameters
used for the “Register” operation.
The “Register” operation includes the Endpoint Client Name parameter along with other parameters listed in Table 7. The
“Register” operation MUST include a value for the Endpoint Client Name parameter that is unique on that LwM2M Server.
Upon receiving a “Register” operation from the LwM2M Client, the LwM2M Server records the connection information of
the registration message (e.g., source IP address and port or MSISDN) and uses this information for all future interactions
with that LwM2M Client.
If the LwM2M Client sends a “Register” operation to the LwM2M Server even though the LwM2M Server has registration
information of the LwM2M Client, the LwM2M Server removes the existing registration information and performs the new
“Register” operation. This situation happens when the LwM2M Client forgets the state of the LwM2M Server (e.g., factory
reset).
The LwM2M Server MUST support all the parameters listed at Table 7 and the LwM2M Client MUST support Endpoint
Client Name, LwM2M Version, Lifetime, and Object and Object Instances and MAY support Binding Mode and SMS
Number.
Parameter Required Default Value Notes
A LwM2M Server MUST refuse a Client‟s Registration request, if it doesn‟t support the LwM2M Enabler version indicated
by the Client (i.e. major digit of the LwM2M versions in Client and Server are different, or the LwM2M version supported by
the Client – e.g., 1.1 - is superior to the LwM2M version supported by the Server – e.g., 1.0 -).
The list of Objects and Object Instances is included in the payload of the registration message. Except the Security Object
(ID:0), all the mandatory Objects defined in the LwM2M Enabler (i.e. Server Object ID:1 and the Device Object ID:3)
MUST be part of the registration payload list. The Security Object ID:0 MUST NOT be part of the Registration Objects and
Object Instances list.
When an Object defined outside of a LwM2M Enabler has to-be-registered by the Client, but is not supported by the Server
(unknown Object or unsupported Object version) it MUST be silently ignored by this Server and will not prevent the Client‟s
Registration request to be accepted.
The payload Media-Type of that registration message MUST be the Core Link Format (application/link-format) defined in
[RFC6690], so that each Object is described as a Link according to that format. The Target component of the link is required,
and consists of the Object path augmented of the Object Version Core link parameters “ver” if required as it is defined in
section 6.2 of this document. Any other parameters included in the link MUST be silently ignored, unless specified for use by
the LwM2M Enabler.
The payload for a LwM2M Client supporting LwM2M Server, Access Control, Device, Connectivity Monitoring and
Firmware Update Objects from Appendix E would simply be:
</1>, </2>, </3>, </4>, </5>
If Objects Instances are already available on the LwM2M Client at the time of registration, then the format would be (for the
example client of Appendix F):
</1/0>,</1/1>,</2/0>,</2/1>,</2/2>,</2/3>,</2/4>,</3/0>,</4/0>,</5>
If the LwM2M Client supports the JSON data format for all the Objects it SHOULD inform the LwM2M Server by including
the content type in the root path link using the ct= link attribute. An example is as follows (note that the content type value
11543 is the value assigned in the CoAP Content-Format Registry for the LwM2M JSON format).
</>;ct=11543, </1/0>,</1/1>,</2/0>,</2/1>,</2/2>,</2/3>,</2/4>,</3/0>,</4/0>,</5>
5.3.2 Update
Periodically or based on certain events within the LwM2M Client or initiated by the LwM2M Server, the LwM2M Client
updates its registration information with a LwM2M Server by sending an “Update” operation to the LwM2M Server.
The “Update” operation can be initiated by the LwM2M Server via an “Execute” operation on the “Registration Update
Trigger” Resource of the LwM2M Server Object. The LwM2M Client can perform an “Update” operation to refresh the
lifetime of its registration to a LwM2M Server.
When any of the parameters listed in Table 9 changes, the LwM2M Client MUST send an “Update” operation to the
LwM2M Server. This “Update” operation MUST contain only the parameters listed in Table 9 which have changed
compared to the last registration parameters sent to the LwM2M Server.
Parameter Required
Lifetime No
Binding Mode No
SMS Number No
Objects and Object Instances No
The Objects and Object Instance list MUST contain all the supported Objects and Object Instances available on the LwM2M
Client. The Security Object ID:0 MUST NOT be part of Update Objects and Object Instances list.
When an Object defined outside of a LwM2M Enabler is part of the Client update registration list, but is not supported by the
Server (unknown Object or unsupported Object version), it MUST be silently ignored by this Server and will not prevent the
Client‟s Registration request to be accepted.
Two common operations are:
1) Extending the lifetime of a registration
In this case the Client sends a Registration Update with no parameters.
Figure 10 shows an example exchange where the Client sends a Registration Update message that only refreshes the
registration, i.e., the message does not contain any parameters. With the second Registration Update the Client changes the
lifetime field to 6000 (seconds) and hence the lt parameter is included in the message.
LwM2M LwM2M
Client Server
Register ep=node1
</1/1>, </2/1>, </3/0>
2.01 Created
Update
2.04 Changed
2.04 Changed
LwM2M
LwM2M LwM2M
LwM2M
Client
Client Server
Server
Register ep=node1
</1/1>,</3/0>,</12/0>,</12/1>
2.01 Created
Create /12
Update
</1/1>,</3/0>,</12/0>,</12/1>,</12/2>,
2.04 Changed
Deleted /12/1
2.02 Deleted
Update
</1/1>,</3/0>,</12/0>,</12/1>,
2.04 Changed
5.3.3 De-register
When a LwM2M Client determines that it no longer requires to be available to a LwM2M Server (e.g., LwM2M Device
factory reset), the LwM2M Client SHOULD send a “De-register” operation to the LwM2M Server. Upon receiving this
message, the LwM2M Server removes the registration information from the LwM2M Server.
2
The mapping to CoAP Methods of the LwM2M Client Registration Interface operations specified in this section, is detailed in chapter 8
of the present document (Transport Layer Binding and Encodings).
The LwM2M Server SHOULD NOT perform any operation on this interface before replying to the registration of this
LwM2M Client.
LWM2M LWM2M
Client Server
Read /3/0/0
Success
Open Mobile Alliance
Write /3/0/1
Lightweight M2M Client
Success
Execute /3/0/4
Success
LWM2M LWM2M
Client Server
Create /2
Create /2
Delete /2/3
Success
Figure 12: Example flows of Device Management & Service Enablement Interface
5.4.1 Read
The “Read” operation is used to access the value of a Resource, an array of Resource Instances, an Object Instance or all the
Object Instances of an Object. The “Read” operation has the following parameters:
Parameter Required Default Value Notes
Object ID Yes - Indicates the Object.
Object Instance ID No - Indicates the Object Instance to read.
If no Object Instance ID is indicated, then the Object
Instances of the Object, which the Server is authorized
to, are returned.
Resource ID No - Indicates the Resource to read. If no Resource ID is
indicated, then the whole Object Instance is returned.
Table 10: Read parameters
5.4.2 Discover
The “Discover” operation is used to discover LwM2M Attributes attached to an Object, Object Instances, and Resources.
This operation can be used to discover which Resources are instantiated in a given Object Instance. The returned payload is a
list of application/link-format CoRE Links [RFC6690] for each targeted Object, Object Instance, or Resource, along with
their attached Attributes including the Object Version attribute if required (see section 6.2 “Object Versioning” and Table 3
of this document <PROPERTIES> Class Attributes).
The “Discover” operation has the following parameters:
Parameter Required Default Value Notes
Object ID Yes - Indicates the Object.
Object Instance ID No - Indicates the Object Instance.
Resource ID No - Indicates the Resource.
Table 11: Discover parameters
If Object ID is only specified, the LwM2M Client MUST respond to the “Discover” operation with the list of Object
Instances and the list of their respective instantiated Resources. In addition, the list of Attributes which have be assigned to
this Object level (see section 5.1.2 Attribute Classification) are also returned.
For example:
when the “Discover” operation targets an Object with Object ID of 3, the response to the operation could be:
</3>;pmin=10, </3/0/1>, <3/0/2>, </3/0/3>, </3/0/4>, <3/0/6>,<3/0/7>,<3/0/8>,<3/0/11>,<3/0/16>
which means that the LwM2M Client supports the Device Info Object (Instance 0) Resources with IDs 1,2,3,4
6,7,8,11, and 16 among the Resources of Device Info Object, with an R-Attributes assigned to the Object level.
when the “Discover” operation targets an Object ID and Object Instance ID only, the list of Attributes assigned to
that Object Instance MUST be reported, and the list of instantiated Resources and their attached Attribute MUST be
returned in the response as well. For example: if Object ID is 3 and Object Instance ID is 0, then
</3/0>;pmax=60, </3/0/1>, <3/0/2>, </3/0/3>, </3/0/4>,
<3/0/6>;dim=8,<3/0/7>;dim=8;gt=50;lt=42.2,<3/0/8>;dim=8,<3/0/11>,<3/0/16>
means that regarding the Device Info Object Instance, an R-Attribute has been assigned to this Instance level. And
the LwM2M Client supports the multiple Resources 6, 7, and 8 with a dimension of 8 and has 2 additional
Notification parameters assigned for Resource 7.
when the “Discover” operation targets an Object ID, Object Instance ID and Resource ID, the attributes of that
Resource MUST be returned. In addition, the R-Attributes inherited from upper levels (Object and Object Instance
level) are also reported for that Resource (The rules of Section 5.1.2 apply) For example: if Object ID is 3, and
Resource ID is 7, then
</3/0/7>;dim=8;pmin=10;pmax=60;gt=50;lt=42.2
with pmin assigned at the Object level, and pmax assigned at the Object Instance level.
If a Resource, an Object Instance, or an Object has attributes for multiple LwM2M Servers, then the Attributes
returned in the link, MUST only be related to the Server which performed the DISCOVER request. As example, for
the Device Object (ID:3) having the Resource ID:7 with two Observe operations from two Servers 1 & 2, then the
answers to DISCOVER command on both Servers will be differentiated e.g.,
from Server 1: DISCOVER /3/0/7 could provide the answer: </3/0/7>;dim=8;gt=50;lt=42.2
from Server 2: DISCOVER /3/0/7 could provide the answer: </3/0/7>;dim=8;pmax=300;gt=80;lt=75.5
5.4.3 Write
The “Write” operation is used to change the value of a Resource, the values of an array of Resources Instances or the values
of multiple Resources from an Object Instance.
The request includes the value to be written encoded in one of the data format defined in section 6.4.
When more than a single value of a Resource has to be changed in a “Write” request, the TLV or JSON data format MUST
be used.
The Write request MUST be rejected when the specified data format is not supported by the LwM2M Client.
LwM2M Client and LwM2M Server MUST support the following mechanisms to change multiple Resources or an array of
Resource Instances:
Replace: replaces the Object Instance or the Resource(s) with the new value provided in the “Write” operation.
Partial Update: adds or updates Resources provided in the new value and leaves other existing Resources
unchanged.
The “Write” operation has the following parameters:
Parameter Required Default Value Notes
Object ID Yes - Indicates the Object.
Object Instance ID Yes - Indicates the Object Instance to write.
Resource ID No - Indicates the Resource to write. The payload is the new
value for the Resource.
If no Resource ID is indicated, then the value included
payload is an Object Instance containing the Resource
values.
New Value Yes - The new value included in the payload to update the
Object Instance or a single Resource.
Table 12: Write parameters
5.4.4 Write-Attributes
In LwM2M 1.0, only Attributes from the <NOTIFICATION> class MAY be changed in using the “Write-Attributes”
operation.
The general rules for Attributes which are specified in Section 5.1.1 fully apply here. Table 3 in Section 5.1.2 provides
explanation on the Attributes supported by the “Write-Attributes” operation: Minimum Period, Maximum Period, Greater
Than, Less Than, and Step.
The operation permits multiple Attributes to be modified within the same operation.
Including <NOTIFICATION> class Attributes specified in Table 3 Section 5.3.1, the “Write-Attributes” operation has the
following parameters:
Note: How to indicate the Attributes in the message payload is specified in [CoRE_Interface].
Parameter Required Default Value Notes
Object ID Yes - Indicates the Object.
Object Instance ID No - Indicates the Object Instance. When this parameter is
omitted, the Resource ID parameter MUST be ignored
and Attributes in the command parameters are valid for
all resources of all instances of the Object according to
the precedence rules (section 5.1.1).
Resource ID No - Indicates the Resource. When this parameter is omitted,
it means the Attributes of this commands are set at an
upper level (Object or Object Instance level).
<NOTIFICATION> Yes Indicates which Attributes are concerned. When an
class Attributes Attribute is specified without value, it means this
Attribute value is unset at the level specified in the
command (Object, Object Instance or Resource level).
Table 13: Write-Attributes parameters
5.4.5 Execute
The “Execute” operation is used by the LwM2M Server to initiate some action, and can only be performed on individual
Resources. A LwM2M Client MUST return an error when the “Execute” operation is received for an Object Instance(s) or
Resource Instance(s).
Resource which supports “Execute” operation MAY have arguments.
Parameter Required Default Value Notes
Object ID Yes - Indicates the Object.
Object Instance ID Yes - Indicates the Object Instance.
Resource ID Yes - Indicates the Resource to execute.
Arguments No - The arguments of the “Execute” operation are expressed
in Plain Text format (syntax bellow).
Table 14: Execute parameters
In using ABNF, the syntax of the arguments, and arguments list is given as follows:
5.4.6 Create
The “Create” operation is used by the LwM2M Server to create Object Instance(s) within the LwM2M Client. The “Create”
operation MUST target an Object, and MUST follow the rules specified in section 7.3 (ACCESS CONTROL) and its sub-
sections. If any error occurs, nothing MUST be created.
The Object Instance created in the LwM2M Client by the LwM2M Server MUST be an Object type supported by the
LwM2M Client and announced to the LwM2M Server using the “Register” and “Update” operations of the LwM2M Client
Registration Interface.
Object Instance whose Object supports at most one Object Instance MUST be assigned an Object Instance ID of 0 when the
Object Instance is Created.
The “Create” operation has the following parameters:
Parameter Required Default Value Notes
Object ID Yes - Indicates the Object.
New Value Yes - The new value included in the payload to create the
Object Instance(s).
Table 15: Create parameters
The new value included in the payload MUST follow the TLV or JSON data format according to section 6.4.
The LwM2M Client MUST ignore optional resources it does not support in the payload. If the LwM2M Client supports
optional resources not present in the payload, it MUST NOT instantiate these optional resources.
When there is no reference to Object Instance in the TLV/JSON payload of the “Create” command, the LwM2M Client
MUST assigns the ID of the created Object Instance. If a new Object Instance is created through that operation and the
LwM2M Client has more than one LwM2M Server Account, then the LwM2M Client creates an Access Control Object
Instance for the created Object Instance (7.3 ACCESS CONTROL)
Access Control Owner MUST be the LwM2M Server
The LwM2M Server MUST have full access rights
5.4.7 Delete
The “Delete” operation is used for LwM2M Server to delete an Object Instance within the LwM2M Client.
The Object Instance that is deleted in the LwM2M Client by the LwM2M Server MUST be an Object Instance that is
announced by the LwM2M Client to the LwM2M Server using the “Register” and “Update” operations of the Client
Registration Interface.
The Delete operation has the following parameters:
Parameter Required Default Value Notes
Object ID Yes - Indicates the Object.
Object Instance ID Yes - Indicates the Object Instance to delete.
Table 16: Delete parameters
3
The mapping to CoAP Methods of the LwM2M Information Reporting Interface operations specified in this section, is detailed in chapter
8 of the present document (Transport Layer Binding and Encodings).
The LwM2M Client MUST ignore LwM2M Servers operations on this interface during a Server Initiated Bootstrap.
The LwM2M Client MUST ignore the LwM2M Server operation on this interface until it received its Registration
acknowledgement.
The LwM2M Server SHOULD NOT perform any operation on this interface before replying to the registration of this
LwM2M Client.
LWM2M LWM2M
Client Server
92
...
Notify
87
...
Notify
76
Cancel Observation
Figure 13: Example flow for Information Reporting Interface for the RSSI Resource of the Connectivity Monitoring
Object of the example client (Appendix E)
5.5.1 Observe
The LwM2M Server initiates an observation request for changes of a specific Resource, Resources within an Object Instance
or for all the Object Instances of an Object within the LwM2M Client.
Related parameters for “Observe” operation are described in 5.4.4 Write-Attributes and those parameters are configured by
“Write-Attributes” operation.
The Observe operation includes the following parameters:
Parameter Required Default Value Notes
Object ID Yes - Indicates the Object.
Object Instance ID No - Indicates the Object Instance to observe. If no Object
Instance ID is indicated, then all the Object Instances of
Objects are observed and Resource ID MUST NOT be
specified.
Resource ID No - Indicates the Resource to observe. If no Resource ID is
indicated, then the whole Object Instance is observed.
Until the LwM2M Client sends a new registration, the LwM2M Server expects the LwM2M Client to remember the
observation requests. If a LwM2M Client forgets the observation requests (e.g., device factory reset) it MUST perform a new
“Register” operation. The LwM2M Server MUST re-initiate observation requests whenever the LwM2M Client registers.
In order to avoid network traffic increase, the LwM2M Client SHOULD maintain previous observation states in case of
reboot, power cycle.
It has to be noted that an “Observe” operation containing only Object ID, will produce the report of all Object Instances
information.
Note: When a LwM2M Client deregisters, the LwM2M Server should assume past states are nullified including the previous
observations.
5.5.2 Notify
The “Notify” operation is sent from the LwM2M Client to the LwM2M Server during a valid observation on an Object
Instance or Resource. This operation includes the new value of the Object Instance or Resource. The “Notify” operation
SHOULD be sent when all the conditions (i.e., Minimum Period, Maximum Period, Greater Than, Less Than, Step)
configured by “Write-Attributes” operation for “Observe” operation are met.
Parameter Required Default Value Notes
Updated Value Yes - The new value included in the payload about the Object
Instance or Resource.
Table 18: Notify parameters
The following example shows how the Minimum and Maximum period parameters work as shown in Section 5.4.4. A
LwM2M Server makes an observation for a Temperature Resource that is updated inside the LwM2M Client at irregular
periods (based on change). The LwM2M Server makes an observation when the Minimum Period = 10 Seconds and
Maximum Period = 60 Seconds have been set for that Resource. The LwM2M Client will wait at least 10 Seconds before
sending a “Notify” operation to the LwM2M Server (even if the Resource has changed before that), and no longer than 60
Seconds before sending a “Notify” operation (even if the Resource has not changed yet). The “Notify” operation is sent
anywhere between 10-60 seconds upon change.
LwM2M LwM2M
Client Server
Success
0s
92
New
Value
Notify
10 s
87
New Notify
50s (40 s)
Value 76
Notify
110s (60 s) 76
This example assumes the Minimum Period has been set to 10 and the Maximum Period set to 60 for the Resource /4/0/2
before making the observation.
Object 0
Resource 1
Resource 2
Resource 3
Resource
Resource4
Resource44
Object 1
Object 1
Object 1
Resource 1
Resource 2
Resource 3
Resource 4
Each Object, defined for the LwM2M Enabler, is assigned a unique OMA LwM2M Object identifier allocated and
maintained by the OMA Naming Authority (OMNA). The LwM2M Enabler defines standard Objects and Resources
(Appendix E). Further Objects may be added by OMA or other organizations to enable additional M2M Services.
As an Object only specifies a grouping of Resources, an Object MUST be firstly instantiated so that the LwM2M Client can
use the Resources of such an Object and the associated functionalities.
When an Object is instantiated – either by the LwM2M Server or the LwM2M Client – an Object Instance is created with a
subset of the Resources defined in the Object specification; a LwM2M Server can then access that Object Instance and its set
of instantiated Resources.
A Resource which is instantiated within an Object Instance is a Resource which can either:
contain a value (if the Resource is Readable and/or Writeable)
or can be addressed by a LwM2M Server to trigger an action in the LwM2M Client (if the Resource is Executable)
The Object specification defines the operations (Read, Write, Execute) which are individually supported by the Resources
belonging to that Object; this specification also defines the Mandatory or Optional characteristics of such Resources.
A Resource specified as Mandatory within an Object MUST be instantiated in any Instance of that Object.
A Resource specified as Optional within an Object MAY be omitted from some or even all Instances of that Object.
As illustration, the following example using the DISCOVER command on the Server Object, exposes a configuration in
which the Server Object (ID:1) has 2 Instances (ID:0, ID:1): the Optional Resources ID:2, ID:4 are only instantiated in the
Instance 1 of the Object, while the Optional Resources ID:3 and ID:5 are not instantiated in either of the Server Object
Instances. In Server Object ID:1, the Resources 0,1, and 6,7,8 are Mandatory Resources.
According to the DISCOVER /1 request, the following payload is returned:
</1/0/0>,</1/0/1>,</1/0/6>,</1/0/7>, </1/0/8>, </1/1/0>,</1/1/1>,</1/1/2>,</1/1/4>,</1/1/6>,</1/1/7>, </1/1/8>
Objects and Resources have the capability to have multiple instances. Multiple-Instances Resources can be instantiated by
LwM2M Server operations in using JSON or TLV formats (Section 5.4). The LwM2M Client also has the capability to
instantiate Single or Multiple-Instances Resources.
The LwM2M Server performs operations on an Object, Object Instance and Resources as described in Section 5 Interfaces.
These operations are conveyed as described in Section 8 Transport Layer Binding and Encoding and how to convey the
Operation data is defined in 6.4.
The LwM2M Enabler defines an access control mechanism per Object Instance. Object Instances SHOULD have an
associated Access Control Object Instance. An Access Control Object Instances contains Access Control Lists (ACLs) that
define which operations on a given Object Instance are allowed for which LwM2M Server(s).
Figure 16 shows an example of the operations the Resources support and how Object Instances and Resources are associated
with Access Control Object Instance. In the example, Object Instance 0 for Object 1 has 2 Resources. Resource 1 supports
the ”Read”, “Write” operations, while Resource 0 supports only the “Read” operation. The associated Access Control Object
Instance has ACL of Object Instance 0 for Object 1. Server1 is authorized to perform “Read” and “Write” operations to the
Object Instance 0 for Object 1 and Resources of the Object Instance. However, due to the supported operations of each
Resource, Server1 can perform the “Read” operation on Resource 1 and 0, and also can perform the “Write” operations on
Resource 1, but Server1 cannot perform the “Write” operation on Resource 0. The detailed access control mechanism is
defined in Section 147138816.7.3 Access Control.
Object 1, Instance 0
Resource 0 R
ACL :
Resource 1 R,W Server1=R,W
Figure 16: Example of Supported operations and Associated Access Control Object Instance
for LwM2M Objects specified outside of a LwM2M Enabler, the Server has to be informed if the initial set of
Resources characteristics have been modified/fixed, so that the Server can refer to the proper Object Specification
Object versioning aims at identifying the LwM2M Object modifications which can be categorized in 2 types defined below:
Evolution of type I: representing non-backward-compatible (“breaking”) evolutions, namely:
o A Resource characteristic (optional vs mandatory, data type, supported operations) is changed in the Object
o a Resource supporting a feature which is only defined by a new LwM2M Enabler, is added to the Object
Evolution of type II: representing backward-compatible (“non-breaking”) evolutions
o an optional Resource is added or removed in the Object
In this document, the term “Initial Version” represents:
the version 1.0 of the LwM2M Enabler
the version 1.0 of any Object registered for the first time in OMNA
With Object versioning, the Object Identifier is not changed but a new URN identifying that particular version of the Object
specification MUST be registered according to the following format
“urn:oma:lwm2m:{oma, ext, x}:ObjectID[:{version}]” where „version‟ is the Object Version as defined in
the following section
In “Register” and “Discover” operations, when the Object Version of a given Object must be communicated, the LwM2M
Client MUST use the “ver” (object version) <PROPERTIES> Class attribute associated to that Object.
Few examples:
a) URN: “urn:oma:lwm2m:oma:44:2.2” Object 44 in version 2.2
Details:
on the OMNA portal the Object ID:44 will be registered at least twice
with the URN “urn:oma:lwm2m:oma:44” (Initial Version)
with the URN “urn:oma:lwm2m:oma:44:2.2” (or the latest release of the major Version 2, LwM2M
Server ignores minor releases)
the Object definition contains the minimal version of the LwM2M Enabler supporting that Object (which
can be omitted if this LwM2M version is the “Initial Version” one)
LwM2M Client “Register” operation: ep=nodename,</1/0>,</1/1>,</3/0>,</44>;ver= “2.2”,</44/0>
b) URN: “urn:oma:lwm2m:oma:3”
Details: LwM2M Client “Register” operation: ep=nodename,</1/0>,</1/1>,</3/0>
c) URN: “urn:oma:lwm2m:oma:44”
Details: LwM2M Client “Register” operation: ep=nodename,</1/0>,</1/1>,</3/0>,</44/0>
d) URN: “urn:oma:lwm2m:oma:3” in LwM2M Client supporting LwM2M Enabler version 2.0
Details:
the minimal version of the LwM2M Enabler supporting that Object “3” (Device) is still LwM2M 1.0; this
information may be omitted in the Device (ID:3) Object Definition file
LwM2M Client “Register” operation: lwm2m=“2.0”,ep=nodename,</1/0>,</1/1>,</3/0>
e) URN: “urn:oma:lwm2m:oma:4:3.1”
Context:
the LwM2M Client supports LwM2M Enabler version 2.0
Object ID: 4 supports a specific feature of LwM2M 2.0 not supported by the LwM2M Enabler Initial
Version, and the Object Version 3 is part of the LwM2M Enabler Version 2.0
Details:
the minimal version of the LwM2M Enabler supporting that Object “4” (Device) must be indicated in the
Object 4 version 3.1 Definition file: LwM2MVersion=“2.0” and ObjectVersion=“3.1”
LwM2M Client “Register” operation: lwm2m=“2.0”,ep=nodename,</1/0>,</1/1>,</3/0>,</4/0>
6.3 Identifiers
The LwM2M Enabler defines specific identifiers for entities used within the LwM2M Protocol. These identifiers are defined
in Table 20.
Identifier Semantics Description
Format
Other URN formats MAY be used. In particular, URN formats defined in [DMREPPRO] Section 5.5 can be used.
The IANA registered Media Type supported in LwM2M TS 1.0 are listed in the table below
Opaque application/octet-stream 42
6.4.2 Opaque
The opaque format is used for “Read” and “Write” operations on singular Resources where the value of the Resource is an
opaque sequence of binary octets. This data format is used for binary Resources such as firmware images or application
specific binary formats.
This data format has a Media Type of application/octet-stream.
6.4.3 TLV
For “Read” and “Write” operations, the binary TLV (Type-Length-Value) format is used to represent an array of values or a
singular value using a compact binary representation, which is easy to process on simple embedded devices. The format has a
minimum overhead per value of just 2 bytes and a maximum overhead of 5 bytes depending on the type of Identifier and
length of the value. The maximum size of an Object Instance or Resource in this format is 16.7 MB. The format is self-
describing, thus a parser can skip TLVs for which the Resource is not known.
This data format has a Media Type of application/vnd.oma.lwm2m+tlv.
The format is an array of the following byte sequence, where each array entry represents an Object Instance, Resource, or
Resource Instance:
Type 8-bits masked field: Bits 7-6: Indicates the type of Identifier.
0bxxxxxxxx (MSB is the bit 00= Object Instance in which case the Value
following 0b) contains one or more Resource TLVs
Bit numbering is 0 for the 01= Resource Instance with Value for use
LSB to 7 for the MSB within a multiple Resource TLV
10= multiple Resource, in which case the
Value contains one or more Resource Instance
TLVs
11= Resource with Value
Length 0-24-bit unsigned integer as The Length of the following field in bytes.
indicated by the Type field.
Value Sequence of bytes of Length Value of the tag. The format of the value
depends on the Resource‟s data type (See
Appendix C).
Each TLV entry starts with a Type byte that indicates if the TLV contains an Object Instance, a Resource, multiple Resources,
or a Resource Instance. Object Instance and Resource with Resource Instance TLVs contains other TLVs in their value. The
hierarchy is as follows and may be up to 3 levels deep.
Object Instance TLV, which contains
o Resource TLVs or
o multiple Resource TLVs, which contains
Resource Instance TLVs
For simplicity and to prevent any ambiguity on Object Instance Identity, when the Object Instance ID is not specified in the
request, the Object Instance TLV MUST be used, whatever the number of Object Instances (1 or more) to return to the
LwM2M Server.
When a Multiple Resource has to be returned to the LwM2M Server, the Multiple Resource TLV MUST be used whatever
the number of Instances (0, 1 or more) of that resource.
The following figure illustrates the possible nesting of Object Instance, Resource, multiple Resources, and Resource Instance
TLVs. One or several Resource TLVs, and/or one or several multiple Resource TLVs MAY be nested in an Object Instance
TLV. A multiple Resource TLV contains one or several Resource Instance TLVs.
Object 1
Resource TLV (bits 7-6:11)
Manufacturer 0b11 0 01 000 0x00 0x14 (20 bytes) Open Mobile Alliance [String] 23
Resource
Model Number 0b11 0 01 000 0x01 0x16 (22 bytes) “Lightweight M2M Client” 25
[String]
Available Power 0b10 0 00 110 0x06 ─ The next two rows (6 bytes) 2
Sources
Power Source 0b10 0 01 000 0x07 0x08 (8 bytes) The next two rows 3
Voltage
Power Source 0b10 0 00 111 0x08 ─ The next two rows (7 bytes) 2
Current
Total 121
C8 01 16 4C 69 67 68 74 77 65 69 67 74 20 4D 32 4D 20 43 6C 69 65 6E 74
C8 02 09 33 34 35 30 30 30 31 32 33
C3 03 31 2E 30
86 06
41 00 01
41 01 05
88 07 08
42 00 0E D8
42 01 13 88
87 08
41 00 7D
42 01 03 84
C1 09 64
C1 0A 0F
83 0B
41 00 00
C4 0D 51 82 42 8F
C6 0E 2B 30 32 3A 30 30
C1 10 55
TLV Type Byte ID Byte(s) Length Byte(s) Value Total
Bytes
Device Object 0b00 0 01 000 0x00 0x79 (121 The next 20 rows 3
Instance 0 bytes)
Manufacturer 0b11 0 01 000 0x00 0x14 (20 bytes) Open Mobile Alliance [String] 23
Resource
Model Number 0b11 0 01 000 0x01 0x16 (22 bytes) “Lightweight M2M Client” 25
[String]
Available Power 0b10 0 00 110 0x06 The next two rows (6 bytes) 2
Sources ─
Power Source 0b10 0 01 000 0x07 0x08 (8 bytes) The next two rows 3
Voltage
Power Source 0b10 0 00 111 0x08 The next two rows (7 bytes) 2
Current ─
Total 124
Access Control 0b00 0 01 000 0x00 0x0E (17 bytes) The next 5 rows 3
Object Instance 0
Access Control 0b00 0 01 000 0x02 0x12 (18 bytes) The next 6 rows 3
Object Instance 2
Total 38
Total 16
44 01 00 42 00 01
C8 01 0D 38 36 31 33 38 30 30 37 35 35 35 30 30
C4 02 12 34 56 78
ID Total
TLV Type Byte Length Byte(s) Value
Byte(s) Bytes
Res 0 lnk 0b1 0 0 01000 0x00 0x0C(12 bytes) The next 2 rows 3
Res 0 lnk [0] 0b01 000 100 0x00 ─ 0x0042 0000 [Objlnk] (66:0) 6
Res 0 lnk [1] 0b01 0 00 100 0x01 ─ 0x0042 0001 [Objlnk] (66:1) 6
Total 37
Example 2) request to Object 66: Read /66: TLV payload will contain 2 Object Instances
08 00 23
C8 00 0B 6D 79 53 65 72 76 69 63 65 20 31
C8 01 0F 49 6E 74 65 72 6E 65 74 2E 31 35 2E 32 33 34
C4 02 00 43 00 00
08 01 23
C8 00 0B 6D 79 53 65 72 76 69 63 65 20 32
C8 01 0F 49 6E 74 65 72 6E 65 74 2E 31 35 2E 32 33 35
C4 02 FF FF FF FF
ID Total
TLV Type Byte Length Byte(s) Value
Byte(s) Bytes
Object 66 Instance 0 0b00 0 01 000 0x00 0x23 (35 bytes) The next 3 rows 3
Object 66 Instance 1 0b00 0 01000 0x01 0x23 (35 bytes) The next 3 rows 3
Total 76
6.4.4 JSON
When a LwM2M Client is supporting the JSON data format and such a format is used to transport Object Instance(s),
multiple resource and single resource values for both “Read” and “Write” operations, JSON payload MUST use the format
defined in this section. Such a format MAY be used for transporting a single value of a Resource
The format MUST comply to [SENML] JSON representation extended for supporting LwM2M Object Link data type and
MUST support all attributes defined in Table 22.
According to [SENML] semantics, JSON data format in LwM2M, is composed of optional attributes (Base Time, Base Name)
and of a mandatory Resource Array having one or more entries. Each array entry contains several optional or mandatory
parameters (Name, Time...).
Each entry of the JSON format is a Resource Instance, where the Name attribute need to be prepended by the Base Name
attribute to form the unique identifier of this Resource instance.
The Name attribute in of this array entry is a URI path relative to the Base Name; namely the Name attribute could simply be
the full URI of a requested Resource Instance when Base Name is absent.
The JSON is useful for transporting multiple Resource Instances for example when transporting all Instances of an Object
with all Resources, and Resource Instances within a single LwM2M Client response.
In particular, when Base Name is set to the LwM2M Object root (e.g., “/”), the JSON format may support to return a
hierarchy of Object Instances when Object Link datatype resources are reported (example given below). The resource
instances tree report is performed in using a Breadth-First traversal strategy (see JSON second example below); a given
Object Instance MUST appear at most once in that report. The JSON format also includes optional time fields, which allows
for multiple versions of representations to be sent in the same payload. The time fields MUST only be used when sending
notifications.
Note: According to [SENML] specification, time values (Base Time and Time) are represented in floating point as seconds, a
missing attribute is considered to have a value of zero.
Regarding the Base Time, “Positive values (>0) represent an absolute time relative to the unix epoch, while negative values
(<= 0) represent a relative time in the past from the current time” [SENML].
Historical version of notifications are typically generated when “Notification Storing When Disabled or Offline” resource of
LwM2M Server Object is set to true (see Appendix D.2) and when the Device comes on line after having been disabled for a
period of time.
This JSON data format has a Media Type of application/vnd.oma.lwm2m+json.
Base Name bn No The base name string which is prepended to the Name value of
the entry for forming a globally unique identifier for the resource.
Base Time bt No The base time which the Time values are relative to.
Resource e Yes The Resource list as JSON value array according to [SENML]
Array with Array parameter extension (Object Link).
Array Parameters
Name n No The Name value is prepended by the Base Name value to form
the name of the resource instance. The resulting name uniquely
identifies the Resource Instance from all others.
Example:
if Base Name is “/” , the Array entry Name of the
Resource is {Object}/{Object Instance}/
{Resource}/{Resource Instance}
when Base Name is not present, the Array entry Name is
the full URI of the requested Resource Instance
Float Value v One value Value as a JSON float if the Resource data type is Integer, Float,
field is or Time.
mandatory
Boolean Value bv Value as a JSON Boolean if the Resource data type is boolean.
String Value sv Value as a JSON string for all other Resource data types. If the
Resource data type is opaque the string value holds the Base64
encoded representation of the Resource.
For example a request to Device Object of the LwM2M example client (Read /3/0) would return the following JSON payload.
This example has a size of 457 bytes.
{“bn”:“/3/0/”,
“e”:[
{"n":"0","sv":"Open Mobile Alliance"},
{"n":"1","sv":"Lightweight M2M Client"},
{"n":"2","sv":"345000123"},
{"n":"3","sv":"1.0"},
{"n":"6/0","v":1},
{"n":"6/1","v":5},
{"n":"7/0","v":3800},
{"n":"7/1","v":5000},
{"n":"8/0","v":125},
{"n":"8/1","v":900},
{"n":"9","v":100},
{"n":"10","v":15},
{"n":"11/0","v":0},
{"n":"13","v":1367491215},
{"n":"14","sv":"+02:00"},
{"n":"16","sv":"U"}]
}
For example a notification about a Resource containing multiple historical representations of a Temperature Resource (ID:2)
(e.g. Instance ID:1 of hypothetical Object ID 72) could result in the following JSON payload:
{“bn”:“/72/“,
“e”:[
{"n":"1/2","v":22.4,"t":-5},
{"n":"1/2","v":22.9,"t":-30},
{"n":"1/2","v":24.1,"t":-50}],
"bt":25462634
}
For example a request to Object 65 of the LwM2M example from Figure 28 (Read /65/0) would return the following JSON
payload.
Because the Base Name is specified, the full hierarchy linked to the Instance 0 of Object 65 can be reported in a single
response (Object 66 Instance 0 & 1, and Instance 0 of Object 67 are part of the payload). This example has a size of 435 bytes.
{ "bn":"/",
"e":[
{"n":"65/0/0/0","ov":"66:0"},
{"n":"65/0/0/1","ov":"66:1"},
{"n":"65/0/1","sv":"8613800755500"},
{"n":"65/0/2","v":1},
{"n":"66/0/0","sv":"myService1"},
{"n":"66/0/1","sv":"Internet.15.234"},
{"n":"66/0/2","ov":"67:0"},
{"n":"66/1/0","sv":"myService2"},
{"n":"66/1/1","sv":"Internet.15.235"},
{"n":"66/1/2","ov":"FFFF:FFFF"},
{"n":"67/0/0","sv":"85.76.76.84"},
{"n":"67/0/1","sv":"85.76.255.255"}]
}
For example, a request to Device Object on Resource 0 of the LwM2M example client (Read /3/0/0) could return the
following JSON payload.
{“bn”:“/3/0/0”,
“e”:[
{“sv":"Open Mobile Alliance}]
}
7. Security
The LwM2M protocol is based on [CoAP] principles and utilizes the UDP and SMS transport channel bindings of the
protocol. The LwM2M protocol utilizes DTLS with these channel bindings to implement authentication, confidentiality, and
data integrity features of the protocol between communicating LwM2M entities. As an alternative, lower layer security may
be used, as described in Section 7.2.
LwM2M Clients require credentials and configuration information for securely communicate with LwM2M Servers. This
configuration information can be provisioned to the LwM2M Client during manufacturing or through the use of the LwM2M
Bootstrap-Server. In order to secure the communication between the Lwm2M Client and the LwM2M Bootstrap-Server a
different set of credentials and configuration information is required.
LwM2M supports three different types of credentials, namely
Certificates,
Raw public keys, and
Pre-shared secrets.
Since these credential types offer different properties the LwM2M offers support for all of them.
The LwM2M protocol specifies that authorization of LwM2M Servers to access Object Instances and Resources within the
LwM2M Client is provided through Access Control Object Instances within the LwM2M Client.
The DTLS client and the DTLS server SHOULD keep security state, such as session keys, sequence numbers, and
initialization vectors, and other security parameters, established with DTLS for as long a period as can be safely achieved
without risking compromise to the security context. If such state persists across sleep cycles where the RAM is powered off,
secure storage SHOULD be used for the security context.
The credentials used for authenticating the DTLS client and the DTLS server to secure the communication between the
LwM2M Client and the LwM2M Server are obtained using one of the bootstrap modes defined in Section 5.2.2. Appendix
E.1.1 defines the format of the keying material stored in the LwM2M Security Object Instances.
LwM2M Bootstrap-Servers, LwM2M Servers and LwM2M Clients MUST use different key pairs. LwM2M Clients MUST
use keys, which are unique to each LwM2M Client. When a LwM2M Client is configured to utilize multiple LwM2M
Servers then the LwM2M Bootstrap-Server may configure different credentials with these LwM2Ms Servers. Such
configuration provides better unlinkability properties since each individual LwM2M Server cannot correlate request based on
the credentials used by the LwM2M Client. Deployment and application specific considerations dictate what approach to use.
7.1.3 Ciphersuites
DTLS supports the concept of ciphersuites and they are securely negotiated during the DTLS handshake. This specification
recommends a limited number of ciphersuites. The recommended ciphersuites have been chosen because of suitability for
IoT devices, security reasons and to improve interoperability and depend on the type of credential being used since the
ciphersuite concept also indicates the authentication and key exchange mechanism. LwM2M Clients and LwM2M Servers
MAY support additional ciphersuites that conform to state-of-the-art security requirements.
Note that care has to be taken when using CBC-based ciphersuites in DTLS for the following two reasons:
(1) Prior to TLS 1.1 IV selection is broken. The solution is to use TLS 1.1 or higher, and there is a work-around for
earlier version using record splitting. Since this specification relies on DTLS 1.2 this concern is not applicable.
(2) Implementing authenticated decryption (checking padding and mac) without any side channel is hard (see Lucky 13
attack and its variants). The solution is to use the encrypt-then-mac extension defined in RFC 7366, which is
recommended.
7.1.4 Bootstrapping
The Resources in the LwM2M Security Object (i.e., “Security Mode”, “Public Key or Identity”, “Server Public Key or
Identity” and “Secret Key”) are used
1) for providing UDP channel security in “Client Registration”, “Device Management & Service Enablement”, and
“Information Reporting” Interfaces if the LwM2M Security Object Instance relates to a LwM2M Server, or,
2) for providing channel security in Bootstrap Interface if the LwM2M Security Object instance relates to a LwM2M
Bootstrap-Server.
3) for protecting the communication with a firmware repository server when the LwM2M Client receives a URI in the
Package URI of the Firmware Update object.
The content and the interpretation of the Resources in the LwM2M Security Object depend on the type of credential being
used.
Concerning Bootstrap from Smartcard a secure channel between the Smartcard and the LwM2M Client SHOULD be
established, as described in Appendix G and defined in [GLOBALPLATFORM 3], [GP SCP03]. Using Smartcard with pre-
shared secrets, raw public keys, and with certificates needs no pre-existing trust relationship between LwM2M Server(s) and
LwM2M Client(s). The pre-established trust relationship is between the LwM2M Server(s) and the SmartCard(s).
LwM2M Clients MUST either be provisioned for use with a LwM2M Server (manufacturer pre-configuration bootstrap
mode) or else be provisioned for use with an LwM2M Bootstrap-Server. Any LwM2M Client, which supports client or server
initiated bootstrap mode, MUST support at least one of the following secure methods:
1) Bootstrapping with a strong (high-entropy) pre-shared secret, as described in Section 7.1.7. The ciphersuites defined
in Section 7.1.7 MUST NOT be used with a low-entropy secret or with a password.
2) Bootstrapping with a raw public key or certificate-based method (as described in Section 7.1.8 and Section 7.1.9).
In either case, the LwM2M Client MUST be provisioned with a credential that is unique to a device. For full interoperability,
a LwM2M Bootstrap-Server MUST support bootstrapping via pre-shared secrets, raw public keys, and certificates.
NOTE: The above security methods can also be used by the LwM2M Bootstrap-Server to provision KIc and KID for the
SMS Secured Packet Structure mode (see Section 7.2.2 for SMS Secured Packet Structure mode).
Security credential dynamically provisioned to the LwM2M Client and the LwM2M Server MAY change at any time, even
during the lifetime of an ongoing DTLS session. Since the DTLS protocol verifies the credentials only at the beginning of the
session establishment (unless the re-negotiation feature is used) it is possible that a change in credential (for example,
credentials for the use of a PSK-based ciphersuite) occurs after a DTLS handshake has already been completed and the DTLS
session setup is already finalized. Hence, from a DTLS protocol point of view such a change is not recognized and the
already established record layer security associations are in use. It is a policy decision for a DTLS client as well as a DTLS
server implementation to tear down an already existing session when the credentials change. Such a decision will depend on
various factors, such as the application domain in which LwM2M is used. The LwM2M specification does not mandate a
specific behaviour in such a case since DTLS allows both communication parties to tear down an established DTLS session
for any number of reasons.
in the DTLS handshake additionally comparing the reference identifier against the presented identifier is step for future-
proofing in the anticipation of supporting other PKIX validation modes. Similarly, a DTLS client running on a LwM2M
Server would need to obtain the certificate of the DTLS server running on the LwM2M Client from some repository.
The algorithm description from RFC 6125 assumes that fully qualified DNS domain names are used. If a server node is
provisioned with a fully qualified DNS domain, then the DTLS server certificate MUST contain the fully qualified DNS
domain name or "FQDN" as dNSName [RFC5280]. For CoAP, the coaps URI scheme is described in Section 6.2 of
[RFC7252]. This FQDN is stored in the SubjectAltName or in the leftmost Common Name (CN) component of the subject
name, as explained in Section 9.1.3.3 of [RFC7252], and used by the DTLS client to match it against the FQDN used during
the lookup process, as described in [RFC6125].
Note that the Server Name Indication (SNI) extension [RFC6066] allows a DTLS client to tell a DTLS server the name of the
DTLS server it is contacting. This is an important feature when the server is part of a hosting solution where multiple virtual
servers are using a single underlying network address. Section 3 of [RFC6066] only allows FQDN hostname of the DTLS
server in the ServerName field. For the DTLS client running on a LwM2M Server the SNI extension allows the LwM2M
Server to indicate what certificate it is expecting.
In some deployment scenarios DNS is not used and hence LwM2M Clients need to follow a different procedure.
If the CoAP URI stored in the "LwM2M Server URI" Resource contains an IP literal, such as coaps://[2001:db8::2:1]/, then
certificate provided by the server also has to contain such an IP address in the Common Name (CN) component of the server
certificate or in a field of URI type in the SubjectAltName set.
The procedure for a client using such certificates is as follows:
The LwM2M Client uses the IP address from the LwM2M Server URI Resource to connect to the LwM2M
Server using a DTLS handshake. The IP address becomes the reference identifier.
The DTLS stack of the LwM2M Server returns a Certificate message as part of the handshake that contains a
certificate. The IP address extracted from the server certificate becomes the presented identifier.
The client matches the reference identifier against the presented identifier. If the two match, the client continues
with the certificate verification according to RFC 5280 and aborts the handshake with a fatal alert otherwise.
There are disadvantages in the way how IP addresses are used in the LwM2M specification with certificates. Whenever the
IP address of the LwM2M Server changes a new certificate for that LwM2M Server needs to be created. Due to the only
supported domain-issued certificate mode the LwM2M Server certificate also needs to be provisioned to the LwM2M Client
since otherwise the DTLS handshake will fail since the certificate provisioned to the Server Public Key Resource will not
match the newly generated LwM2M Server certificated provided in the DTLS handshake. Furthermore, the IP address
contained in the LwM2M Server URI Resource will also need to be updated. Finally, IP addresses cannot be used in the SNI
extension.
The use of certificates requires the DTLS client to understand the concept of time since it needs to check the validity of the
server-provided certificate. Different deployments may have different means of obtaining the current time and this
specification does not mandate one mechanism. In general, the LwM2M Bootstrap-Server certificate is not expected to expire
since the LwM2M Client has no easy possibility to recover from such an expired certificate. However, if the LwM2M Client
determines that the LwM2M Server certificate is expired it MAY contact the LwM2M Bootstrap-Server to obtain new
security credentials for use with the LwM2M Server.
Note that the LwM2M Device Object allows the LwM2M Bootstrap-Server to configure the current time for the LwM2M
Client using the Current Time Resource.
pair on the LwM2M Client and to initiate an EST over CoAP protocol exchange [CoAP-EST] to obtain a certificate. The
EST over CoAP specification [CoAP-EST] profiles the use of EST for use in constrained environments.
When generating a public / private key pair, the random generator used by the LwM2M Client MUST respect the
characteristics of a sufficiently high quality random bit generator, such as defined for example by ISO/IEC 18031:2011, RFC
4086 [RFC4086] or NIST Special Publication 800-90a [SP800-90A].
Compared to the certificate mode additional over-the-air overhead is introduced by this mode since the LwM2M Client needs
to convey the public key to the EST server and needs to demonstrate possession of the private key using the PKCS#10
defined mechanism, as referenced in the EST specification. Depending on the deployment environment this additional
overhead needs to be compared against the added security benefit of not disclosing the private key to other parties.
The "Secret Key" and the "Public Key or Identity" Resources are not used by this mode. The "LwM2M Server URI", and the
"Bootstrap Server" Resources are populated according to the description in Appendix E.1.
Enrolment over Secure Transport (EST) offers multiple features, including
Simple PKI messages,
CA certificate retrieval,
CSR Attributes Request,
Server-generated key request,
but only the first two are mandatory to implement.
In context of this specification functionality for server-generated key requests is already covered as part of the security mode
(1 - Raw Public Key mode and 2 - Certificate mode). CSR Attributes Request is also not required for this specification either
since the LwM2M Bootstrap Server is typically in possession of the required attributes for generating a certificate. The CA
certificate retrieval, while mandatory to implement for EST, is not used by version 1.0 of this specification since only the
domain issued certificate mode is supported, as described in Section 7.1.9. Hence, CA certificates are not utilized.
The Secure Channel as specified in Appendix H of this document SHOULD be used to provide the prepared data to the
Smartcard.
7.2.2.3 SMS Secured Packet Binding for CoAP messages
In SMS Secured Packet Structure mode, a CoAP message as defined in [CoAP] MUST be encapsulated in [3GPP 31.115]
Secured Packets, in implementing - for SMS Point to Point (SMS_PP) - the general [ETSI 102 225] specification for UICC
based applications.
The “Command Packet” command specified in [3GPP 31.115] /[ETSI TS 102 225] MUST be used for both CoAP
Request and Response message
The Structure of the Command Packet contained in the Short Message MUST follow [3GPP 31.115] specification
SPI MUST be set as follow (see coding of SPI in [ETSI TS 102 225] section 5.2.1):
o use of cryptographic checksum
o use of ciphering
The ciphering and crypto graphic checksum MUST use either AES or Triple DES
Single DES MUST NOT be used
AES SHOULD be used
When Triple DES is used , then it MUST be used in outer CBC mode and 3 different keys MUST
be used
When AES is used it MUST be used with CBC mode for ciphering (see coding of KIc in [ETSI
TS 102 225] section 5.2.2) and in CMAC mode for integrity (see coding of KID in [ETSI TS 102
225] section 5.2.3).
o process if and only if counter value is higher than the value in the RE
o PoR depends on LwM2M Server Policy
TAR MUST be set to „B2 02 03‟ value for the LwM2M UICC Application as registered in [ETSI TS 101 220]
Appendix D
Secured Data : contains the Secured Application Message which MUST be coded as a BER-TLV, the Tag (TBD :
e.g 0x05) will indicate the type (e.g CoAP type) of that message
Furthermore, the LwM2M Client needs to determine - per supported Object Instance - who the “Access Control Owner” of
that Object Instance is and which access rights have been granted to other LwM2M Servers likely to interact with that
LwM2M Client on such Object Instance.
The Access Control Object is specified in Appendix E.3 and Examples of Access Control Object Instances are presented in
Appendix F.
7.3.1.2 Access Control Object Management
7.3.1.2.1 Access Control on Object
An Access Control Object Instance MUST be associated per Object supported by the LwM2M Client, to specify which
LwM2M Server is authorized to instantiate (“Create” operation) such an Object.
₋ This kind of Access Control Object Instance associated with a certain Object, MUST only be created or updated
during a Bootstrap Phase. If such association doesn‟t exist, an Access Control Object Instance MUST be created
with the Resources values which MUST be set as given in the table just below.
₋ when such Access Control Object Instance already exists for a certain Object, this Access Control Object Instance
MAY be updated for supporting additional LwM2M Servers; in that case a new ACL Instance per Server is created
in that Access Control Object Instance with the Short Server ID of the LwM2M Server as index of this new ACL
Instance, and the “C” access right as ACL Resource value.
₋ when a LwM2M Server creates under authorization an Object Instance (see section 7.3.2 Authorization) in the
LwM2M Client, an Access Control Object Instance MUST be created in the LwM2M Client with the Resources
values which MUST be set as given in the table just below. The Access Control Owner Resource is configured with
the Short Server ID of the LwM2M Server.
₋ when this Access Control Object Instance is created during the Bootstrap Phase, ACL(s) and Access Control Owner
MUST be set with values respecting the consistency of the LwM2M Client configuration.
₋ through the Device Management and Service Enablement Interface, an Access Control Object Instance MUST only be
managed by the LwM2M Server declared as the “Access Control Owner” in it.
₋ when the LwM2M Server - which is the “Access Control Owner” - adds or modifies (using “Write” operation) access
right on the Object Instance for a certain LwM2M Server,
a. an ACL Resource having the targeted Short Server ID as ACL Resource Instance ID, has to be instantiated by
the LwM2M Client if ACL Resource Instance for the LwM2M Server doesn‟t exist yet
b. the appropriate access right (R,W,D,E) for that targeted Server on the Object Instance has to be set as ACL
Resource Instance value
₋ A specific ACL Resource Instance MAY be used to grant access rights to LwM2M Servers (except the one defined as
the Access Control Owner) which don‟t have their own ACL Resource Instance. The ID of this ACL Resource
Instance containing the default access rights MUST be 0.
₋ when an Object Instance is removed via “Delete” operation performed by the LwM2M Server which is the “Access
Control Owner”, the associated Access Control Object Instance MUST be removed by the LwM2M Client.
The Figure 18 illustrates the Access Control Management of an Object Instance supported by a LwM2M Client, in using an
Access Control Object Instance: the path 2 locates the Access Control Object Instance in charge of the targeted Object
Instance addressed by the path 1. ACL instances in 3, refer to the LwM2M Servers and the access rights granted to them by
the LwM2M Server owner of the targeted Object Instance.
ID = /X /x/0
/x/2
Object X
/x/1
/x/0
Object Instances
ID =/2
Access Control Object
k
/1
Server Object
/1/3
Associates ACL Instance
& Short Server ID 101
/1/2
l
ID =/2/y ResourceID 2 : Short Server ID = 101
Access Control Object Instance
2/31 /1/1
Access 2/22
Control Object Object
Owner ID Instance 2/101
ID /1/0
2/0
ACL Instances
Supported ID = 2/..
operations R / W / ..
Figure 18: Illustration of the relations between the LwM2M Access Control Object and the other LwM2M Objects
7.3.2 Authorization
The LwM2M Client MUST authorize a CREATE operation requested by a LwM2M Server for instantiating a certain Object,
only if the associated Access Control Object Instance, contains an ACL Resource Instance for that LwM2M Server set with
the Access Right “Create” (section 7.3.1.2.1).
The LwM2M Client MUST authorize other operations than CREATE requested by a LwM2M Server either on an Object
Instance, or on Resource after performing a two-steps check:
1st step: the LwM2M Client gets the access right of the targeted Object Instance (as described in section 7.3.2.1) -
and checks whether this access right is sufficient – according to the following table - to perform the LwM2M Server
requested operation.
LwM2M Operations Minimum
Access Right
READ – OBSERVE R
WRITE W
DISCOVER – WRITE- -
ATTRIBUTES
DELETE D
EXECUTE E
2nd step: if at step 1, the LwM2M Server is authorized to perform the operation, the LwM2M Client still needs to
check if the LwM2M Server requested operation is supported by the targeted Resource or Object Instance (details
are provided in section 7.3.2.2, 7.3.2.3, and 147138816.7.3.27.3.2.4).
The LwM2M Object specification defines which operations are allowed to be performed on Resource within an Object
Instance (Refer to Supported Operations in Appendix D LwM2M Object Template and Guidelines). The operations allowed
on a given Resource MUST apply to all the Resource Instances of that Resource.
The LwM2M Client MUST support the authorization procedure described in Section 7.3.2 and its sub-sections.
7.3.2.1 Obtaining Access Right
For “Create” operation sent by the LwM2M Server, the LwM2M Client MUST get access right from the ACL Resource
Instance associated to this LwM2M Server on the targeted Object, which is contained in the Access Control Object Instance
provisioned during Bootstrap (Access Control Owner is MAX_ID=65535). If this access right doesn‟t have the “Create”
value, or cannot be obtained, the LwM2M Server has no access right.
For the operations except than “Create” operation the LwM2M Client MUST perform the following procedure:
1. if this LwM2M Server is the only LwM2M Server Account declared in the LwM2M Client (i.e. single Server
environment) , the LwM2M Server has full access right on Object Instance(s) If the LwM2M Server has more than
one LwM2M Server Account, the LwM2M Client gets an Access Control Object Instance associated with the
Object Instance the LwM2M Server has requested access to and MUST follow the procedure below:
A. If the LwM2M Server is declared as Access Control Owner of this Object Instance and there is no ACL
Resource Instance, then LwM2M Client gets full access right.
B. If the Client has an ACL Resource Instance for the LwM2M Server, the LwM2M Client gets access right
from that ACL Resource Instance.
C. If the Client doesn‟t have ACL Resource Instance for the Server, the LwM2M Client gets access right from
the ACL Resource Instance (ID:0) containing the default access rights if it exists (Section 7.3.1.2.2).
If the Client doesn‟t have this ACL Resource Instance ID:0 containing the default access rights, then the LwM2M Server has
no access right, and an “Access Right Permission Denied” error code is reported to the LwM2M Server.
7.3.2.2 Operation on Resource
When the LwM2M Server targets a Resource, the LwM2M Client MUST obtain an access right for the LwM2M Server on
the Object Instance that Resource belongs to according to Section 7.3.2.1 and MUST check if the access right is granted prior
to perform the requested operation.
If the operation is not permitted, the LwM2M Client MUST send an “Access Right Permission Denied” error code
to the LwM2M Server.
If the operation is permitted, the LwM2M Client verifies if the Resource supports the operation.
If the operation is not supported by the Resource, the LwM2M Client MUST send an “Operation is not supported”
error code to the LwM2M Server.
If the Resource supports the operation, the LwM2M Client MUST perform the requested operation.
encoded in Uri-Path options. The LwM2M Registration interface also makes use of query string parameters to pass on meta-
data with the request separately from the payload. Each query parameter is encoded in a Uri-Query Option. Likewise, the
LwM2M operations for each interface are mapped to CoAP Methods. All the LwM2M operations except “Notify” MUST be
Confirmable CoAP message and “Notify” can be either Confirmable or Non-Confirmable CoAP message when UDP
Transport Layer is used.
8.2.1 Firewall/NAT
For a firewall to support LwM2M, it should be configured to allow outgoing UDP packets to destination port 5683 (other
ports can be configured), and allow incoming UDP packets back to the source address/port of the outgoing UDP packet for a
period of at least 240 seconds. These UDP packets may contain DTLS or CoAP payloads. When a firewall is configured as
such any LwM2M Clients behind it should use Queue Mode.
For a firewall to support LwM2M it can be configured to allow both outgoing and incoming UDP packets to destination port
5683 (other ports can be configured). These UDP packets may contain DTLS or CoAP payloads. When a firewall is
configured as such any LwM2M Clients behind it are not required to use Queued Mode, but may use it for other reasons (e.g.,
a battery powered sleeping device).
Any LwM2M Clients behind a NAT can use Queued Mode. There are other mechanisms to transverse a NAT, however they
are out of scope for the LwM2M Enabler.
Only in Bootstrap Interface, the Discover command MAY target to “/” URI to discover all Objects and Object Instances
supported in the Device.
The Bootstrap-Server MUST send finish indication after it has sent all object instances/resources. Bootstrap-Server send
finish message by sending CoAP POST to “/bs” location path with empty payload.
Operation CoAP Method URI Success Failure
Bootstrap- POST /bs?ep={Endpoint Client Name} 2.04 Changed 4.00 Bad Request
Request 4.15 Unsupported
content format
Write PUT /{Object ID}/{Object Instance 2.04 Changed 4.00 Bad Request
ID}/ {Resource ID}
Delete DELETE /{Object ID}/{Object Instance 2.02 Deleted 4.00 Bad Request
ID}
Discover GET Accept: 2.05 Content 4.00 Bad Request
application/link- /{Object ID} 4.04 Not Found
format
Bootstrap-Finish POST /bs 2.04 Changed 4.00 Bad Request
4.06 Not
Acceptable
Table 23: Operation to Method and URI Mapping
LwM2M
LwM2M
LwM2M
LwM2M Bootstrap
Bootstrap
Client
Client Server
Server
2.04 Changed
Delete /
PUT /0/1
(Security Object Instance)
PUT /1/0
(Server Object Instance)
PUT /2/0
(ACL Object Instance)
Post /bs
LwM2M
LwM2M
LwM2M
LwM2M Bootstrap
Bootstrap
Client
Client Server
Server
Delete/
Server
Initiated
PUT /0/1 Bootstrap
(Security Object Instance)
PUT/1/0
(Server Object Instance)
PUT/2/0
(ACL Object Instance)
Post/ bs
Note: Throughout the present document the format of the MSISDN must be as specified in [3GPP-TS_23.003]. According to
this definition “+” is not preceding the country code.
LwM2M
LwM2M LwM2M
LwM2M
Client
Client Server
Server
POST/rd?ep=exapmple-client
Registration
</1/1>,</1/2>,</2/0></2/1>,</3/0>,</4/0>
Update
POST/rd/5a3f?It=600000
2.04 Changed
DELETE /rd/5a3f
De-register
2.02 Deleted
Figure 21: Example register, update and de-register operation exchanges (shorthand in [CoAP] example style, actual
messages using CoAP binary headers)
An Object Instance is Created by sending a CoAP POST to the corresponding path. The request includes the value to be
written in the corresponding TLV or JSON format according to the Content-Format option which MUST be specified. The
rules governing the creation of Resources in the targeted Object Instance are specified in section 7.3.2.3 (Operation on Object
Instance). If Object Instance is not listed at the request, the LwM2M Client MUST assign ID of that Object Instance and send
back Object Instance ID with “2.01 Created” to the LwM2M Server when Object Instance is Created.
An Object Instance is Deleted by sending a CoAP DELETE to the corresponding path.
When a Resource supports multiple instances the Resource value is an array of Resource Instances.
<NOTIFICATION> class Attributes MAY be set by a LwM2M Server using the “Write-Attributes” operation by sending a
CoAP PUT on the corresponding path, and can be accessed using the “Discover” operation. The Discover operation (uses a
CoAP GET on the corresponding path along with the application/link-format Content type, to retrieve a list of Objects,
Object Instances, Resources and their attached attributes, from the LwM2M Client (see Section 5.4.2 for more details on
DISCOVER command). With the “Write-Attributes” operation one or more Attributes can be written at a time. The values of
these Attributes are used by the Information Reporting interface to determine how often Notifications are sent regarding that
Resource. A LwM2M Client MAY support a set of these Attributes for each LwM2M Server it is configured for.
A Write Attribute command specifies which value is set to which Attribute and at which level (Object / Object Instance /
Resource). In a similar way, the same command without value for the specified Attribute, MUST be used to unset this
Attribute for the given level; then the precedence rules applies when notification occurs (section 5.1.1 Attributes definitions
and Rules)
As example:
a) Write-Attributes /3/0/9?pmin=1 means the Battery Level value will be notified to the Server with a minimum
interval of 1sec; this value is set at the Resource level.
b) Write-Attributes /3/0/9?pmin means the Battery Level will be notified to the Server with a minimum value (pmin)
given by the default one (resource 2 of Object Server ID=1), or with another value if this Attribute has been set at
another level (Object or Object Instance: see section 5.1.1).
c) Write-Attributes /3/0?pmin=10 means that all Resources of Instance 0 of the Object „Device (ID:3)‟ will be notified
to the Server with a minimum interval of 10 sec; this value is set at the Object Instance level.
Operation CoAP Method Path Success Failure
Read GET Accept: 2.05 Content 4.00 Bad Request, 4.01
Content Format /{Object ID}/{Object Unauthorized, 4.04 Not Found,
ID (see section Instance ID}/{Resource ID} 4.05 Method Not Allowed, 4.06
6.4) Not Acceptable
Discover GET Accept: 2.05 Content 4.00 Bad Request, 4.04 Not Found,
/{Object ID}/{Object
application/link- 4.01 Unauthorized, 4.05 Method
Instance ID}/{Resource ID}
format Not Allowed
Write PUT Content /{Object ID}/{Object 2.04 Changed 4.00 Bad Request, 4.04 Not Found,
Format: Instance ID}/{Resource ID} 4.01 Unauthorized, 4.05 Method
POST Content Not Allowed, 4.06 Not Acceptable
Format: /{Object ID}/{Object
Instance ID} 2.31* Continue 4.08* Request Entity Incomplete
4.13* Request entity too large
Write- PUT /{Object ID}/{Object 2.04 Changed 4.00 Bad Request, 4.04 Not Found,
Attributes Instance ID}/{Resource 4.01 Unauthorized, 4.05 Method
ID}?pmin={minimum Not Allowed
period}&pmax={maximum
period}>={greater
than}<={less
than}&st={step}
Execute POST 2.04 Changed 4.00 Bad Request, 4.01
/{Object ID}/{Object
Unauthorized, 4.04 Not Found,
Instance ID}/{Resource ID}
4.05 Method Not Allowed
LwM2M
LwM2M LwM2M
LwM2M
Client
Client Server
Server
GET /3/0/0
Read
2.05 Content
Open Mobile Alliance
2.04 Changed
2.04 Changed
Write
PUT /3/0/9?pmin=1&max=5&It=5
Attribute
2.04 Changed
Figure 22: Example of Device Management & Service Enablement interface exchanges
LWM2M
Client LWM2M
Server
POST /2
POST /2
DELETE /2/3
2.02 Deleted
LWM2M LWM2M
Client Server
…...
4.2 of [CoAP]. If these retransmission attempts fail, the CoAP stack at the LwM2M Server will give up and inform the
LwM2M layer. The LwM2M Server has to inform the application about this failed delivery but this API is outside the scope
of the LwM2M specification.
Due to the congestion control approach used by CoAP the LwM2M Server has to wait for a response to a request before
sending out the next request from the queue since [CoAP] limits the number of simultaneous outstanding interactions to 1.
Despite the title of the functionality, i.e. Queue Mode, this specification does not mandate an implementation to use queues
nor does it specify where such a queue would exist (or any details of such queuing mechanism).
1. The LwM2M Client registers to the LwM2M Server and requests the LwM2M Server to run in Queue mode by
using the correct Binding value in the registration.
2. The LwM2M Client is recommended to use the CoAP MAX_TRANSMIT_WAIT parameter to set a timer for how
long it shall stay awake since last sent message to the LwM2M Server. After MAX_TRANSMIT_WAIT seconds
without any messages from the LwM2M Server, the LwM2M Client enters a sleep mode.
3. At some point in time the LwM2M Client wakes up again and transmits a registration update message. Note: During
the time the LwM2M Client has been sleeping the IP address assigned to it may have been released and / or existing
NAT bindings may have been released. If this is the case, then the client needs to re-run the DTLS handshake with
the LwM2M Server since an IP address and/or port number change will destroy the existing security context. For
performance and efficiency reasons it is RECOMMENDED to utilize the DTLS session resumption.
4. When the LwM2M Server receives a message from the Client, it informs determines whether any messages need to
be sent to the LwM2M Client, as instructed by the application server.
Below is an example flow for Queue Mode in relation to Device Management & Service Enablement Interface.
LwM2M LwM2M
Client Server
POST /rd?ep=node12345&b=UQ
PUT /1/0/3
2.04 Changed
Figure 25: Example of Device Management & Service Enablement interface exchanges for Queue Mode
Below is an example flow for Queue Mode in relation to Information Reporting Interface
LwM2M LwM2M
Client Server
POST /rd?ep=node12345&b=UQ
2.01 Created Location: /rd/5a3f
Device Registration with
GET /5/0 Observe UDP with Queue Mode
and Observation Setting
Sends Notify
GET /3/0/0
Sends the queued
2.05 Content
Operations
After ACK_TIMEOUT with
no messages, the Client
goes Offline The Server queues the
Operations during Client
Offline
Client Offline
LWM2M
LWM2M Server
Client
POST /rd?ep=node12345
&b=UQS&SMS=12345678
Device Registration with
2.01 Created Location: /rd/5a3f UDP with Queue Mode
After ACK_TIMEOUT with and Observation Setting
no messages, the Client
goes Offline
Figure 27: Example of Device Management & Service Enablement interface exchanges for Queue Mode with SMS
Registration Update Trigger
4.05 Method Not Allowed Target is not allowed for “Write” operation
4.08 Request Entity Incomplete
4.13 Request entity too large
4.15 Unsupported content format The specified format is not supported
Delete 2.02 Deleted “Delete” operation is completed successfully
4.00 Bad Request Undetermined error occurred
4.01 Unauthorized Access Right Permission Denied
4.04 Not Found URI of “Delete” operation is not found
4.05 Method Not Allowed Target is not allowed for “Delete” operation
Execute 2.04 Changed “Execute” operation is completed successfully
4.00 Bad Request The LwM2M Server doesn‟t understand the
argument in the payload
4.01 Unauthorized Access Right Permission Denied
4.04 Not Found URI of “Execute” operation is not found
4.05 Method Not Allowed Target is not allowed for “Execute” operation
Write-Attributes 2.04 Changed “Write-Attributes” operation is completed
successfully
4.00 Bad Request The format of attribute to be written is different
4.01 Unauthorized Access Right Permission Denied
4.04 Not Found URI of “Write-Attributes” operation is not found
4.05 Method Not Allowed Target is not allowed for Write-Attributes operation
Discover 2.05 Content “Discover” operation is completed successfully
4.00 Bad Request Undetermined error occurred
4.01 Unauthorized Access Right Permission Denied
4.04 Not Found URI of “Discover” operation is not found
4.05 Method Not Allowed Target is not allowed for Discover operation
Information Reporting Interface
Observe 2.05 Content Operation is completed successfully
Cancel Observe 4.00 Bad Request Undetermined error occurred
4.01 Unauthorized Access Right Permission Denied
4.04 Not Found URI of Operation is not found or not supported
4.05 Method Not Allowed Target is not allowed for the Operation
4.06 Not Acceptable None of the preferred Content-Formats can be
returned
Notify 2.05 Content “Notify” operation is completed successfully
If any operation in Table 21, Table 24 and Table 25 cannot be completed in the client and the reason cannot be described by a
more specific response code, then a generic response code of “5.00 Internal Server Error” MUST be returned.
B.1.6 Security
Item Function Reference Requirement
LwM2M-SEC-001-C- Support of at least one Section 7.1 LwM2M-SEC-002-C-O OR LwM2M-
M key mode SEC-003-C-O OR LwM2M-SEC-004-C-O
OR LwM2M-SEC-004-C-O
LwM2M-SEC-002-C-O Support of Pre-Shared Section 7.1.7
Keys mode
LwM2M-SEC-003-C-O Support of Raw Public Section 7.1.8
Key Certificates mode
LwM2M-SEC-004-C-O Support of X.509 Section 7.1.9
Certificates mode
LwM2M-SEC-005-C-O Support of No Sec mode Section 7.1.10
LwM2M-SEC-006-C-O Support of UDP Channel Section 7.1
Security
LwM2M-SEC-007-C-O Support of Smartcard Section 7.1, LwM2M-SEC-009-C-O
B.1.7 Mechanism
Item Function Reference Requirement
LwM2M-MEC-001-C- Support of Queue Mode Section 8.3
O
LwM2M-MEC-002-C- Support of UDP Binding Section 8.6.1
M
LwM2M-MEC-003-C- Support of SMS Binding Section 8.6.2
O
B.1.8 Objects
Item Function Reference Requirement
LwM2M-OBJ-001-C-M Support of LwM2M Appendix E.1
Security Object
LwM2M-OBJ-002-C-M Support of LwM2M Appendix E.2
Server Object
LwM2M-OBJ-003-C-O Support of Access Appendix E.3
Control Object
LwM2M-OBJ-004-C-M Support of Device Appendix E.4
Object
LwM2M-OBJ-005-C-O Support of Connectivity Appendix E.5
Monitoring Object
LwM2M-OBJ-006-C-O Support of Firmware Appendix E.6
Update Object
LwM2M-OBJ-007-C-O Support of Location Appendix E.7
Object
LwM2M-OBJ-008-C-O Support of Connectivity Appendix E.8
Statistics Object
B.2.6 Security
Item Function Reference Requirement
LwM2M-SEC-002-S-M Support of Pre-Shared Section 7.1.7
Keys mode
LwM2M-SEC-003-S-M Support of Raw Public Section 7.1.8
Key Certificates mode
LwM2M-SEC-004-S-M Support of X.509 Section 7.1.9
Certificates mode
LwM2M-SEC-005-S-M Support of No Sec mode Section 7.1.10
LwM2M-SEC-006-S-M Support of UDP Channel Section 7.1
Security
B.2.7 Mechanism
Item Function Reference Requirement
LwM2M-MEC-001-S- Support of Queue Mode Section 8.3
M
LwM2M-MEC-002-S- Support of UDP Binding Section 8.6.1
M
LwM2M-MEC-003-S- Support of SMS Binding Section 8.6.2
O
B.2.8 Objects
Item Function Reference Requirement
LwM2M-OBJ-001-S-M Support of LwM2M Appendix E.1
Security Object
LwM2M-OBJ-002-S-M Support of LwM2M Appendix E.2
Server Object
LwM2M-OBJ-003-S-O Support of Access Appendix E.3
Control Object
LwM2M-OBJ-004-S-M Support of Device Appendix E.4
Object
LwM2M-OBJ-005-S-O Support of Connectivity Appendix E.5
Monitoring Object
LwM2M-OBJ-006-S-O Support of Firmware Appendix E.6
Update Object
LwM2M-OBJ-007-S-O Support of Location Appendix E.7
Object
LwM2M-OBJ-008-S-O Support of Connectivity Appendix E.8
Statistics Object
0 Res 0 lnk
0 Res 0
1 Res 1
1 Res 1
2 Res 2 0 Res 0
2 Res 2 lnk
1 Res 1
0 Res 0
2 Res 2 lnk
0 Res 01 Mask
1 Res 1
Instances: indicates whether this Resource supports multiple Resource Instances or not. If this field is
“Multiple” then the number of Resource Instance can be from 0 to many. If this field is “Single” then the
number of Resource Instance can be from 0 to 1. If the Resource field “Mandatory” is “Mandatory” and
the field “Instances” of the Resource is “Single” then, the number of Resource Instance MUST be 1.
Resource which supports “Execute” operation MUST have “Single” as value of the “Instances” field.
Mandatory: if this field is “Mandatory”, then any Instance of the Object that Resource belongs to, MUST
instantiate such a Resource (refer Section 6.1, Resource Model). If this field is “Optional”, then this
Resource MAY be omitted from some - or even all - Instances of the Object that Resource belongs to.
Type: Data Type indicates the type of Resource value. Data Types used in this enabler are described in
Appendix C Data Types. Resource which supports “Execute” operation MUST have no associated Data
Type (none) encoded as an empty value in Object DDF file.
Range or Enumeration: this field limits the value of Resource.
Units: specifies the unit of the Resource value.
Description: specifies the Resource description.
In addition to the object and resource definition tables, an object containing Executable Resource(s) is specified in third Table,
gathering the definition of the arguments of all the Executable Resources of that Object.
This table provides the properties of arguments
Executable Resource Arguments Definition
ID Resource Name Order Name Type Range Unit Description
or
Enum
[0:9] String Data If any If any
Types
Example of an Executable Resource Arguments Definition Table for an Object having 3 Executable Resource
1 argument
5 Delete 0 - none - -
EXECUTE /X/0/5 0
10 Create
Vendor Specific Objects (x label) – Objects defined by a vendor or individual, such an Object may be either private
(no DDF or Specification made available) or public.
Each one of these classes is assigned a range of IDs by OMNA.
The URN format for an Object is automatically built from the class of Object, the Object ID and potentially the Object
Version (see Section 6.2 Object Versioning) as follows:
urn:oma:lwm2m:{oma,ext,x}:{Object ID}[:{version}].
The following LwM2M Objects have been defined by OMA as part of LwM2M 1.0:
Object Object ID
LwM2M Security 0
LwM2M Server 1
Access Control 2
Device 3
Connectivity Monitoring 4
Firmware 5
Location 6
Connectivity Statistics 7
The LwM2M Server MUST support LwM2M Security, LwM2M Server, and Device Object and SHOULD support Access
Control, Device, Connectivity, Firmware Update, Location, and Connectivity Statistics Object.
Object definition
Name Object ID Instances Mandatory Object URN
Resource definitions
Range or
ID Name Operations Instances Mandatory Type Units Description
Enumeration
0 LwM2M Single Mandatory String 0-255 bytes Uniquely identifies the LwM2M Server or
Server URI LwM2M Bootstrap-Server. The format of
the CoAP URI is defined in Section 6 of
RFC 7252.
2 Security Mode Single Mandatory Integer 0-4 Determines which UDP payload security
mode is used
0: Pre-Shared Key mode
1: Raw Public Key mode
2: Certificate mode
3: NoSec mode
4: Certificate mode with EST
3 Public Key or Single Mandatory Opaque Stores the LwM2M Client‟s Certificate
Identity (Certificate mode), public key (RPK
mode) or PSK Identity (PSK mode). The
format is defined in Section E.1.1.
4 Server Public Single Mandatory Opaque Stores the LwM2M Server‟s or LwM2M
Key Bootstrap-Server‟s Certificate (Certificate
mode), public key (RPK mode). The
format is defined in Section E.1.1.
5 Secret Key Single Mandatory Opaque Stores the secret key or private key of the
security mode. The format of the keying
material is defined by the security mode in
Section E.1.1. This Resource MUST only
be changed by a bootstrap-server and
MUST NOT be readable by any server.
6 SMS Security Single Optional Integer 0-255 Determines which SMS security mode is
Mode used (see section 7.2)
0: Reserved for future use
1: DTLS mode (Device terminated) PSK
mode assumed
2: Secure Packet Structure mode
(Smartcard terminated)
3: NoSec mode
4: Reserved mode (DTLS mode with
multiplexing Security Association support)
5-203 : Reserved for future use
204-255: Proprietary modes
SMS Binding
7 Single Optional Opaque 6 bytes Stores the KIc, KID, SPI and TAR. The
Key
format is defined in Section E.1.2.
Parameters
Stores the values of the key(s) for the
8 SMS Binding Single Optional Opaque 16-32-48
SMS binding.
Secret Key(s) bytes
This resource MUST only be changed by
a bootstrap-server and MUST NOT be
readable by any server.
MSISDN used by the LwM2M Client to
9 LwM2M Single Optional String
send messages to the LwM2M Server via
Server SMS
the SMS binding.
Number
The LwM2M Client SHALL silently ignore
any SMS originated from unknown
MSISDN
10 Short Server Single Optional Integer 1-65534 This identifier uniquely identifies each
ID LwM2M Server configured for the LwM2M
Client.
This Resource MUST be set when the
Bootstrap-Server Resource has false
value.
Specific ID:0 and ID:65535 values MUST
NOT be used for identifying the LwM2M
Server (Section 6.3).
12 Bootstrap- Single Optional Integer s The LwM2M Client MUST purge the
Server LwM2M Bootstrap-Server Account after
Account the timeout value given by this resource.
Timeout The lowest timeout value is 1.
If the value is set to 0, or if this resource is
not instantiated, the Bootstrap-Server
Account lifetime is infinite.
E.1.3 Unbootstrapping
Unbootstrapping is the process of deleting a Security Object Instance. If a Security Object Instance is to be deleted, certain
related resources and configurations need to be deleted or modified. Therefore, when the Delete operation is sent via the
Bootstrap Interface, the Client MUST execute the following procedure.
1. If there is an Object Instance that can be accessed only by a Server of the Server Object Instance (i.e., the Server is
Access Control Owner and the LwM2M Server can access the Object Instance only in an Access Control Object
Instance), the Object Instance and the corresponding Access Control Object Instance MUST be deleted
2. If an Object Instance can be accessed by multiple Servers including the Server which Security Object Instance is to
be deleted, then:
The ACL Resource Instance for the Server in the Access Control Object Instance for the Object Instance
MUST be deleted
If the Server is the Access Control Owner of the Access Control Object Instance, then the Access
Control Owner MUST be changed to another Server according to the rules below:
The Client MUST choose the Server who has highest sum of each number assigned to an access right
(Write: 1, Delete: 1) for the Access Control Owner. If two or more Servers have the same sum, the
Client MUST choose one of them as the new Access Control Owner
3. Observation operations from the Server MUST be deleted
4. Server Object Instance MUST be deleted
5. Client MAY send “De-register” operation to the Server
Note: To monitor the change of the Access Control Owner, the Server MAY observe Access Control Owner Resource.
Object definition
Name Object ID Instances Mandatory Object URN
Resource definitions
Range or
ID Name Operations Instances Mandatory Type Units Description
Enumeration
0 Short Server R Single Mandatory Integer 1-65535 Used as link to associate server Object
ID Instance.
2 Default RW Single Optional Integer s The default value the LwM2M Client
Minimum should use for the Minimum Period of
Period an Observation in the absence of this
parameter being included in an
Observation.
If this Resource doesn‟t exist, the
default value is 0.
3 Default RW Single Optional Integer s The default value the LwM2M Client
Maximum should use for the Maximum Period of
Period an Observation in the absence of this
parameter being included in an
Observation.
5 Disable RW Single Optional Integer s A period to disable the Server. After this
Timeout period, the LwM2M Client MUST
perform registration process to the
Server. If this Resource is not set, a
default timeout value is 86400 (1 day).
6 Notification RW Single Mandatory Boolean If true, the LwM2M Client stores “Notify”
Storing When operations to the LwM2M Server while
Disabled or the LwM2M Server account is disabled
Offline or the LwM2M Client is offline. After the
LwM2M Server account is enabled or
the LwM2M Client is online, the LwM2M
Client reports the stored “Notify”
operations to the Server.
If false, the LwM2M Client discards all
the “Notify” operations or temporarily
disables the Observe function while the
LwM2M Server is disabled or the
LwM2M Client is offline.
The default value is true.
The maximum number of storing
Notifications per Server is up to the
implementation.
7 Binding RW Single Mandatory String The possible This Resource defines the transport
values of binding configured for the LwM2M
Resource are Client.
listed in 5.3.1.1 If the LwM2M Client supports the
binding specified in this Resource, the
LwM2M Client MUST use that transport
for the Current Binding Mode.
Object definition
Name Object ID Instances Mandatory Object URN
Resource definitions
Range or
ID Name Operations Instances Mandatory Type Units Description
Enumeration
0 Object ID R Single Mandatory Integer 1-65534 The Object ID and The Object Instance ID
are applied for.
1 Object R Single Mandatory Integer 0-65535 See Table 20: LwM2M Identifiers.
Instance
ID
2 ACL RW Multiple Optional Integer 16-bit The Resource Instance ID MUST be the
Short Server ID of a certain LwM2M Server
for which associated access rights are
contained in the Resource Instance value.
The Resource Instance ID 0 is a specific ID,
determining the ACL Instance which contains
the default access rights.
Each bit set in the Resource Instance value,
grants an access right to the LwM2M Server
to the corresponding operation.
The bit order is specified as below.
1st LSB: R(Read, Observe, Discover, Write-
Attributes)
2nd LSB: W(Write)
3rd LSB: E(Execute)
4th LSB: D(Delete)
5th LSB: C(Create)
Other bits are reserved for future use.
3 Access RW Single Mandatory Integer 0-65535 Short Server ID of a certain LwM2M Server;
Control only such an LwM2M Server can manage
Owner the Resources of this Object Instance.
The specific value MAX_ID=65535 means
this Access Control Object Instance is
created and modified during a Bootstrap
phase only.
Object definition
Name Object ID Instances Mandatory Object URN
Resource definitions
Range or
ID Name Operations Instances Mandatory Type Units Description
Enumeration
0 Manufacturer R Single Optional String Human readable manufacturer name
1 Model R Single Optional String A model identifier (manufacturer specified
Number string)
2 Serial R Single Optional String Serial Number
Number
3 Firmware R Single Optional String Current firmware version of the Device.
Version The Firmware Management function could
rely on this resource.
4 Reboot E Single Mandatory Reboot the LwM2M Device to restore the
Device from unexpected firmware failure.
5 Factory E Single Optional Perform factory reset of the LwM2M
Reset Device to make the LwM2M Device to go
through initial deployment sequence where
provisioning and bootstrap sequence is
performed. This requires client ensuring
post factory reset to have minimal
information to allow it to carry out one of
the bootstrap methods specified in section
5.2.3.
When this Resource is executed, “De-
register” operation MAY be sent to the
LwM2M Server(s) before factory reset of
the LwM2M Device.
6 Available R Multiple Optional Integer 0-7 0 – DC power
Power 1 – Internal Battery
Sources 2 – External Battery
4 – Power over Ethernet
5 – USB
6 – AC (Mains) power
7 – Solar
7 Power R Multiple Optional Integer mV Present voltage for each Available Power
Source Sources Resource Instance.
Voltage
8 Power R Multiple Optional Integer mA Present current for each Available Power
Source Source.
Current
9 Battery Level R Single Optional Integer 0-100 % Contains the current battery level as a
percentage (with a range from 0 to 100).
This value is only valid for the Device
Internal Battery if present (one Available
Power Sources Resource Instance is 1).
10 Memory Free R Single Optional Integer KB Estimated current available amount of
storage space which can store data and
software in the LwM2M Device (expressed
in kilobytes).
11 Error Code R Multiple Mandatory Integer 0-8 0=No error
1=Low battery power
2=External power supply off
3=GPS module failure
4=Low received signal strength
5=Out of memory
6=SMS failure
7=IP connectivity failure
8=Peripheral malfunction
16 Supported R Single Mandatory String Indicates which bindings and modes are
Binding and supported in the LwM2M Client. The
Modes possible values of Resource are
combination of "U" or "UQ" and "S" or
"SQ".
17 Device Type R Single Optional String Type of the device (manufacturer specified
string: e.g., smart meters / dev Class…)
18 Hardware R Single Optional String Current hardware version of the device
Version
19 Software R Single Optional String Current software version of the device
Version (manufacturer specified string). On
elaborated LwM2M device, SW could be
split in 2 parts: a firmware one and a
higher level software on top.
Both pieces of Software are together
managed by LwM2M Firmware Update
Object (Object ID 5)
Status
2 Charge The
Complete battery is
fully
charged
and still on
power.
Object definition
Name Object ID Instances Mandatory Object URN
Resource definitions
Range or
ID Name Operations Instances Mandatory Type Units Description
Enumeration
0 Network R Single Mandatory Integer Indicates the network bearer used for the
Bearer current LwM2M communication session from
the below network bearer list.
0~20 are Cellular Bearers
0: GSM cellular network
1: TD-SCDMA cellular network
2: WCDMA cellular network
3: CDMA2000 cellular network
4: WiMAX cellular network
5: LTE-TDD cellular network
6: LTE-FDD cellular network
7~20: Reserved for other type cellular
network
21~40 are Wireless Bearers
21: WLAN network
22: Bluetooth network
23: IEEE 802.15.4 network
24~40: Reserved for other type local wireless
network
41~50 are Wireline Bearers
41: Ethernet
42: DSL
43: PLC
44~50: reserved for others type wireline
networks.
2 Radio R Single Mandatory Integer dBm This node contains the average value of the
Signal received signal strength indication used in the
Strength current network bearer (as indicated by
Resource 0 of this Object). For more details
on Network Measurement Report, refer to the
appropriate Cellular or Wireless Network
standards. (e.g., for LTE Cellular Network
refer to ETSI TS 36.133 specification).
3 Link Quality R Single Optional Integer This contains received link quality e.g., LQI
for IEEE 802.15.4, (Range (0..255)), RxQual
Downlink (for GSM range is 0…7).
Refer to [3GPP 44.018] for more details on
Network Measurement Report encoding.
6 Link R Single Optional Integer 0-100 % The average utilization of the link to the next-
Utilization hop IP router in %.
7 APN R Multiple Optional String Access Point Name in case Network Bearer
Resource is a Cellular Network.
The envisioned functionality with LwM2M version 1.0 is to allow a LwM2M Client to connect to any LwM2M version
1.0 compliant Server to obtain a firmware imagine using the object and resource structure defined in this section
experiencing communication security protection using DTLS. There are, however, other design decisions that need to be
taken into account to allow a manufacturer of a device to securely install firmware on a device. Examples for such design
decisions are how to manage the firmware update repository at the server side (which may include user interface
considerations), the techniques to provide additional application layer security protection of the firmware image, how
many versions of firmware imagines to store on the device, and how to execute the firmware update process considering
the hardware specific details of a given IoT hardware product. These aspects are considered to be outside the scope of the
LwM2M version 1.0 specification.
A LwM2M Server may also instruct a LwM2M Client to fetch a firmware image from a dedicated server (instead of
pushing firmware imagines to the LwM2M Client). The Package URI resource is contained in the Firmware object and
can be used for this purpose.
A LwM2M Client MUST support block-wise transfer [CoAP_Blockwise] if it implements the Firmware Update object.
A LwM2M Server MUST support block-wise transfer. Other protocols, such as HTTP/HTTPs, MAY also be used for
downloading firmware updates (via the Package URI resource). For constrained devices it is, however, RECOMMENDED
to use CoAP for firmware downloads to avoid the need for additional protocol implementations.
Object definition
Name Object ID Instances Mandatory Object URN
Resource definitions
Range or
ID Name Operations Instances Mandatory Type Units Description
Enumeration
1 Package RW Single Mandatory String 0-255 bytes URI from where the device can download
URI the firmware package by an alternative
mechanism. As soon the device has
received the Package URI it performs the
download at the next practical opportunity.
The URI format is defined in RFC 3986. For
example, coaps://example.org/firmware is a
syntactically valid URI. The URI scheme
determines the protocol to be used. For
CoAP this endpoint MAY be a LwM2M
Server but does not necessarily need to be.
A CoAP server implementing block-wise
transfer is sufficient as a server hosting a
firmware repository and the expectation is
that this server merely serves as a separate
file server making firmware images
available to LwM2M Clients.
6 PkgName R Single Optional String 0-255 bytes Name of the Firmware Package
7 PkgVersion R Single Optional String 0-255 bytes Version of the Firmware package
8 Firmware R Multiple Optional Integer This resource indicates what protocols the
Update LwM2M Client implements to retrieve
Protocol firmware images. The LwM2M server uses
Support this information to decide what URI to
include in the Package URI. A LwM2M
Server MUST NOT include a URI in the
Package URI object that uses a protocol
that is unsupported by the LwM2M client.
For example, if a LwM2M client indicates
that it supports CoAP and CoAPS then a
LwM2M Server must not provide an HTTP
URI in the Packet URI.
The following values are defined by this
version of the specification:
0 – CoAP (as defined in RFC 7252) with the
additional support for block-wise transfer.
CoAP is the default setting.
1 – CoAPS (as defined in RFC 7252) with
the additional support for block-wise
transfer
2 – HTTP 1.1 (as defined in RFC 7230)
3 – HTTPS 1.1 (as defined in RFC 7230)
Additional values MAY be defined in the
future. Any value not understood by the
LwM2M Server MUST be ignored.
9 Firmware R Single Mandatory Integer The LwM2M Client uses this resource to
Update indicate its support for transferring firmware
Delivery images to the client either via the Package
Method Resource (=push) or via the Package URI
Resource (=pull) mechanism.
0 – Pull only
1 – Push only
2 – Both. In this case the LwM2M Server
MAY choose the preferred mechanism for
conveying the firmware image to the
LwM2M Client.
E.6.2 Examples
The example depicted in Figure 30 illustrates a successful message exchange where a LwM2M Server pushes a firmware
image to a LwM2M Client using the block-wise transfer. In this example the LwM2M Server indicates a block size of 128
bytes and the firmware image of 80 KiB (=81920 bytes) will be sent to the LwM2M Client in 640 messages with each 128
bytes payload. Since the LwM2M Server-provided block size matches the preferences of the LwM2M Client the exchange
proceeds until the full firmware image is downloaded. In this example, no messages are lost during transmission.
LwM2M LwM2M
Server Client
| |
| CON [MID=1], POST, /5/0/0, 1:0/1/128 ------> |
| |
| <------ ACK [MID=1], 2.31 Continue, 1:0/1/128 |
| |
| CON [MID=2], POST, /5/0/0, 1:1/1/128 ------> |
| |
| <------ ACK [MID=2], 2.31 Continue, 1:1/1/128 |
| |
| ... 637 exchanges ... |
| |
| CON [MID=640], POST, /5/0/0, 1:639/0/128 ------> |
| |
| <------ ACK [MID=640], 2.04 Changed, 1:639/0/128 |
| |
Figure 30: Example of a LwM2M Server pushing a firmware image to a LwM2M client
The second example shown in Figure 31 illustrates the case where the client was provided with a URI by the LwM2M
Server (using the Package URI resource) and therefore fetches the firmware image from the indicated server. Note that
only the retrieval of the firmware image from the LwM2M Server is shown in Figure 31 and not the initial configuration
of the Package URI.
LwM2M LwM2M
Client Server
| |
| CON [MID=1], GET, /firmware ------> |
| |
| <------ ACK [MID=1], 2.05 Content, 2:0/1/128 |
| |
| CON [MID=2], GET, /firmware, 2:1/0/128 ------> |
| |
| <------ ACK [MID=2], 2.05 Content, 2:1/1/128 |
| |
| ... 637 exchanges ... |
| |
| CON [MID=640], GET, /firmware, 2:639/0/128 ------>|
| |
| <------ ACK [MID=640], 2.05 Content, 2:639/0/128 |
| |
Figure 31: Example of a client fetching a firmware image
Object definition
Name Object ID Instances Mandatory Object URN
Resource definitions
Range or
ID Name Operations Instances Mandatory Type Units Description
Enumeration
0 Latitude R Single Mandatory Float Deg The decimal notation of latitude, e.g., -
43.5723 [World Geodetic System 1984].
1 Longitude R Single Mandatory Float Deg The decimal notation of longitude, e.g.,
153.21760 [World Geodetic System
1984].
6 Speed R Single Optional Float Meters Speed is the time rate of change in
per position of a LwM2M Client without
second regard for direction: the scalar
component of velocity.
Object definition
Name Object ID Instances Mandatory Object URN
Resource definitions
Range or
ID Name Operations Instances Mandatory Type Units Description
Enumeration
2 Tx Data R Single Optional Integer Kilo- Indicate the total amount of data transmitted
Bytes during the collection period.
3 Rx Data R Single Optional Integer Kilo- Indicate the total amount of data received
Bytes during the collection period.
4 Max R Single Optional Integer Byte The maximum message size that is used
Message during the collection period.
Size
5 Average R Single Optional Integer Byte The average message size that is used
Message during the collection period.
Size
8 Collection RW Single Optional Integer Seconds The default collection period in seconds.
Period The value 0 indicates that the collection
period is not set.
0 89: SEQUENCE {
2 19: SEQUENCE {
4 7: OBJECT IDENTIFIER ecPublicKey (1 2 840 10045 2 1)
13 8: OBJECT IDENTIFIER prime256v1 (1 2 840 10045 3 1 7)
: }
23 66: BIT STRING
: 04 A0 9D CB 1B C7 39 E7 F1 9A FA 9A DC B1 94 49
: 68 BF BA 73 EF CE C2 9B 50 48 6E B4 4D 1B 29 C1
: 93 44 99 70 A3 73 68 30 CB 2B D5 D7 EC 05 D2 BD
: 1F C0 7B 6D F5 E4 8B 54 CE 77 A6 A7 22 9C 3A 91
: C2
: }
Default 3 6000
Maximum Period
DisableTimeout 5 86400
Notification 6 True
Storing When
Disabled or
Offline
Binding 7 U UDP binding preference
Preference
Table 33: LwM2M Server Object [0]
DF-Telecom EFDIR
„7F10‟ „2F00‟
ADF
USIM EF ODF
ADF
PKCS#15 EF DODF-bootstrap
EF LwM2M_Bootstrap
Access Conditions:
READ ALW
UPDATE ADM
INVALIDATE ADM
REHABILITATE ADM
Description
See [PKCS#15]
Access Conditions:
READ ALW
or Universal / application / Local PIN (UICC, See Appendix G.2)
UPDATE ADM
INVALIDATE ADM
REHABILITATE ADM
Description
G.3.3 EF LwM2M_Bootstrap
Only the card issuer can modify EF LwM2M_Bootstrap
Access Conditions:
READ ALW
or Universal / application / Local PIN (UICC, See Appendix G.2)
UPDATE ADM
INVALIDATE ADM
REHABILITATE ADM
Description
This file size is limited to 32KB; the effective file size, in Bytes, is accessible from the File header.
In this file, the Bootstrap data relies on LwM2M TLV Data format specification.
The LwM2M specification already describes the TLV format for coding multiples instances and Resources of a given Object
(§6.4.3), this section will only detailed how to store a collection of LwM2M Objects in this EF LwM2M_Bootstrap file; each
Object is coded with a header containing a LwM2M Object ID and its Object Version coded in one or 2 Bytes, a LwM2M-
TLV coding the Object Instances as payload, and a length being the size in bytes of this payload (LwM2M-TLV of the
Object Instances).
Additionally, this Bootstrap data will have a 2 Byte header indicating the number of Objects contained in that file and another
2 Bytes for indicating the size of the full payload (size of the collection of LwM2M Objects).
Using a BNF-like description:
<bootstrap_data> ::= <number of objects> <size> <collection_of_lwm2m_objects>
<number of Objects> ::= HWORD
<size> ::= HWORD
<collection_of_lwm2m_objects> ::= <single_lwm2m_object>*
<single_lwm2m_object> ::= <lwm2m_object_ID> <object_version> <length_of_object>
<lwm2m_object_instances>
<lwm2m_object_ID> ::= HWORD
<object_version> ::= IMPLICIT_VERSION | <other_version>
<other_version> ::= MAJOR_VERSION MINOR_VERSION ; value %x0205 means version
2.5
<length_of_object> ::= HWORD
<lwm2m_object_instances> ::= TLV data format as described in §147138816.6.4.3
HWORD ::= %x00-FFFF
IMPLICIT_VERSION ::= %x00 ; means version 1.0 or the Object is defined in
the LwM2M Enabler
MAJOR_VERSION ::= %x01-FF
MINOR VERSION ::= %x00-FF
In reading and processing the data of this file, the LwM2M Client is then able to be configured with the Bootstrap
Information and thus to access the LwM2M Server(s).
KEY_ENC KEY_ENC
KEY_MAC KEY_MAC
KEY_DEK KEY_DEK
Select AID / Bootstrap Transfer Appli
INITIALIZE_UPDATE
Initialize Update RESP
Bootstrap
Information
Figure 33: Bootstrap Information transfer from Smartcard to LwM2M Device using Secure channel according to
[GLOBALPLATFORM] [GP SCP03] [GP AMD_A]
Note 1: The INITIALIZE_UPDATE specifies the logical channel to use (CLA: 80H / 83H)
Note 2: The security level (P1) of the EXTERNAL_AUTH command is C-DECRYPTION, R-ENCRYPTION, C-MAC and
R-MAC (P1=0x33)
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="LWM2M">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="Object">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element name="Description1" type="xs:string" />
<xs:element name="ObjectID" type="xs:unsignedShort" />
<xs:element name="ObjectURN" type="xs:string" />
<xs:element name="LWM2MVersion" type="xs:string" minOccurs="0"/>
<xs:element name="ObjectVersion" type="xs:string" minOccurs="0"/>
<xs:element name="MultipleInstances" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Multiple"/>
<xs:enumeration value="Single"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Mandatory" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Mandatory"/>
<xs:enumeration value="Optional"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Resources">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Item">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element name="Operations" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="R"/>
<xs:enumeration value="W"/>
<xs:enumeration value="RW"/>
<xs:enumeration value="E"/>
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="MultipleInstances" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Multiple"/>
<xs:enumeration value="Single"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Mandatory" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Mandatory"/>
<xs:enumeration value="Optional"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Type" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="String"/>
<xs:enumeration value="Integer"/>
<xs:enumeration value="Float"/>
<xs:enumeration value="Boolean"/>
<xs:enumeration value="Opaque"/>
<xs:enumeration value="Time"/>
<xs:enumeration value="Objlnk"/>
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="RangeEnumeration" type="xs:string" />
<xs:element name="Units" type="xs:string" />
<xs:element name="Description" type="xs:string" />
</xs:sequence>
<xs:attribute name="ID" type="xs:unsignedShort" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Description2" type="xs:string" />
</xs:sequence>
<xs:attribute name="ObjectType" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>