Skip to content

6.4 LWM2M Object Transport and Interworking

6.4.1 Introduction

When an oneM2M request is addressed from a CSE/AE to a hosting CSE containing the representation of a LWM2M Client, the oneM2M response to the Originator of the request is returned through the cooperation of the hosting CSE and the IPE.

The LWM2M Client uses the Device Management & Service Enablement interface to provide the capabilities for the LWM2M Server of the IPE to access LWM2M Objects, Objects Instances and Resources available from the LWM2M Client.

A hosting CSE maintains a representation of the LWM2M Data Model of LWM2M Object, Object Instance or Resources as instances of oneM2M resource types. These Content Sharing Resources are instantiated and registered as described in clause 6.3 allowing oneM2M AEs and CSEs to exchange data with LWM2M Clients.

In reference to clause 6.3, at the end of the registration phase all declared LWM2M Object Instances and LWM2M Objects are associated to a Content Sharing Resource created with the resourceName attribute set accordingly to the proper LWM2M Object Instance path (e.g. /9/1) or to the LWM2M Object path (e.g. /9).

6.4.2 LWM2M Interworking Mechanisms

6.4.2.1 Introduction

Cooperation between IPE and the oneM2M hosting CSE requires efficient mechanisms to maintain the latest state of the targeted LWM2M Objects, Object Instances and Resources. These mechanisms include data synchronization between the IPE and hosting CSE.

Data synchronization relies on the oneM2M Subscription/Notification and LWM2M Observation/Notification mechanisms. For automated data synchronization between the IPE and hosting CSE to be achieved, the solution shall be granular enough to allow data synchronization for each LWM2M Object Instance.

Access Control mechanisms relies on an interworking between oneM2M and LWM2M Access Control Policies.

LWM2M and oneM2M mechanisms used to achieve Data Synchronization and Access Control is specified in more details in clauses 6.5 and 6.6.

These following sub-clauses specify the sequences of operations involved for each type of supported oneM2M requests following the general procedures specified in clause 10 (CREATE,RETRIEVE, DELETE) as used within the context of the interworking for the present document

6.4.2.2 Relevant Interworked Resource Settings

A LWM2M Object Instance that is represented in oneM2M as a <container> resource has 2 direct children resource types: a <subscription> resource and a <contentInstance> resource when used with a <container> resource.

A LWM2M Object Instance that is represented in oneM2M as a <mgmtObj> resource may have 1 direct child resource of type <subscription>.

For supporting the LWM2M interworking process, a few attributes for the <container> resource and the <subscription> resource shall have a specified set of parameters.

a) Attributes of <container> resource

Table 6.4.2.2-1: <container> resource - Relevant Interworked Attributes

Attributes of <container> resource Value
accessControlPolicyIDs ACP set (see Clause 6.6)
maxNrOfInstances 1

b) Child resource types of <container> resource

Table 6.4.2.2-2: <container> resource - Relevant Child resource types

Child resources of <container> resource
<contentInstance> resource
<subscription> resource

c) Attributes of <subscription> resource

Table 6.4.2.2-3: <subscription> resource - Relevant Interworked Attributes

Attributes of <subscription> resource Description / Value
notificationURI IPE URI
eventType B. Deletion of the subscribed-to resource;
C. Creation of a direct child of the subscribed-to resource;
E. An attempt to retrieve a <contentInstance> direct-child-resource of a subscribed-to <container> resource is performed while this child is an obsolete resource or the reference used for retrieving this resource is not assigned.This retrieval is performed by a RETRIEVE request targeting the subscribed-to resource with the Result Content parameter set to either "child-resources" or "attributes+child-resources".

6.4.2.3 oneM2M RETRIEVE Procedure

This procedure describes the retrieval of a resource using the oneM2M RETRIEVE request. The information contained within the resource is related to the LWM2M Objects Instances that are interworked through the IPE. This clause shall be treated in conformance with the RETRIEVE Procedure specified in oneM2M TS-0001 [2], clauses 10.1.2 and 10.2.4.2.

The Receiver performs local processing to verify the existence of requested Resource and checks privileges for retrieving the information related to the resource. After successful verification, the Receiver shall return the requested information according to the procedures for the type of interworking (e.g. Transparent, Semantically Enabled, or Management Objects) as described in clause 7, 8, and 9, otherwise an error response shall be returned to the Originator.

Figure 6.4.2.3-1: Procedure for Retrieving a Resource (oneM2M TS-0001, clause 10) Figure 6.4.2.3-1: Procedure for Retrieving a Resource (oneM2M TS-0001 [2], clause 10)

The target of the request is a <container> or <mgmtObj> resource, the ResultContent and FilterCriteria parameters of the request (oneM2M TS0001 [2], clause 8.1.2) specify the nature of the information to retrieve.

Table 6.4.2.3-1: Effect of Request Parameters on Retrieval Request

