Skip to content

6.3 LWM2M Object Discovery

6.3.1 Introduction

The LWM2M Client uses the Registration Interface to provide the properties required by the LWM2M Server of the IPE to contact the LWM2M Client (e.g. Endpoint Name) and to maintain the session between these two LWM2M entities (e.g. Lifetime, Queue Mode).In addition, the LWM2M Client also provides the knowledge of the supported Objects and existing Object Instances across the Registration Interface.

The LWM2M IPE uses the information exchange across this interface to synchronize which LWM2M Objects supported by the LWM2M Endpoint and what is defined in the hosting CSE for the M2M Application representing the LWM2M Endpoint. This clause specifies how discovered LWM2M Objects identifiers are translated to discoverable oneM2M resources along with the associated linkages to other oneM2M resources.

6.3.2 LWM2M Object Identifier Representation

6.3.2.1 Introduction

Through the Registration Interface, the LWM2M Client provides the list of supported LWM2M Objects and existing LWM2M Object Instances. Each element of the list is described by its path, which can be the path of an Object or an Object Instance.

For example the LWM2M Client could provide the following list of paths: </1/0>, </1/1>, </2/0>, </2/1>, </3/0>, </4/0>, </5>. This list of paths is a valid list of LWM2M Objects and LWM2M Object Instances in the CoRE Link Format [RFC6690], specifying that LWM2M Objects with OMNA Identifiers 1, 2, 3,4, and 5 are supported. The respective OMNA references are : urn:oma:lwm2m:oma:1, urn:oma:lwm2m:oma:2, urn:oma:lwm2m:oma:3, urn:oma:lwm2m:oma:4, urn:oma:lwm2m:oma:5.

Additionally, information is provided that LWM2M Object 1 (Server Object) and LWM2M Object 2 (Access Control Object) have 2 instances (Instance Identifiers 0 and 1); LWM2M Object 3 (Device Object) and LWM2M Object 4 (Connectivity Monitoring Object) have 1 instance each (0); LWM2M Object 5 is supported but no instance has been created yet for that LWM2M Object.

Optionally other information can be carried by that list as the capability for all the Objects in the LWM2M Client to support:

  • an alternate root path (default root path is '/');
  • a specific Content-Format (e.g. LWM2M JSON Content-Format).

For discovery of LWM2M Objects by M2M Applications, the properties carried by LWM2M Objects list (i.e. technology, Objects and LWM2M Object Instances Identifiers, optional alternate rootpath, supported Content-Format) shall be translated into the labels attribute of the Content Sharing Resource as separate entries with the following format:

  • Iwked-Technology:LWM2M
  • Iwked-Entity-Type:Resource Type
  • LWM2M-PATH:Resource Root Path (for LWM2M default rootpath is "/").
  • Iwked-Entity-ID:Resource Path Object Identifier and Instance Identifier.
  • Iwked-Content-Type: Supported Content Format (LWM2M default Supported ContentFormat is LWM2M TLV other can be LWM2M JSON).

For the case where LWM2M Objects are represented as <mgmtObj> resources in the M2M Service Layer, the properties carried by the LWM2M Objects list shall be translated into the labels attribute of the <node> resource using the above format.

For example if the LWM2M Endpoint provided the following LWM2M Objects as part of the Client Registration Interface: </lwm2m>;rt="oma.lwm2m";ct=LWM2M+JSON,</1/0> would translate into a <container> resource with the following entries in the labels attribute: Iwked-Technology:LWM2M Iwked-Entity-Type:"urn:oma:lwm2m:oma:1" LWM2MPTH:"/lwm2m" Iwked-Entity-ID: "/1/0" Iwked-Content-Type:LWM2M+JSON (see note).

Note

LWM2M+JSON is an entry (numerical ID) in the CoAP Content-Format Registry representing the media-type "application/vnd.oma.lwm2m+json" used in LWM2M TS 1.0 enabler and currently engaged in the IANA registration process.

The CoAP Resource Type may also be used as the semantic ontology of the <container> resource by inserting this value in the ontologyRef attribute of the <container> or other translated oneM2M resource.

