6.2 LWM2M Device and Endpoint Lifecycle
6.2.1 Introduction
As the LWM2M IPE discovers LWM2M Endpoints when the LWM2M IPE interacts with the LWM2M Client over the LWM2M protocol's Bootstrap and Client Registration interfaces, the LWM2M IPE shall maintain the associated resources in the CSE that represents the LWM2M Device and Endpoint.
6.2.2 LWM2M Device and Endpoint Resource Representation
6.2.2.1 Introduction
LWM2M Endpoint provides the management and control functions for an M2M Application on a device. As such, the CSE that hosts the M2M Application shall represent the LWM2M Endpoint as a <AE> resource (LWM2M Endpoint <AE> resource). The LWM2M Device that hosts the LWM2M Endpoint shall be represented as a <node> resource.
6.2.2.2 LWM2M Device and Endpoint Resource Identification
LWM2M Endpoints are identified by their Endpoint Client Name described in clause 6.2.1 of the LWM2M Technical Specification [3]. The Endpoint Client Name URN without the "urn:" sequence is used as the AE-ID of the associated <AE> resource that represents the LWM2M Client.
In most deployment scenarios, LWM2M Devices host one (1) LWM2M Endpoint. In this scenario the LWM2M Device's <node> resource's M2M-Node-ID should be the same as the LWM2M Endpoint Client Name URN without the "urn:" sequence. When a LWM2M Device host's more than one (>1) LWM2M Endpoint, the determination of the <node> resource's M2M-Node-ID is implementation specific. In all deployment scenarios, the <AE> resource is linked with the <node> resource as described in oneM2M TS-0001 [2].
As the LWM2M Endpoint is represented as an <AE> resource and a LWM2M Object is represented as a Content Sharing Resource in the M2M Service Layer, a reference shall be made between the <AE> resource that represents the LWM2M Endpoint and the Content Sharing Resources which represents the list of LWM2M Objects and Object Instances available in that LWM2M Client.
In order to identify interworked entities hosted in a CSE for the LWM2M technology described in this present document, the <AE> resource that represents the LWM2M Endpoint and the Content Sharing Resources which represent the list of LWM2M Objects and Object Instances available in that LWM2M Client, shall have a Iwked_Technology labels attribute set to LWM2M.
For the case where a LWM2M Endpoint is represented as an <AE> resource and LWM2M Objects are represented as <mgmtObj> resources in the M2M Service Layer, each <mgmtObj> resource shall be a child of the <node> resource representing the LWM2M Device that hosts the LWM2M Endpoint. In this case, the nodeLink attribute of the <AE> resource representing the LWM2M Endpoint shall reference the <node> resource representing the LWM2M Device.
In addition the <AE> resource uses the Hierarchical and Non-Hierarchical mechanisms for Resource Addressing as defined in clause 9.3.1 of oneM2M TS-0001 [2] where the resourceName attribute of the <AE> resource shall be a Endpoint Client Name URN without the "urn:" sequence.
6.2.2.3 LWM2M Endpoint 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 <AE> and <node> resources.
Table 6.2.2.3-1: LWM2M Endpoint Lifecycle Translation - Client Registration Interface
LWM2M Operation Client Registration Interface |
oneM2M Resource and Operation |
---|---|
Register | create <AE>, create <Node> |
Update | update <AE>, update <Node> |
De-register | delete <AE>, delete <Node> |
Table 6.2.2.3-2: LWM2M Endpoint Lifecycle Translation - LWM2M Server Events
LWM2M Server Events | oneM2M Resource and Operation |
---|---|
client lifetime expiration | delete <AE>, delete <Node>, delete <container> resources associated with the <AE> resource, delete <mgmtObj> resources associated with <node> resource. |
Table 6.2.2.3-3: LWM2M Endpoint Lifecycle Attribute Translation
LWM2M Attributes Client Registration Interface |
oneM2M Resource Attribute |
---|---|
Endpoint Client Name | <AE>: AE-ID, resourceName <Node>: M2M-Node-ID when the Device only supports one Endpoint; resourceName |
Lifetime | <AE>, <Node>: expirationTime |
LWM2M Version | <AE>, <Node>: labels. Value is "Iwked-Entity-Version:"appended with the value of the LWM2M Version. |
Binding Mode | Not Applicable |
SMS Number | Not Applicable |
Table 6.2.2.3-4: LWM2M Endpoint 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 <AE>, create <Node> 2001 Created All other codes 4105 Conflict |
Update 2.04 Changed 4.00 Bad Request 4.04 Not Found |
update <AE>, update <Node> 2004 Changed All other codes 4000 Not Found |
De-register 2.02 Deleted 4.04 Not Found |
delete <AE>, delete <Node> 2002 Deleted 4004 Not Found |
6.2.2.4 Configuration of CMDH Policies
In the present document, the CMDH Policies associated with the <Node> resource for the AE is implementation specific.
6.2.2.5 Registering a Registered LWM2M Endpoint
In the scenario where a LWM2M Client issues a Register operation for an AE that is already created, the LWM2M IPE shall treat the operation as if the LWM2M Client requested a De-Register (Delete <AE> resource) prior this Register operation (Create <AE> resource) as described in Table 6.2.2.3-1. The procedure for the LWM2M Server is defined in clause 5.3.1 of the LWM2M Technical Specification [3].