Request parameter : ResultContent Request parameter : FilterCriteria Effect
child-resources resourceType = contentInstance Retrieval of LWM2M Object Instance
attributes (default) labels, attribute Metadata retrieval of LWM2M Object Instance.

Specific steps of the Receiver Processing according to the interworking process shall be followed:

Step 001: Find and verify the targeted <container> or <mgmtObj> resource of the request : the resourceName corresponds to clause 6.3.2.

Step 002: Using the Hosting CSE Access Control mechanisms, check for Access Control Policy attached to the <container> or <mgmtObj> resource of the request

Step 003: On successful validation of the Access Control Policy, proceed to fetch the requested information:

a) If "ResultContent" is "attributes", jump to Step 4.
b) If "ResultContent" is "child-resources" and "FilterCriteria" is "contentInstance", the associated <contenInstance> resource of the targeted container is considered.

  • Step 003.1: if the <contentInstance> resource is obsolete or its reference is not assigned, an event for Retrieval attempt (eventType 'E') is triggered to the Entity that subscribed to the event (i.e. IPE); as a Blocking Procedure, the Hosting CSE shall monitor the arrival of the new data or decide to report a timeout error in jumping to Step 004:
    • Step 003.1.1: On receiving the event of type 'E' (eventType 'E') the IPE performs a LWM2M READ request on the Object Instance of the targeted LWM2M Client.
      • Step 003.1.2: Once the targeted Object Instance is available to IPE, the IPE creates and populates with that data the <contentInstance> child-resource of the requested <container> resource.
  • Step 003.2: the up-to-date information is available in the <contentInstance> resource.

Step 004: The Hosting CSE returns the appropriate response back to the Originator (e.g. Errors, or Data).

Note

As an OBSERVATION has been set up on the targeted LWM2M Object Instance, the automatic synchronization between the Object Instance and its representation in the Hosting CSE is performed. Further oneM2M accesses to the resource should be simplified in minimizing impact of Step003 (up-to-date data already present from the Hosting CSE resources).

General Exceptions:

  1. The targeted resource/attribute in To parameter does not exist. The Receiver shall respond with an error.
  2. The Originator does not have privileges to retrieve information stored in the resource on the Receiver. The Receiver shall respond with an error.
  3. A timer has expired. The Receiver shall respond with an error.

6.4.2.4 oneM2M CREATE Procedure

This procedure describes the update of a LWM2M Object Instance in a LWM2M Client using the oneM2M CREATE request The information contained in the request via the Content parameter (oneM2M TS-0001 [2], clause 8.2.1) will be used to update an Object Instance in the LWM2M context.

This clause shall be treated in conformance with the CREATE Procedure specified in oneM2M TS-0001 [2], clauses 10.1.2 and 10.2.4.1.

Figure 6.4.2.4-1: Procedure for Creating a Resource (oneM2M TS-0001, clause 10)**

Figure 6.4.2.4-1: Procedure for Creating a Resource (oneM2M TS-0001 [2], clause 10)

The target of the request is a <container> or <node> resource, the ResourceType parameters of the request (oneM2M TS-0001 [2], clause 8.1.2) specifies the type of the resource to create.

Table 6.4.2.4-1: Effect of Request Parameters on Create Request

Request parameter :ResourceType Effect
ContentInstance Replacement of the <latest> resource by a new one
MgmtObj Creation of new <mgmtObj> resource or appropriate error message if one already exist

In LWM2M Interworking context, if there is already an existing <contentInstance> resource, creating a new one shall violates the policy defined in the parent <container> resource regarding the maxNrOfInstances which shall be set to 1. Then the oldest <contentInstance> resources shall be removed from the <container> to enable the creation of the new <contentInstance> resource.

In any case, a notification is sent to the IPE, which subscribed to the parent <container> or <node> resource with the eventType 'C' (Creation of a direct child of the subscribed-to resource). The IPE shall use that notification to update the LWM2M resource model with the new data received ("Content" parameter of the request).

Specific steps of the Receiver Processing according to the interworking process shall be as followed:

Step 001: Find and verify the <container> or <node> resource of the request : the resourceName corresponds to clause 6.3.2.

Step 002: Using the Hosting CSE Access Control mechanisms, check for Access Control Policy attached to the <container> or <node> resource of the request.

Step 003: On unsuccessful validation of the Access Control Policy, jump to step 4:

  • Step 003.1: When according to the request, a <contentInstance> or <mgmtObj> resource is created, an event for Child Creation (eventType 'C') is triggered to the Entity that subscribed to that event (i.e. IPE).
  • Step 003.2: On receiving the event of type 'C' the IPE - via the Mca reference point - get the data from the created <contentInstance> or <mgmtObj> resource and propagates the updated data to the related Object Instance in the LWM2M Client.

Step 004: The Hosting CSE returns the appropriate response back to the Originator (e.g. Acknowledgment, Errors).