For the case where LWM2M Objects are represented as <mgmtObj> resources in the M2M Service Layer, the IPE shall use information carried in the LWM2M Objects list to configure not only the labels and description attributes but also the objectID and objectPath attributes of the <mgmtObj> resources since objectID and objectPath can also be helpful for discovery of the supported LWM2M Objects. For the case that 1:1 mapping of LWM2M Object to oneM2M <mgmtObj> is desired, the objectIDs attribute shall contain the URN of the corresponding LWM2M Object and the mgmtSchema attribute shall contain a URI of the schema file for the new <mgmtObj> specialization as outlined in Clause 6.7 of TS-0005 [4].

LWM2M Object Resources are identified by their URI within the context of the LWM2M Endpoint described in clause 6.2.1 of the LWM2M Technical Specification [3].

As the LWM2M Endpoint is represented as an <AE> resource and a LWM2M Object is represented as a oneM2M resource in the M2M Service Layer, a reference shall be made between the <AE> resource that represents the LWM2M Endpoint and the oneM2M resource which represent the list of LWM2M Objects and Object Instances available in the LWM2M Client.

For the case where a LWM2M Object is represented as a <mgmtObj> resource, this reference is already provided by the AE's nodeLink attribute.

In addition, oneM2M resources that represents the LWM2M Object or LWM2M Object Instance uses the Hierarchical and Non-Hierarchical mechanisms for Resource Addressing as defined in clause 9.3.1 of oneM2M TS0001 [2] where the resourceName attribute of the Content Sharing or oneM2M resource shall be the value of the LWM2MURI. All characters that are not in the unreserved character set defined in clause 2.3 of the of IETF RFC 3986 [6] shall be percent encoded as defined in clause 2.1 of the same IETF RFC, specifically the forward slash (/) character.

For example if the LWM2MURI is "/1/0 and the LWM2MPTH is "/" then the resourceName attribute of the oneM2M resource could be "%2F1%2F0".

For the case where <mgmtObj> resources are used, the "/1/0" LWM2MURI is mapped to the <mgmtObj>'s objectPath attribute. All characters that are not in the unreserved character set shall be percent encoded as well.

6.3.2.2 Void

6.3.2.3 LWM2M Object Lifecycle

LWM2M Endpoint's are discovered when the LWM2M Client is successfully registers with the LWM2M Server using the LWM2M Register operation. In addition to the LWM2M Register operation, the LWM2M Client can periodically refresh the LWM2M Client's registration with the LWM2M IPE using the LWM2M Update operation. Finally a LWM2M Client can deregister when the LWM2M Client issues a De-register operation to the LWM2M IPE or the LWM2M Client's registration lifetime expires.

The LWM2M Client Registration interface's operations and the registration lifetime expiration event maps to the following operations on the resource.

Table 6.3.2.3-1: LWM2M Object Lifecycle Translation - Client Registration Interface

LWM2M Operation
Client Registration Interface
oneM2M Resource and Operation
Register create <container>, oneM2M resource
Update update <container> , delete <container>, oneM2M resource
De-register delete <container>, oneM2M resource

Table 6.3.2.3-2: LWM2M Object Lifecycle Translation - LWM2M Server Events

LWM2M Server Events oneM2M Resource and Operation
Client lifetime expiration delete <container>, oneM2M resource

Table 6.3.2.3-3: LWM2M Object Lifecycle Attribute Translation

LWM2M Attributes
Client Registration Interface
oneM2M Resource Attribute
Endpoint Client Name Not Applicable
Resource Links <container>, oneM2M resource resourceName
Lifetime <container> , oneM2M resource expirationTime
LWM2M Version Not Applicable
Binding Mode Not Applicable
SMS Number Not Applicable

Table 6.2.2.3-4: LWM2M Object Lifecycle Response Code Translation

LWM2M Errors
Client Registration Interface
oneM2M Resource Operation Response
Register
2.01 Created:
4.00 Bad Request
4.03 Forbidden
create <container>
2001 Created
All other codes
4105 Conflict
Update
2.04 Changed
4.00 Bad Request
4.04 Not Found
update <container>
2004 Changed
All other codes
4000 Not Found
De-register
2.02 Deleted
4.04 Not Found
delete <container>
2002 Deleted
4004 Not Found