A.5 Protocols
A.5.1 Protocol Stack
The LWM2M has the protocol stack defined as below.
Figure A.5.1-1: LWM2M Protocol Stack
- LWM2M Objects: LWM2M Objects are designed for the functionality provided by the LWM2M enabler. The LWM2M specification [i.4] defines a set of Standard Objects. Other Objects may also be added by OMA, external SDOs (e.g. the IPSO alliance) or vendors to enable certain M2M Services.
- LWM2M Protocol: LWM2M protocol defines the logical operations and mechanisms per each interface.
- CoAP: The LWM2M utilizes the IETF Constrained Application Protocol [i.2] as an underlying transfer protocol across UDP and SMS bearers. This protocol defines the message header, request/response codes, message options and retransmission mechanisms. The LWM2M only uses the subset of features defined in CoAP.
- DTLS: DTLS [i.3] is used to provide secure UDP/SMS on-device channels between the LWM2M Server and the LWM2M Client for all the messages interchanged.
- UDP Binding with CoAP (Mandatory): Reliability over the UDP transport is provided by the built-in retransmission mechanisms of CoAP.
- SMS Binding with CoAP (Optional): CoAP is used over SMS by placing a CoAP message in the SMS payload using 8-bit encoding.
A.5.2 Data Model
In the LWM2M Enabler technical specification [i.4], a simple data model is described. Basically, a resource made available by data model of the LWM2M Client is a Resource, and Resources are logically organized into Objects. Figure A.5.2-1 illustrates this structure, and the relationship between Resources, Objects, and the LWM2M Client. The LWM2M Client may have any number of Resources, each of which belongs to an Object.
Figure A.5.2-1: LWM2M Data Model [3]
Resources are defined per Object, and each resource is given a unique identifier within that Object. Each Resource is designed to have one or more Operations that it supports. A Resource may be a single or multiple (possibility of several instantiations) one, dependent on the Resource definition in Object specification. An Object defines a grouping of Resources, for example the Firmware Object contains all the Resources used for firmware update purposes. The LWM2M enabler defines standard Objects and Resources and other Objects may be added to enable a certain M2M Services.
Object needs to be instantiated either by the LWM2M Server or the LWM2M Client, which is called Object Instance, before using the functionality of an Object. After Object Instance is created, the LWM2M Server can access that Object Instance and Resources in the Object Instance. Furthermore a Resource can contain a simple value (e.g. sensor measure), or a reference to an Object Instance.
A.5.3 Interface Descriptions
A.5.3.1 Bootstrap
The Bootstrap interface is used to provision essential information into the LWM2M Client in order to allow the LWM2M Client to be able to register to a certain LWM2M Server. There are four modes for bootstrapping:
- Factory Bootstrap: the LWM2M Client is already provisioned at the time of the device manufacture. The pre-configured data is stored in the LWM2M Client.
- Bootstrap from Smartcard: When the Device supports a Smartcard and retrieval of bootstrap message from Smartcard is successful, the LWM2M Client processes the bootstrap message from the Smartcard and applies it to the LWM2M Client.
- Client initiated Bootstrap: the LWM2M Client requests and retrieves the bootstrap message from a LWM2M Bootstrap Server. In this case the LWM2M Client needs to be pre-provisioned with the LWM2M Bootstrap Server Bootstrap Information.
- Server initiated Bootstrap: the LWM2M Bootstrap Server provisions the bootstrap message into the LWM2M Client after recognizing the existence of the LWM2M Device. In this case the LWM2M Client needs to be pre-provisioned with the LWM2M Bootstrap Server Bootstrap Information.
Figure A.5.3.1-1: Bootstrap Modes
A.5.3.2 Client Registration
The Client Registration interface is used by the LWM2M Client to register with one or more LWM2M Servers, maintain each registration, and de-register from the LWM2M Server(s). When registering, the LWM2M Client indicates its Endpoint Name, MSISDN, supporting binding modes, lifetime of registration, the list of Objects the Client supports and available Object Instances. The registration is a soft state, with a lifetime indicated by the registration lifetime. The LWM2M Client periodically performs an update of its registration information to the registered Server(s). If the lifetime of a registration expires without receiving an update from the Client, the Server removes the registration information. Finally, when shutting down or discontinuing use of a Server, the Client performs de-registration.
Figure A.5.3.2-1: Example of Registration Procedure
A.5.3.3 Device Management and Service Enablement
This interface is used by the LWM2M Server to access Resources available from a LWM2M Client using Create, Read, Write, Delete, or Execute operations. The operations that a Resource supports are defined in the definition of its Object.
Figure A.5.3.3-1: Example of Device Management and Service Enablement Interface
A.5.3.4 Information Reporting
This interface is used by the LWM2M Server to observe any changes in a Resource on the LWM2M Client, receiving notifications when new values are available. The LWM2M Server needs to configure observation related parameters by sending "Write Attribute" operation before observing Resources in the LWM2M Client. This observation relationship is initiated by sending an "Observe" operation to the L2M2M Client for an Object Instance or Resource. An observation ends when a "Cancel Observation" operation is performed
Figure A.5.3.4-1: Example of Information Reporting Interface