General Exceptions:

  1. The Originator does not have the privileges to create a resource on the Receiver, the Receiver shall respond with an error.
  2. The resource with the specified name (if provided) already exists at the Receiver, the Receiver shall response with an error.
  3. The provided information in Content is not accepted by the Receiver (e.g. missing mandatory parameter), the Receiver shall respond with an error.

6.4.2.5 oneM2M UPDATE Procedure

This procedure describes the update of a LWM2M Object Instance or Resource in a LWM2M Client using the oneM2M UPDATE request. The information contained in the request via the Content parameter (TS-0001 Clause 8.1.2) shall be used to update an Object Instance or Resource in the LWM2M context.

This clause shall be treated in conformance with the UPDATE Procedure specified in TS-0001 [2] clause 10.1.3 and 10.2.8.4.

Figure 6.4.2.5-1: Procedure for UPDATing a Resource (TS-0001 Clause 10)

Figure 6.4.2.5-1: Procedure for UPDATing a Resource (TS-0001 Clause 10)

The target of the request is the <mgmtObj> resource itself.

Specific steps of the Receiver Processing according to the interworking process shall be as followed:

Step 001: Find and verify the <mgmtObj> resource of the request : the resourceName corresponds to clause 6.3.2

Step 002: Using the Hosting CSE Access Control mechanisms, check for Access Control Policy attached to the <mgmtObj> resource of the request.

Step 003: On unsuccessful validation of the Access Control Policy, jump to step 4

Step 003.1: When according to the request, a <mgmtObj> attribute is updated, an event for update to attributes (eventType 'A') is triggered to the Entity that subscribed to that event (i.e. IPE).

Step 003.2 : On receiving the event of type 'A', the IPE - via the Mca reference point - gets the data from the attribute and propagates the updated data to the related Object Instance or Resource in the LWM2M Client.

Step 004: The Hosting CSE returns the appropriate response back to the Originator (e.g. Acknowledgment, Errors)

General Exceptions:

  1. The targeted resource in To parameter does not exist. The Receiver responds with an error.
  2. The Originator does not have the privilege to modify the resource, create attributes or delete attributes on the Receiver. The Receiver responds with error.
  3. The provided information in the Content is not accepted by the Receiver. The Receiver responds with error.

6.4.2.6 oneM2M DELETE Procedure

This procedure describes the removal of a LWM2M Object Instance within a LWM2M Client using the oneM2M DELETE request.

This clause shall be treated in conformance with the DELETE Procedure specified in oneM2M TS-0001 [2], clauses 10.1.4 and 10.2.4.4.

Figure 6.4.2.6-1: Procedure for Deleting a resource (oneM2M TS-0001, clause 10)

Figure 6.4.2.6-1: Procedure for Deleting a resource (oneM2M TS-0001 [2], clause 10)

Specific steps of the Receiver Processing according to the interworking process shall be as followed:

Step 001: Find and verify the <container> or <mgmtObj> resource of the request : the resourceName corresponds to clause 6.3.2.

Step 002: Using the Hosting CSE Access Control mechanisms, check for Access Control Policy attached to the <container> or <mgmtObj> resource of the request.

Step 003: On unsuccessful validation of the Access Control Policy, jump to step 4:

  • Step 003.1: When the <container> or <mgmtObj> resource is deleted an event (eventType 'B': Deletion of subscribed-to resource) is triggered to the Entity that subscribed to that event (i.e. IPE).
  • Step 003.2: On receiving the event type 'B', the IPE requests the LWM2M Client to delete the Object Instance related to the <container> or <mgmtObj> resource.
  • Step 003.3: On Object Instance deletion, the LWM2M Client performs a De-Registration operation to the IPE.
  • Step 003.4: Via the Mca reference point, the IPE communicates to the Hosting CSE the status of this DeRegistration.

Step 004: The Hosting CSE returns the appropriate response back to the Originator (e.g. Success, Errors).

6.4.3 oneM2M Resource Operation Responses

Table 6.4.3-1: LWM2M Response Codes to oneM2M Resource Operation Response Codes

LWM2M Client
Response Codes on
Device Management & Service Enablement interface
oneM2M Resource Operation Response
Create
2.01 Created:
4.00 Bad Request
4.01 Unauthorized
4.04 Not Found

2001 Created
4000
4103
4004
Read
2.05 Content:
4.01 Unauthorized
4.04 Not Found
4.05 Method Not Allowed

2000 OK
4103
4004
4005
Write
2.04 Changed
4.00 Bad Request
4.01 Unauthorized
4.04 Not Found
4.05 Method Not Allowed

2004 Changed
4000
4103
4004
4005
4102
Delete
2.02 Deleted
4.00 Bad Request
4.01 Unauthorized
4.04 Not Found
4.05 Method Not Allowed

2002 deleted
4103
4103
4004
4005