hash stringlengths 32 32 | doc_id stringlengths 7 13 | section stringlengths 3 121 | content stringlengths 0 2.2M |
|---|---|---|---|
d34e080defcc243403ce1e85fbc15804 | 118 114 | 8.2.1 Introduction | Semantically enabled Content Sharing Resources represent the structure and content of LWM2M Objects and Object Instances by translating LWM2M Objects, Object Instances and their LWM2M Resources and LWM2M Resource Instances into a hierarchy of Content Sharing Resources using the Content Sharing Resource's parent-child relationship described in ETSI TS 118 101 [2]. In addition, the LWM2M Resources values are contained within the <contentInstance> resource for <container> resources. When the LWM2M Resource is of type LWM2M Object Link, the <contentInstance> resource that represents the LWM2M Resource is used to represent the LWM2M Object Link by assigning the destination of the LWM2M Object Link reference to another LWM2M Object's Content Sharing Resource. The reference is assigned using the <contentInstance> resource's contentRef attribute where the name of the attribute is "ObjectLink" and the value of the attribute is the URI of the destination Content Sharing Resource. Figure 8.2.1-1: Relationships of LWM2M Semantically Enabled Content Sharing Resources oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 29 |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 8.2.2 Lifecycle of Semantically Enabled Content Sharing Resources | Clauses 6.3 and 6.4 describe how LWM2M Objects and Object Instances are discovered and instantiated. The Semantic Interworking function uses these procedures for instantiation of the Content Sharing Resource for the LWM2M Objects and Object Instances. The Content Sharing Resources for LWM2M Resources and Resource Instances are created as child resources of the parent Content Sharing Resource when the LWM2M Object and Object Instance are created. Likewise these child Content Sharing Resources are deleted when the parent Content Sharing Resource is deleted. Creation, update or deletion of one or more <contentInstance> resources for the LWM2M Resource or Resource Instances that are not caused by the creation or deletion of the parent LWM2M Object or Object Instance Content Sharing Resource maps to the following operations on the LWM2M Client. Table 8.2.2-1: LWM2M Resource Content Sharing Resource Lifecycle Translation LWM2M Operation Device Management & Service Enablement Interface oneM2M Resource and Operation LWM2M Resource or Resource Instance Child Content Sharing Resource Write create child Content Sharing Resource for new Resource or Resource Instance. The name of the Content Sharing Resource shall be the Resource Id for a singleton LWM2M Resource. The name of the Content Sharing Resource shall be the LWM2M Resource ID and LWM2M Resource Instance Id. When the LWM2M Resource is of type LWM2M Object Link, the <contentInstance> resource that represents the LWM2M Resource is used to represent the LWM2M Object Link by assigning the destination of the LWM2M Object Link reference to another LWM2M Object's Content Sharing Resource. The reference is assigned using the <contentInstance> resource's contentRef attribute where the name of the attribute is "ObjectLink" and the value of the attribute is the URI of the destination <contentInstance> resource. Not applicable update Content Sharing Resource Write delete Content Sharing Resource for Resource or Resource Instance Not Applicable read Content Sharing Resource Table 8.2.2-2: LWM2M Resource <contentInstance> Lifecycle Translation LWM2M Operation Device Management & Service Enablement Interface oneM2M Resource and Operation LWM2M Resource or Resource Instance <contentInstance> resource Write create <contentInstance> Write - Sets the Resource to default value delete <contentInstance> Read read <contentInstance> |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 8.2.3 Mapping for the Encoding of the <contentInstance> Resource | When an AE accesses a <contentInstance> resource, the AE needs to know how the value of the Resource or Resource Instance is encoded. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 30 Table 8.2.3-1: Mapping of Resource or Resource Instance Encoding Interworking Function Mapping oneM2M Resource Attribute The encoding of the LWM2M Resource or Resource Instance based on the Content-Type option <contentInstance>: contentInfo. Possible contentInfo values are translated from the LWM2M Content-Type option. NOTE: The LWM2M Technical Specification [3] defines the value to be used for the [encoding] if the Content-Type option is not present. |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 8.3 Guidelines for Mapping to the Base Ontology | |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 8.3.1 Introduction | Clause 8.2 describes the structure and relationships of the LWM2M Objects and Object Instances along with their associated Resources and Resource Instances. Using that structure this clause provides guidance on mapping the Base Ontology described by [i.5] onto that resource structure. As ontologies are created for specific applications of LWM2M Objects (e.g. Device Management, Home Automation), this clause can only be used for a basis of creating the application specific ontology because certain elements of base ontology (e.g. Aspects, Functionality, Services) cannot be inferred by the LWM2M definitions of LWM2M Objects, Object Instances, Resources or Resource Instances. |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 8.3.2 Mapping of the LWM2M Client | LWM2M Clients are represented as <AE> resources and are mapped to an InterworkedDevice. <AE> resources exposed by the LWM2M Server associated with the IPE are mapped to the same Area Network. 8.3.3 Mapping of the LWM2M Object, Object Instance. Resource and Resource Instance |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 8.3.3.1 Introduction | Mapping the LWM2M Object, Object Instance. Resource and Resource Instance to the Base Ontology is based on the following guidelines: • LWM2M Clients are mapped to InterworkedDevices • LWM2M Objects are mapped to Services and Functionality • LWM2M Resources that represent static (configured) properties of LWM2M Objects are mapped to ThingProperties • LWM2M operation of Execute map to Operation and Command • LWM2M Create, Update, Retrieve and Delete operations permitted for the LWM2M Object or Object Instances map to Operation and Command • LWM2M Resources (including those of type Object Link) are mapped to Input- / OutputDataPoints: - Sub-structures of LWM2M Resources are mapped to Variables that are sub-structures of Input- / OutputDataPoints (via the hasSubStructure relation): Read-only LWM2M Resources map to Output DataPoint Write-only LWM2M Resources map to Input DataPoint Read-write LWM2M Resources map to Input Datapoint and Output Datapoint with the same instance of a Variable oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 31 - If the LWM2M Object does not have a command state, the IPE will instantiate and maintain a <container> resource for command's state. In both instances the LWM2M Resource that represents the command state maps to Output DataPoint 9 oneM2M Management Object-based Interworking Function |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.1 Introduction | Clause 5.3 introduced the Management Object-based Interworking function as depicted in Figure 5.3-3. This clause specifies the mappings of the attributes of oneM2M resources to LWM2M objects in order to allow an AE to use the oneM2M resource without needing to understand the underlying LWM2M Object, Object Instance or Resource syntax or semantics. |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2 Translation of oneM2M Management Resource Types | |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.1 Introduction | These mappings and procedures are used to translate between LWM2M Objects, Object Instances and Resources and the applicable management-related oneM2M resource types. |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.2 Translation to <mgmtObj> Resource Types | |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.2.1 Mapping to <mgmtObj> Resource Types | ETSI TS 118 105 [4] provides the procedures and mappings needed to translate LWM2M Objects, Object Instances and Resources into <mgmtObj> resource types. Relevant clauses include: • Clauses 6.1 and 6.3 of ETSI TS 118 105 [4] provides mapping LWM2M Objects, Object Instances and Resources into <mgmtObj> resource types. • Clause 6.2.1 of ETSI TS 118 105 [4] provides a mapping of the LWM2M Endpoint Client Name to the M2M- Node-ID. • Clauses 6.2.2 and 6.2.3 of ETSI TS 118 105 [4] provides mapping of the LWM2M Object and Instance Identifiers to the <mgmtObj> resource's objectId and objectPath attributes. • Clause 6.7 of ETSI TS 118 105 [4] provides a set of guidelines that shall be followed for one-to-one mapping of a LWM2M Object and its resources to a corresponding oneM2M <mgmtObj> and its [objectAttribute]s. LWM2M IPEs shall implement clauses 6.1 and 6.3 or clause 6.7 of ETSI TS 118 105 [4] when translating between LWM2M Objects, Object Instances and Resources and <mgmtObj> resource types. Clause 6.2.2.2 of the present document provides the normative language that addresses the mapping of the LWM2M Endpoint Client Name used for naming the <node> resource type associated with the LWM2M Client. This is because clause 6.2.1 of ETSI TS 118 105 [4] does not allow for multiple LWM2M Clients to be hosted on the same device. Clause 6.3 of the present document provides normative language that addresses how LWM2M Object and Instance identifiers are mapped for oneM2M resource naming and discovery. For <mgmtObj> resources, LWM2M IPEs shall implement clauses 6.2.2 and 6.2.3 of ETSI TS 118 105 [4] along with clause 6.3 of the present document. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 32 |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.2.2 Interworking of <mgmtObj> Resources | |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.2.2.1 Introduction | Clause 10.2.8 of ETSI TS 118 101 [2] discusses the procedures for the <mgmtObj> resources as well as where the resources are hosted and the <mgmtObj> resource's relationship with its parent <node> resource. As the <node> resource is the parent resource of the <mgmtObj> resources for the node, clauses 6.4.2, 6.5.2 and 6.5.3 of the present document is unable to address the relevant interworked resource settings and procedures that allows the LWM2M IPE to be notified of changes to <mgmtObj> resources or to secure the <mgmtObj> resource. This clause provides the mapping to the settings and procedures necessary to accomplish this interworking. |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.2.2.2 Interworking of <mgmtObj> Resource Settings | For supporting the LWM2M interworking process, a few attributes for the <node> resource, <mgmtObj> resource and the <subscription> resource shall have a specified set of parameters. a) Attributes of <node> resource Table 9.2.2.2.2-1: <node> resource - Relevant Interworked Attributes Attributes of <mgmtObj> resource Value accessControlPolicyIDs ACP set (see clause 6.6) nodeID The M2M-Node-ID of the node which is represented by this <node> resource. hostedCSELink The resource ID of a resource where all of the following applies: • The resource is a <CSEBase> resource or a <remoteCSE> resource. • The resource is hosted on the same CSE as the present <node> resource. The resource represents the CSE which resides on the specific node that is represented by the current <node> resource. mgmtClientAddress Represents the physical address of management client of the node which is represented by this <node> resource. This attribute is absent if management server is able to acquire the physical address of the management client. b) Attributes of <mgmtObj> resource Table 9.2.2.2.2-2: <mgmtObj> resource - Relevant Interworked Attributes Attributes of <mgmtObj> resource Value accessControlPolicyIDs ACP set (see clause 6.6) mgmtDefinition Examples are software, firmware, memory. The list of the value of the attribute can be seen in annex D of ETSI TS 118 101 [2]. mgmtSchema Contains a URI to the <mgmtObj> schema definition which shall be used by the Hosting CSE to validate the syntax of incoming primitives targeting this <mgmtObj> resource. This URI may refer to a oneM2M specified <mgmtObj> definition as well as other <mgmtObj> definitions. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 33 Attributes of <mgmtObj> resource Value objectIDs Contains the list of URNs that uniquely identify the technology specific data model objects used for this <mgmtObj> resource as well as the managed function and version it represents. objectPaths Contains the list of local paths of the technology specific data model objects on the managed entity which is represented by the <mgmtObj> resource in the Hosting CSE. An example is: /5/0 The combination of the objectPaths and the objectIDs attribute, allows to address the technology specific data model. mgmtLink This attribute contains reference to a list of other <mgmtObj> resources in case a hierarchy of <mgmtObj> is needed. [objectAttribute] Each [objectAttribute] is mapped from a leaf node of a hierarchical structured technology specific data model object (including oneM2M data model and the technology specific data model objects) based on the mapping rules below the table. description Text format description of <mgmtObj>. |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.2.2.3 Synchronization <mgmtObj> resources | <mgmtObj> resources can be maintained by AEs and/or the LWM2M IPE on behalf of the LWM2M client. Since AEs can maintain <mgmtObj> resources, the request originator (i.e. AE, LWM2M IPE AE) shall create a subscription to notify the LWM2M IPE when the <mgmtObj> resource is created, deleted or updated using the setting as described in Table 9.2.2.2.3-1. Table 9.2.2.2.3-1: Subscription Procedure - <subscription> resource Attributes of <subscription> Description accessControlPolicyIDs Link a <accessControlPolicy> resource with the privileges: accessControlOriginator originatorID set to the LWM2M IPE AE's AE-ID accessControlOperations: Set to RETRIEVE, CREATE, UPDATE, DELETE, DISCOVER, NOTIFY pendingNotification Set to "sendLatest" latestNotify Set to "latest". notificationContentTy pe Set to "resource" <schedule> Set to immediate notification |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.2.3 Example of creating new specialized <mgmtObj> resources | Using the generic guidelines outlined in clause 6.7 of ETSI TS 118 105 [4], new <mgmtObj> specialization resources may be created on the CSE. Figure 9.2.2.3-1 shows the procedure a Hosting CSE executes to create a new <mgmtObj> specialization resource using the mgmtSchema attribute. The URI of the schema file for the <mgmtObj> specialization resource is provided in the mgmtSchema attribute of the request to create the <mgmtObj> resource. The Hosting CSE then retrieves the schema file using the URI and process the request as outlined below. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 34 Figure 9.2.2.3-1: Procedure for CSE to Support New Specialized <mgmtObj> Resources Step 001: The Originator shall send mandatory parameters and may send optional parameters in the Request message for a CREATE operation of a <mgmtObj> specialization resource. The specialized <mgmtObj> resource contains a full mapping of the underlying LWM2M Object and includes the URI of the XSD for the new specialized resource in the mgmtSchema attribute. Step 002: The Receiver shall: 1) Check if the Originator has the appropriate privileges for performing the request. 2) Verify that the name for the created resource as suggested by the resourceName parameter does not already exist among child resources of the targeted resource. Step 003: The Receiver shall check if the type <mgmtObj> specialization is present in the supportedResourceType attribute of the CSEBase. If found in the supportedResourceType attribute, go to Step 8; otherwise, go to Step 4. Step 004: The Receiver extracts the contents of the mgmtSchema attribute and retrieves an XSD from the XSD Repository. Step 005: The XSD Repository returns the XSD for the specialized <mgmtObj> resource. Step 006: The Receiver checks the received XSD is well formed and if it is, saves the XSD to the Receiver's local XSD repository. Step 007: The Receiver updates the supportedResourceType attribute with the type of the specialized <mgmtObj>. Step 008: The Receiver completes processing the CREATE request: 1) Assign a Resource-ID to the resource to be created. 2) Assign values for mandatory RO mode attributes of the resource and override values provided for other mandatory attributes and where allowed by the resource type definition and if not provided by the Originator itself. 3) The Receiver shall assign a value to the following common attributes: a) parentID; oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 35 b) creationTime; c) expirationTime: if not provided by the Originator, the Receiver shall assign the maximum value possible (within the restriction of the Receiver policies). If the value provided by the Originator cannot be supported, due to either policy or subscription restrictions, the Receiver will assign a new value; d) lastModifiedTime: which is equals to the creationTime; e) any other RO (Read Only) attributes within the restriction of the Receiver policies. 4) The Receiver shall check whether a creator attribute is included in the Content parameter of the request. If included, the creator attribute shall not have a value in the Content parameter of the request. On the other hand if the creator attribute is not included in the Content parameter of the request, then the Receiver shall not include the creator attribute in the resource to be created. 5) On successful validation of the Create Request, the Receiver shall create the requested resource. 6) The Receiver shall check if the created child resource leads to changes in its parent resource's attribute(s), if so the parent resource's attribute(s) shall be updated. Step 009: The Receiver shall respond with mandatory parameters and may send optional parameters in Response message for CREATE operation. General Exceptions: 1) The Originator does not have the privileges to create a resource on the Receiver. The Receiver responds with an error. 2) The resource with the specified name (if provided) already exists at the Receiver. The Receiver responds with an error. 3) The provided information in Content is not accepted by the Receiver (e.g. missing mandatory parameter). The Receiver responds with an error. |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.2.4 LWM2M Interworking Procedure | Figure 9.2.2.4-1 shows an example end-to-end procedure demonstrating how the procedures shown in Figure 9.2.2.3-1 can be utilized as part of LWM2M Interworking. The LWM2M Server and the IPE are co-located, and together they perform oneM2M procedures on behalf of the LWM2M Device. A LWM2M Device will initially register to the LWM2M Server and provides a list of all the LWM2M objects it supports. The LWM2M Server/IPE will then perform a oneM2M registration on behalf of the device and requests to create an <AE> resource. Once the <AE> resource is created, the IPE will then create a <node> resource to host all the <mgmtObj> resources for the device. As part of this step, the nodeLink attribute of the <AE> resource will be updated to point to the newly created <node> resource. The IPE then proceeds to create a specialized <mgmtObj> resource for each LWM2M objects the device supports. The specialized <mgmtObj> resource will directly map to the corresponding LWM2M Object using the objectAttribute attribute of the <mgmtObj>. This will allow for one-to-one mapping of LWM2M resources to oneM2M attributes. Once all the <mgmtObj> specializations are created, the IPE/LWM2M Server returns an appropriate response to the LWM2M Device. NOTE: The following procedure shows only a high level call flow of the interactions among the LWM2M Device, the LWM2M Server/IPE, and the Hosting CSE. It does not detail all the steps required to perform the indicated operations. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 36 LWM2M Server/IPE Receiver (Hosting CSE) 001: LWM2M Registration 004: Create <AE> response 003: Create <AE> LWM2M Device 002: Create <AE> 005: Create <node> 006: Create <node> 007: Create <node> response 008: Create specialized <mgmtObj> 009: Create specialized <mgmtObj> 010: Create response 011: Registration response For each specialized <mgmtObj> Figure 9.2.2.4-1: End-to-end LWM2M Interworking Procedure Step 001: A LWM2M device registers to the LWM2M Server and provides a list of supported LWM2M Objects. Co- located with the LWM2M Server is the IPE. Step 002: In response to the LWM2M registration, the IPE requests to create an <AE> resource on the Hosting CSE on behalf of the LWM2M Device. Step 003: The Hosting CSE evaluates the request, performs the appropriate checks, and creates the <AE> resource. Step 004: A response is sent to the IPE indicating the <AE> resource was created. Step 005: The IPE proceeds to create a <node> resource for the LWM2M Device so <mgmtObj> specialization resources can be created for AE's to manage the device. As part of this multi-step procedure, the nodeLink attribute of the <AE> resource created in Step 003 is updated to point to the newly created <node> resource. Step 006: The Hosting CSE creates the <node> resource and updates the <AE>'s nodeLink attribute as well. Step 007: The Hosting CSE returns an appropriate response for creating the <node> resource. Step 008: For each of the LWM2M Objects supported by the LWM2M Device, the IPE creates an appropriate specialized <mgmtObj> resource as a child of the <node> resource. This <mgmtObj> specialization maps one-for-one with the corresponding LWM2M Object. Step 009: The Hosting CSE creates the <mgmtObj> specialization resource. Step 010: An appropriate response is returned to the IPE for the creation of the <mgmtObj> specialization resource. Step 011: The IPE/LWM2M Server completes the LWM2M registration procedure by sending the LWM2M Device an appropriate response. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 37 |
d34e080defcc243403ce1e85fbc15804 | 118 114 | 9.2.2.5 Use of oneM2M attribute level subscription in LWM2M Interworking | Once the <mgmtObj> resources are created, attribute level subscriptions can be created to get notifications for certain desired operation such as a firmware update process. With the one-to-one mapping relationship between LWM2M resources and oneM2M [objectAttribute], attribute level subscriptions can be made. Table 9.2.2.5-1 shows a mapping of the LWM2M Firmware Update object to a new oneM2M Firmware <mgmtObj> with all the LWM2M resources mapped one for one to oneM2M attributes. Table 9.2.2.5-1: LWM2M Firmware Update Object 1:1 Mapping to oneM2M <mgmtObj> Resource LWM2M Resource Name LWM2M Resource # [objectAttribute] Package 0 package Package URI 1 pkgURI Update 2 update State 3 state Update Result 5 updateResult Pkg Name 6 pkgName Pkg Version 7 pkgVersion Firmware Update Protocol Support 8 firmwareUpdateProtocolSupport Firmware Update Delivery Method 9 firmwareUpdateDeliveryMethod The call flow below uses the updated Firmware Update object mapping in Table 9.2.2.5-1 to allow an AE to monitor the state of a firmware update on a LWM2M device. Prior to initiating a firmware update, the AE can subscribe to the state attribute of the 1:1 mapped firmware <mgmtObj> to get notifications of the firmware update process. Figure 9.2.2.5-1 shows the end-to-end use case of using oneM2M's attribute level subscription to get notifications for the state of the firmware update. Figure 9.2.2.5-1: oneM2M Attribute Level Subscription Use Case Step 001: AE subscribes to the state attribute of the firmware <mgmtObj> associated with LWM2M Device. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 38 Step 002: Hosting CSE grants the subscription and sends a successful response. Step 003: AE sends a firmware update request to update the firmware on the LWM2M Device. Step 004: Hosting CSE processes the request and performs the following: a) Hosting CSE sends a Notify message to the IPE of the firmware update request. b) Hosting CSE sends a successful response to the AE. Step 005: The LWM2M Server/IPE sends a firmware update command to the LWM2M Device. Step 006: The LWM2M Device receives the command and performs the download of the firmware image. a) The LWM2M Device sends an update to the LWM2M Server with status that state = Downloading. b) The LWM2M Server/IPE sends an update to the Hosting CSE with status that state = Downloading. c) The Hosting CSE sends a notify to the AE with status that state = Downloading. Step 007: The LWM2M Device completes the download and updates its state resource. a) The LWM2M Device sends an update to the LWM2M Server with status that state = Downloaded. b) The LWM2M Server/IPE sends an update to the Hosting CSE with status that state = Downloaded. c) The Hosting CSE sends a notify to the AE with status that state = Downloaded. Step 008: The LWM2M Device begins updating the firmware and updates its state resource. a) The LWM2M Device sends an update to the LWM2M Server with status that state = Updating. b) The LWM2M Server/IPE sends an update to the Hosting CSE with status that state = Updating. c) The Hosting CSE sends a notify to the AE with status that state = Updating. Step 009: The LWM2M Device completes updating the firmware successfully and updates its state resource. a) The LWM2M Device sends an update to the LWM2M Server with status that state = Idle. b) The LWM2M Server/IPE sends an update to the Hosting CSE with status that state = Idle. c) The Hosting CSE sends a notify to the AE with status that state = Idle. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 39 Annex A (informative): Introduction to OMA LightweightM2M (LWM2M) A.1 Introduction OMA Lightweight M2M is a protocol for device and service management for M2M. The main purpose of this technology is to address service and management needs for constrained M2M devices, over UDP and SMS bearers. NOTE: This annex provides an overview of the LWM2M protocol. The authoritative source for the protocol is provided by the LWM2M Technical Specification [3]. The crucial aspects in this work are the: • Target devices for this protocol are resource constraint devices (e.g. 8-16bit MCU, RAM is in tens of KB and flash is in hundreds of KB). • Ability to perform Data collection and remote control of devices without the need for complex computing and UI operations. • Optimization of network resources to allow a large numbers of devices may be connected to the communication network simultaneously. • Fusion of device functionalities management and service manipulation into a single protocol. From the implementation view LWM2M has the following features: • Suitable for resource constraint devices. • Usage of compact binary packets. • Support for multiple data encoding formats that include Binary, JSON, plain text and opaque data formats. • Support for reporting information from the Server to the Client when specified condition are met. • Easy to be implemented though the reuse of existing implementation of IETF technologies: e.g. CoAP. • (Constrained Application Protocol) for the Transfer Protocol, and DTLS (Datagram, Transport Layer Security) [i.3] for securing the Server/Client exchanges. One of typical use cases of using LWM2M technology is the firmware upgrade of streetlights [i.4]: • A Streetlights supervisor is responsible for managing the streetlights system. (There are thousands of streetlights in the city and low-cost LWM2M devices embedded in the streetlights.) • The supervisor needs to remotely upgrade of the firmware of a specific streetlight or a group of streetlights. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 40 Figure A.1-1: Firmware Upgrade of Streetlight of Use Case using LWM2M A.2 Architecture Figure A.2-1: LWM2M Architecture As shown in the Figure A.2-1, the layout is the architecture of LWM2M [3]. The Components specified by OMA LWM2M compose the LWM2M enabler which specifies the LWM2M Server / LWM2M Client interface. The LWM2M Server and LWM2M Client are typically instantiated in a M2M Server and a M2M Device. Based on the deployment scenario, the LWM2M Server has the bootstrapping capability itself, or the LWM2M Bootstrap Server exists separately for security reasons. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 41 A.3 Terminology LWM2M [3] is a RESTful protocol with concepts that are similar to oneM2M, however LWM2M uses different terms for these concepts. The following table provides a comparison of applicable LWM2M and oneM2M terminology. Table A.3-1: LWM2M/oneM2M Terminology Mapping LWM2M Terminology oneM2M Terminology Client Endpoint <AE> resources that reside on devices and oneM2M nodes. Object, Object Instance Resource in general; <contentInstance> resource when used for interworking. Resource Attribute for a Resource. A.4 Reference Points A.4.1 Introduction This clause introduces the interfaces carried over the reference point consisting of two main components LWM2M Server and the LWM2M Client. A.4.2 Functional Components A.4.2.1 LWM2M Server The LWM2M Server is a logical component which serves as an endpoint of the LWM2M protocol. A.4.2.2 LWM2M Client The LWM2M Client is a logical component. This LWM2M Client serves as an endpoint of the LWM2M protocol and communicates with the LWM2M Server to execute the device management and service enablement operations from the LWM2M Server and reporting results of the operations. A.4.3 Interfaces There are four interfaces supported by the reference point between LWM2M server and LWM2M Client. The logical operation of each interface is defined as follows: • Bootstrap: - This interface is used to provision essential information into the LWM2M Client so that the LWM2M Client can register to the LWM2M Server(s) after bootstrap procedure has completed. • Client Registration: - This interface allows the LWM2M Client register to the LWM2M Server. This procedure lets the Server know the existence and information (e.g. address, capabilities) of the LWM2M Client so that LWM2M Server can perform M2M services and device management on the LWM2M Client. • Device Management and Service Enablement: - This interface allows the LWM2M Server to perform the device management and M2M service enablement operations. Over this interface, the LWM2M Server can send operations to the LWM2M Client and gets response of the operations from the LWM2M Client. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 42 • Information Reporting: - This interface allows the LWM2M Client to report resource information to the LWM2M Server. This Information Reporting can be triggered periodically or by events (e.g. resource information is changed and configured conditions are met). A.5 Protocols A.5.1 Protocol Stack The LWM2M has the protocol stack defined as below. CoAP LWM2M DTLS UDP SMS on- device SMS on- Smartcard Objects 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. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 43 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. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 44 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. LWM2M Client LWM2M Server Register </1>,</2/1>,</3/1>,</3/2> Success Update Success De-register Success Registration Update De-registraion oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 45 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 A.6 Functions A first set of standard Objects for the LWM2M 1.0 enabler have been developed: • Server Security: security data related to the LWM2M server(s) and/or the LWM2M Bootstrap Server. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 46 • Server: data, configuration, functions related to the LWM2M Server. • Access Control: to check whether the LWM2M server has access right for performing an operation on Resources in the LWM2M Client. • Device: provision of a range of device related information, device reboot and factory reset function. • Connectivity Monitoring: to monitor parameters related to underlying network connectivity. • Firmware: provision of firmware management, installing and updating new firmware. • Location: provides location information of the LWM2M Devices. • Connectivity Statistics: to statistical information of network connection (e.g. SMS counter, UDP data size). These Standard Objects are intended to support a variety of functionalities to manage LWM2M Devices. OMA has already specified others LWM2M objects (e.g. as Software Management, Device Capability Management,) and may create further objects in future. Furthermore, other organizations and companies may define additional LWM2M Objects for their own M2M services using according to LWM2M Object Template and Guideline Annex in [3]: e.g. oneM2M has specified the set of LWM2M Objects around CMDH Policy functionality; IPSO Alliance has developed LWM2M Objects for various sensors. oneM2M TS-0014 version 4.0.1 Release 4 ETSI ETSI TS 118 114 V4.0.1 (2023-11) 47 History Document history V4.0.1 November 2023 Publication |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 1 Scope | The present document will cover the protocol specific part of communication protocol used by oneM2M compliant systems as 'RESTful CoAP binding'. The scope of the present document is (not limited to as shown below): • Binding oneM2M primitives to CoAP messages. • Binding oneM2M Response Status Codes to CoAP Response Codes. • Defining behaviour of a CoAP Client and Server depending on oneM2M parameters. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 2 References | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 2.1 Normative references | References are either specific (identified by date of publication and/or edition number or version number) or non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the referenced document (including any amendments) applies. Referenced documents which are not found to be publicly available in the expected location might be found at https://docbox.etsi.org/Reference/. NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee their long term validity. The following referenced documents are necessary for the application of the present document. [1] IETF RFC 7252: "The Constrained Application Protocol (CoAP)". [2] ETSI TS 118 104: "oneM2M; Service Layer Core Protocol Specification (oneM2M TS-0004)". [3] IETF RFC 7959: "Block-Wise Transfers in the Constrained Application Protocol (CoAP)". [4] ETSI TS 118 103: "oneM2M; Security solutions (oneM2M TS-0003)". [5] IETF RFC 6347: "Datagram Transport Layer Security Version 1.2". |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 2.2 Informative references | References are either specific (identified by date of publication and/or edition number or version number) or non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the referenced document (including any amendments) applies. NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee their long term validity. The following referenced documents are not necessary for the application of the present document but they assist the user with regard to a particular subject area. [i.1] oneM2M Drafting Rules. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 7 |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 3 Definition of terms, symbols and abbreviations | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 3.1 Terms | Void. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 3.2 Symbols | Void. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 3.3 Abbreviations | For the purposes of the present document, the following abbreviations apply: ACK CoAP Acknowledgement message AE Application Entity CON CoAP Confirmable message CSE Common Service Entity DTLS Datagram Transport Layer Security HTTP Hyper Text Transfer Protocol IANA Internet Assigned Numbers Authority IP Internet Protocol NON CoAP Non-confirmable message RST CoAP ReSeT message TCP Transport Control Protocol TLS Transport Layer Security TLV Tag - Length - Value (data structure) UDP User Datagram Protocol URI Uniform Resource Identifier XML eXtensible Markup Language |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 4 Conventions | The keywords "Shall", "Shall not", "May", "Need not", "Should", "Should not" in the present document are to be interpreted as described in the oneM2M Drafting Rules [i.1]. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5 Overview | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.0 Introduction | The clause describes which features need to be supported in CoAP layer and introduces a message format and several features of CoAP used in this protocol binding specification. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.1 Required Features | This clause explicitly specifies the required features of the CoAP layer for oneM2M to properly bind oneM2M primitives into CoAP messages: • The 4-byte binary CoAP message header is defined in section 3 of IETF RFC 7252 [1]. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 8 • Confirmable (CON), Non-confirmable (NON), Acknowledgement (ACK) and Reset (RST) messages shall be supported. The Reset message is used to send an error message in response to a malformed Confirmable message in CoAP layer. • GET, PUT, POST and DELETE methods shall be supported. oneM2M primitives map to these methods. • The CoAP Response Codes specified in clause 6.2.4 shall be supported for oneM2M Response Status Code parameter mapping. • The Uri-Host, Uri-Port, Uri-Path, and Uri-Query shall be supported. • The Content-Type Option shall be used to indicate the media types of the payload. • Block-wise transfers feature may be supported to carry large payloads. • The Caching feature may be supported. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.2 Introduction to CoAP | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.2.0 Introduction | This clause describes a message format, and caching and block-wise transfers features which may be used to map oneM2M primitives to CoAP messages. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.2.1 Message Format | This clause specifies details about the CoAP [1] message format: • CoAP message occupies the data section of one UDP datagram. • CoAP message format supports a 4-byte fixed-size header. • Fixed-size header is followed by a Token value of length 0 to 8 bytes. • The Token value is followed by a sequence of zero or more CoAP Options in TLV format. • CoAP Options are followed by the payload part. For more details on the CoAP message format and the supported header fields, refer to IETF RFC 7252 [1]. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.2.2 Caching | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.2.2.0 Introduction | CoAP [1] supports caching of responses to fulfil future equivalent requests to the same resource. Caching is supported using freshness and validity information carried with CoAP [1] responses. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.2.2.1 Freshness | • CoAP server shall use Max-Age CoAP Option to specify the explicit expiration time for the CoAP Response's resource representation. This indicates that the response is not fresh after its age is greater than the specified number of seconds. • Max-Age Option defaults to a value of 60 (seconds). In case, Max-Age Option is not present in the cacheable response, the response shall not be considered fresh after its age is greater than 60 seconds. • The CoAP server shall set the Max-Age Option value to 0 (zero) to prevent or disable caching. • The CoAP client, having a fresh stored response, can make new request matching the request for that stored response. In this case, the new response shall invalidate the old response. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 9 |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.2.2.2 Validity | • A CoAP endpoint with stored responses but not able to satisfy subsequent requests (for example, the response is not fresh), shall use the Etag Option to perform a conditional request to the CoAP server where the resource is hosted. • If the cached response with the CoAP client is still valid, the server shall include the Max-Age Option in the response along with a code of 2.03 - Valid. This shall update the freshness of the cached response at the CoAP client. • If the cached response with the CoAP client is not valid, the server shall respond with an updated representation of the resource with response code 2.05 - Content. The CoAP client shall use the updated response to satisfy request and may also replace/update the stored or cached response. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 5.2.3 Blockwise Transfers | CoAP Block [3] Options may be used when CoAP endpoints need to transfer large payloads e.g. firmware, software updates. Instead of relying on IP fragmentation, CoAP Block Option should be used for transferring multiple blocks of information in multiple request-response pairs. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6 CoAP Message Mapping | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.1 Introduction | When AE or CSE binds oneM2M primitives to CoAP messages, or binds CoAP messages to oneM2M primitives, it is required that: • AE shall host a CoAP client and should host a CoAP server; or • CSE shall host both a CoAP client and a CoAP server. Basically single oneM2M request primitive is mapped to single CoAP request message, and single oneM2M response primitive is mapped to single CoAP response message. However, single oneM2M request/response primitive is mapped to multiple CoAP request/response messages respectively when CoAP block-wise transfers feature is used. Mapping between CoAP message and oneM2M primitive shall be applied in the following cases: • when the Originator sends a request primitive; • when the Receiver receives a CoAP message(s); • when the Receiver sends a response primitive; • when the Originator receives a CoAP message(s). The following sub-clauses specify how to map each oneM2M primitive parameter defined in ETSI TS 118 104 [2] to a corresponding CoAP message field to compose a CoAP request/response message. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2 Primitive Mapping to CoAP Message | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.0 Introduction | This clause describes where to map oneM2M parameters in a primitive to header, Option and payload fields in a CoAP message. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 10 |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.1 Header | This clause specifies how to configure CoAP header information: • The Version field shall be configured as 1. • The Type field shall be configured according to clause 6.3. The Reset message is used to indicate an error in response to a malformed message in the CoAP layer. • In case of a request, the Code field indicates the CoAP Method. If the oneM2M operation is sent as a Blocking request the oneM2M Operation parameter shall be mapped to a CoAP Method according to Table 6.2.1-1. In non-blocking and flex blocking cases, the request shall use the CoAP POST method, and the Operation parameter shall be mapped as described in clause 6.2.2.3. • In case of a response, the Code field indicates the CoAP Response Code. The oneM2M Response Status Code parameter shall be mapped to a CoAP Response Code as specified in clause 6.2.4. • The Originator and Receiver shall set the 16 bit MessageId in accordance with the CoAP specification [1] and shall retry transmission of all unacknowledged Confirmable messages, as required by that specification. Table 6.2.1-1: oneM2M Operation Parameter Mapping oneM2M Operation Parameter CoAP Method CoAP Method Code CREATE POST 0.02 RETRIEVE GET 0.01 UPDATE PUT 0.03 DELETE DELETE 0.04 NOTIFY POST 0.02 At the Receiver, a CoAP request message with a POST method that does not carry an Operation parameter shall be mapped to a oneM2M CREATE or NOTIFY operation in accordance with the existence of the Resource Type parameter. If a Resource Type parameter exists then the value of the Operation parameter is CREATE and if the Resource Type parameter does not exist, the value of the Operation parameter is NOTIFY. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2 Configuration of Token and Options | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.0 Introduction | This clause describes configuration of Token and Options based on oneM2M parameters. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.1 Token | The CoAP token is used by the CoAP layer to match a response to a request, in a manner that is similar to the oneM2M Request Identifier. Due to size limitations, a Request Identifier cannot be used directly as the CoAP Token. The use of tokens by Originator and Receiver shall comply with requirements of the CoAP specification [1]. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.2 Content Format Negotiation Options | The CoAP Accept Option may be used to indicate which Content-Format is acceptable to an Originator. If a Hosting CSE supports the Content-Format specified in Accept Option of the request, the Hosting CSE shall respond with that Content-Format. If the Hosting CSE does not support the Content-Format specified in Accept Option of the request, 4.06 "Not Acceptable" shall be sent as a response, unless another error code takes precedence for this response. Possible values for Content-Format and Accept options are listed below: • application/xml (41); • application/json (50); • application/cbor (60); oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 11 • media types specified in clause 6.7 "oneM2M specific MIME media types" of ETSI TS 118 104 [2]. Numeric values for oneM2M defined media types are listed in Table 6.2.2.2-1. Table 6.2.2.2-1: CoAP oneM2M Specific Content-Formats oneM2M Specific Media Type ID vnd.onem2m-res+xml 10014 vnd.onem2m-res+json 10001 vnd.onem2m-ntfy+xml 10002 vnd.onem2m-ntfy+json 10003 vnd.onem2m-preq+xml 10006 vnd.onem2m-preq+json 10007 vnd.onem2m-prsp+xml 10008 vnd.onem2m-prsp+json 10009 vnd.onem2m-res+cbor 10010 vnd.onem2m-ntfy+cbor 10011 vnd.onem2m-preq+cbor 10012 vnd.onem2m-prsp+cbor 10013 NOTE: ID values for oneM2M specific media type are subject to change after IANA registration. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.3 URI Options | This clause describes how to configure CoAP Uri-Host, Uri-Port, Uri-Path, and Uri-Query Options. Host and port part of the address specified in pointOfAccess attribute of <remoteCSE> resource shall be mapped to Uri- Host and Uri-Port respectively. If To parameter contains absolute format, then the first URI-Path Option shall contain a letter "_" and map To parameter removing starting "//" into next URI-Path Option(s). If To parameter contains SP-relative format, then the first URI-Path Option shall contain a letter "~" and map To parameter removing starting "/" into next URI-Path Option(s). If To parameter contains CSE-relative format, then To parameter shall be mapped to URI-Path Option(s). Table 6.2.2.3-1 shows valid mappings between the To request primitive parameter and the Uri-Path of the CoAP. CSEBase represents the resource name of a <CSEBase> resource, CSEBase/ae12/cont27/contInst696 represents a structured CSE-relative resource ID, and cin00856 an unstructured CSE-relative resource ID. Table 6.2.2.3-1: Mapping examples between To parameter and Uri-Path of the CoAP Method Request Scope CSE-Relative SP-Relative Absolute Structured To CSEBase/ae12/cont27/contInst 696 /CSE178/CSEBase/ae12/cont2 7/contInst696 //mym2msp.org/CSE178/CSEB ase/ae12/cont27/contInst696 Uri- Path CSEBase _ ~ mym2msp.org CSE178 CSE178 CSEBase CSEBase ae12 ae12 ae12 cont27 cont27 cont27 contInst696 contInst696 contInst696 Unstructur ed To cin00856 /CSE178/cin00856 //mym2msp.org/CSE178/cin008 56 Uri- Path cin00856 _ ~ mym2msp.org CSE178 CSE178 cin00856 cin00856 NOTE: How to read this table: To primitive - from left to right, Uri-Path - from top to bottom. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 12 The responseTypeValue element of Response Type, and the Result Persistence, Delivery Aggregation, Result Content, parameters of Filter Criteria, Desired Identifier Result Type, Token Request Indicator, Tokens, Token IDs, Local Token IDs, Role IDs, Authorization Relationship Indicator, Authorization Signature Indicator, Semantic Query Indicator and Operation parameters shall be carried, if needed in the Uri-Query Option in a short name form as specified in clause 8.2.2 of ETSI TS 118 104 [2]. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4 Definition of New Options | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.0 Introduction | This clause describes new CoAP Options used for binding several oneM2M request/response parameters. Table 6.2.2.4.0-1 contains definitions of the new CoAP Options and sub-clauses specify oneM2M parameter mapping with the newly defined CoAP Options in Table 6.2.2.4.0-1. Table 6.2.2.4.0-1: Definition of New Options No C U N R Name Format Length Default 279 X X oneM2M-FR string 0-255 (None) 283 X X oneM2M-RQI string 0-255 (None) 259 X X oneM2M-OT string 15 (None) 291 X X oneM2M-RQET string 15 (None) 295 X X oneM2M-RSET string 15 (None) 299 X X oneM2M-OET string 15 (None) 263 X X oneM2M-RTURI string 0-255 (None) 303 X X oneM2M-EC uint 1 (None) 307 X X oneM2M-RSC uint 2 (None) 311 X X oneM2M-GID string 0-255 (None) 267 X X oneM2M-TY uint 2 (None) 319 X X oneM2M-CTO uint 2 (None) 323 X X oneM2M-CTS uint 2 (None) 327 X X oneM2M-ATI string 0-255 (None) 271 X X oneM2M-RVI string 1-2 (None) 331 X X oneM2M-VSI string 0-255 (None) 335 X X oneM2M-GTM string 0-512 (None) 339 X X oneM2M-AUS string 0-255 (None) 275 X X oneM2M-ASRI string 0-255 (None) 343 X X oneM2M-OMR string 0-255 (None) 347 X X oneM2M-PRPI string 0-255 (None) 351 X X oneM2M-MSU string 0-255 (None) NOTE 1: C, U, N, R means Critical, Unsafe, NoCacheKey and Repeatable respectively [1]. Table 6.2.2.4.0-1 follows the template used in clause 5.10 Option Definitions of CoAP specification [1]. NOTE 2: CoAP Option numbers specified in Table 6.2.2.4.0-1 are subject to change after review by IANA registration. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.1 From | The From parameter shall be mapped to the oneM2M-FR Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.2 Request Identifier | The Request Identifier parameter shall be mapped to the oneM2M-RQI Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.3 Void | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.4 Originating Timestamp | The Originating Timestamp parameter shall be mapped to the oneM2M-OT Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.5 Request Expiration Timestamp | The Request Expiration Timestamp parameter shall be mapped to the oneM2M-RQET Option. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 13 |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.6 Result Expiration Timestamp | The Request Expiration Timestamp parameter shall be mapped to the oneM2M-RSET Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.7 Operation Execution Time | The Operation Execution Time parameter shall be mapped to the oneM2M-OET Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.8 notificationURI of Response Type | The notificationURI element of Response Type parameter shall be mapped to the oneM2M-RTURI Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.9 Event Category | The Event Category parameter shall be mapped to the oneM2M-EC Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.10 Response Status Code | The Response Status Code parameter shall be mapped to the oneM2M-RSC Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.11 Group Request Identifier | The Group Request Identifier parameter shall be mapped to the oneM2M-GID Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.12 Resource Type | The Resource Type parameter shall be mapped to the oneM2M-TY Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.13 Content Offset | The Content Offset parameter shall be mapped to the oneM2M-CTO Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.14 Content Status | The Content Status parameter shall be mapped to the oneM2M-CTS Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.15 Assigned Token Identifiers | The Assigned Token Identifiers parameter shall be mapped to the oneM2M-ATI Option. The format of the oneM2M- ATI option shall be represented as a sequence of lti-value:tkid-value pairs separated by a colon ':' and multiple pairs separated by a '+' character. EXAMPLE: The option looks as follows: oneM2M-ATI: lti-value1:tkid-value1 + lti-value2:tkid-value2 + … if the XML representation of the Assigned Token Identifiers parameter is given as (using short element names): <ati> <ltia> <lti>lti-value1</lti> <tkid>tkid-value1</tkid> </ltia> <ltia> <lti>lti-value2</lti> <tkid>tkid-value2</tkid> </ltia> … </ati> The data type m2m:dynAuthlocalTokenIdAssignments of the Assigned Token Identifiers parameter is defined in clause 6.3.5.43 of ETSI TS 118 104 [2]. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 14 |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.16 Release Version Indicator | The Release Version Indicator parameter shall be mapped to the oneM2M-RVI Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.17 Vendor Information | The Vendor Information parameter shall be mapped to the oneM2M-VSI Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.18 Group Request Target Members | The Group Request Target Members parameter shall be mapped to the oneM2M-GTM Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.19 Authorization Signatures | The Authorization Signatures parameter shall be mapped to the oneM2M-AUS Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.20 Authorization Signature Request Information | The Authorization Signature Request Information parameter shall be mapped to the oneM2M-ASRI Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.21 Ontology Mapping Resources | The Ontology Mapping Resources parameter shall be mapped to the oneM2M-OMR Option. The format of the oneM2M-OMR option shall be represented as a sequence of oneM2M resource identifiers separated by a '+'. EXAMPLE: The option looks as follows: oneM2M-OMR: /IN-CSE-0001/omr1+/IN-CSE-0001/omr2+… |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.22 Primitive Profile Identifier | The Primitive Profile Identifier parameter shall be mapped to the oneM2M-PRPI Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.2.4.23 M2M Service User | The M2M Service User parameter shall be mapped to the oneM2M-MSU Option. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.3 Payload | Content parameter shall be mapped to CoAP payload. Blockwise transfers mechanism may be used to deliver large size of Content parameter which is not fit into one CoAP message. Please refer to clause 6.5 for the detail information. If Content parameter contains URI and resource representation in a response to a create request, URI shall be mapped to Location-Path Option. A Token Request Information parameter included in a response primitive shall be mapped into the payload. The Content-Format shall be set compliant with the data representation. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.2.4 Response Codes Mapping | Table 6.2.4-1 defines a mapping between oneM2M Response Status Code parameter specified in [2] and CoAP Response Code. In case of where multiple oneM2M Response Status Code parameters are mapped to a single CoAP Response Code, the Response Status Code parameter shall be specified in oneM2M-RSC Option. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 15 Table 6.2.4-1: Mapping between oneM2M Response Status Code and CoAP Response Code oneM2M Response Status Code Description CoAP Response Code Description 1000 ACCEPTED None Not used 1001 ACCEPTED for nonBlockingRequestSynch 2.01 Created (indicates that a <request> resource has been created 1002 ACCEPTED for nonBlockingRequestAsynch 2.01 or 2.04 2.01 (Created) is used if a <request> resource was created, otherwise 2.04 (Changed) is used 2000 (for RETRIEVE operation) OK 2.05 Content 2000 (for NOTIFY operation) OK 2.04 Changed. CoAP payload shall be empty. 2001 CREATED 2.01 Created 2002 DELETED 2.02 Deleted 2004 UPDATED 2.04 Changed 4000 BAD_REQUEST 4.00 Bad Request 4001 RELEASE_VERSION_NOT_SUPPORTED 5.01 Not Implemented 4004 NOT_FOUND 4.04 Not Found 4005 OPERATION_NOT_ALLOWED 4.05 Method Not Allowed 4008 REQUEST_TIMEOUT 5.04 Gateway Timeout 4015 UNSUPPORTED_MEDIA_TYPE 4.15 Unsupported Content-Format 4101 SUBSCRIPTION_CREATOR_HAS_NO_PRIVILEGE 4.03 Forbidden 4102 CONTENTS_UNACCEPTABLE 4.00 Bad Request 4103 ORIGINATOR_HAS_NO_PRIVILEGE 4.03 Forbidden 4104 GROUP_REQUEST_IDENTIFIER_EXISTS 4.00 Bad Request 4105 CONFLICT 4.03 Forbidden 4106 ORIGINATOR_HAS_NOT_REGISTERED 4.03 Forbidden 4107 SECURITY_ASSOCIATION_REQUIRED 4.03 Forbidden 4108 INVALID_CHILD_RESOURCE_TYPE 4.03 Forbidden 4109 NO_MEMBERS 4.03 Forbidden 4110 GROUP_MEMBER_TYPE_INCONSISTENT 4.00 Bad Request 4111 ESPRIM_UNSUPPORTED_OPTION 4.03 Forbidden 4112 ESPRIM_UNKNOWN_KEY_ID 4.03 Forbidden 4113 ESPRIM_UNKNOWN_ORIG_RAND_ID 4.03 Forbidden 4114 ESPRIM_UNKNOWN_RECV_RAND_ID 4.03 Forbidden 4115 ESPRIM_BAD_MAC 4.03 Forbidden 4116 ESPRIM_IMPERSONATION_ERROR 4.03 Forbidden 4117 ORIGINATOR_HAS_ALREADY_REGISTERED 4.03 Forbidden 4118 ONTOLOGY_NOT_AVAILABLE 4.04 Not Found 4119 LINKED_SEMANTICS_NOT_AVAILABLE 4.04 Not Found 4120 INVALID_SEMANTICS 4.02 Bad Option 4121 MASHUP_MEMBER_NOT_FOUND 4.04 Not Found 4122 INVALID_TRIGGER_PURPOSE 4.02 Bad Option 4123 ILLEGAL_TRANSACTION_STATE_TRANSITION_ATT EMPTED 4.00 Bad Request 4124 BLOCKING_SUBSCRIPTION_ALREADY_EXISTS 4.00 Bad Request 4125 SPECIALIZATION_SCHEMA_NOT_FOUND 5.01 Not Implemented 4126 APP_RULE_VALIDATION_FAILED 4.03 Forbidden 4127 OPERATION_DENIED_BY_REMOTE_ENTITY 4.03 Forbidden 4128 SERVICE_SUBSCRIPTION_NOT_ESTABLISHED 4.03 Forbidden 4130 ONTOLOGY_MAPPING_ALGORITHM_NOT_AVAILAB LE 4.04 Not Found 4131 ONTOLOGY_MAPPING_POLICY_NOT_MATCHED 4.00 Bad Request 4132 ONTOLOGY_MAPPING_NOT_AVAILABLE 4.04 Not Found 4133 BAD_FACT_INPUTS_FOR_REASONING 4.00 Bad Request 4134 BAD_RULE_INPUTS_FOR_REASONING 4.00 Bad Request 4135 DISCOVERY_LIMIT_EXCEEDED 4.03 Forbidden 4136 PRIMITIVE_PROFILE_NOT_ACCESSIBLE 4.03 Forbidden 4137 PRIMITIVE_PROFILE_BAD_REQUEST 4.00 Bad Request oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 16 oneM2M Response Status Code Description CoAP Response Code Description 4138 UNAUTHORIZED_USER 4.03 Forbidden 4139 SERVICE_SUBSCRIPTION_NOT_ACTIVE 4.03 Forbidden 4140 SOFTWARE_CAMPAIGN_CONFLICT 4.03 Forbidden 4143 INVALID_SPARQL_QUERY 4.00 Bad Request 5000 INTERNAL_SERVER_ERROR 5.00 Internal Server Error 5001 NOT_IMPLEMENTED 5.01 Not Implemented 5103 TARGET_NOT_REACHABLE 4.04 Not Found 5105 RECEIVER_HAS_NO_PRIVILEGE 4.03 Forbidden 5106 ALREADY_EXISTS 4.00 Bad Request 5107 REMOTE_ENTITY_NOT_REACHABLE 4.04 Not Found 5203 TARGET_NOT_ SUBSCRIBABLE 4.03 Forbidden 5204 SUBSCRIPTION_VERIFICATION_INITIATION_FAILED 5.00 Internal Server Error 5205 SUBSCRIPTION_HOST_HAS_NO_PRIVILEGE 4.03 Forbidden 5206 NON_BLOCKING_SYNCH_REQUEST_NOT_SUPPOR TED 5.01 Not Implemented 5207 NOT_ACCEPTABLE 4.06 Not Acceptable 5208 DISCOVERY_DENIED_BY_IPE 4.03 Forbidden 5209 GROUP_MEMBERS_NOT_RESPONDED 5.00 Internal Server Error 5210 ESPRIM_DECRYPTION_ERROR 5.00 Internal Server Error 5211 ESPRIM_ENCRYPTION_ERROR 5.00 Internal Server Error 5212 SPARQL_UPDATE_ERROR 5.00 Internal Server Error 5214 TARGET_HAS_NO_SESSION_CAPABILITY 4.03 Forbidden 5215 SESSION_IS_ONLINE 4.03 Forbidden 5216 JOIN_MULTICAST_GROUP_FAILED 5.00 Internal Server Error 5217 LEAVE_MULTICAST_GROUP_FAILED 5.00 Internal Server Error 5218 TRIGGERING_DISABLED_FOR_RECIPIENT 5.03 Service Unavailable 5219 UNABLE_TO_REPLACE_ REQUEST 5.03 Service Unavailable 5220 UNABLE_TO_RECALL_REQUEST 5.03 Service Unavailable 5221 CROSS_RESOURCE_OPERATION_FAILURE 5.00 Internal Server Error 5222 TRANSACTION_PROCESSING_IS_INCOMPLETE 4.03 Forbidden 5230 ONTOLOGY_MAPPING_ALGORITHM_FAILED 5.00 Internal Server Error 5231 ONTOLOGY_CONVERSION_FAILED 5.00 Internal Server Error 5232 REASONING_PROCESSING_FAILED 5.00 Internal Server Error 6003 EXTERNAL_OBJECT_NOT_REACHABLE 4.04 Not Found 6005 EXTERNAL_OBJECT_NOT_FOUND 4.04 Not Found 6010 MAX_NUMBER_OF_MEMBER_EXCEEDED 4.00 Bad Request 6020 MGMT_SESSION_CANNOT_BE_ESTABLISHED 5.00 Internal Server Error 6021 MGMT_SESSION_ESTABLISHMENT_TIMEOUT 5.00 Internal Server Error 6022 INVALID_CMDTYPE 4.00 Bad Request 6023 INVALID_ARGUMENTS 4.00 Bad Request 6024 INSUFFICIENT_ARGUMENTS 4.00 Bad Request 6025 MGMT_CONVERSION_ERROR 5.00 Internal Server Error 6026 MGMT_CANCELLATION_FAILED 5.00 Internal Server Error 6028 ALREADY_COMPLETE 4.00 Bad Request 6029 MGMT_COMMAND_NOT_CANCELLABLE 4.00 Bad Request 6030 EXTERNAL_OBJECT_NOT_REACHABLE_BEFORE_R QET_TIMEOUT 5.04 Gateway Timeout 6031 EXTERNAL_OBJECT_NOT_REACHABLE_BEFORE_O ET_TIMEOUT 5.04 Gateway Timeout 6033 NETWORK_QOS_CONFIG_ERROR 5.03 Internal Server Error 6034 REQUESTED_ACTIVITY_PATTERN_NOT_PERMITTE D 4.03 Forbidden The Receiver shall use this table to determine the CoAP response code that is to be used in the response, based on the value of the oneM2M Response Status Code parameter. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 17 |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.3 Accessing Resources in CSEs | |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.3.0 Introduction | This clause describes the behaviour of the CoAP layer depending on the Response Type parameter. Note that the CoAP messaging model defined in [1] applies to all message exchanges. oneM2M Requests should be sent as CoAP Confirmable (CON) messages, although an Originator can send a request as a Non-confirmable (NON) message if there is a good reason for doing this. An Originator that relies on getting a response to its request should use a Confirmable rather than a Non-confirmable message for its request. oneM2M Responses should be sent as CoAP CON messages, although there is one case where a NON message should be used. This is indicated in clause 6.3.1. If the Originator or Receiver sends a CON message it shall retransmit that message if it does not receive a CoAP acknowledgement message, as required by [1]. The recipient (Receiver or Originator) shall take care to de-duplicate CON messages as described in [1]. The recipient of a CoAP message shall process the oneM2M request or response it contains, even if it was sent as Non- confirmable. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.3.1 Blocking case | 1) If the Response Type parameter is configured as "blockingRequest" (blocking case), the Originator (CoAP client) shall send the oneM2M request to the Receiver (CoAP server). The oneM2M Operation parameter shall be mapped to a CoAP Method according to Table 6.2.1-1. 2) After processing the oneM2M request, the Receiver shall send the oneM2M response in a CoAP response with a CoAP response code as given by Table 6.2.4-1. - If the oneM2M request was sent as a CoAP Confirmable message, the Receiver may either piggyback this response to the request on the CoAP ACK message, or send the response as a separate CoAP Confirmable message after it has sent the CoAP ACK. - If the oneM2M request was sent as a Non-confirmable message, the oneM2M response shall be returned as a separate CoAP message. This response should be sent as a Non-confirmable CoAP message but it may be sent as Confirmable (this means that a receiver can, if it so chooses, send all Responses as Confirmable regardless of how the Request was sent). 3) The Originator's CoAP binding may generate a response primitive containing a oneM2M Response Status Code of "REQUEST_TIMEOUT" if it considers that it has taken too long for the CoAP response to come back from the Receiver. It shall ignore any response to the original request that it might receive after it has done this. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.3.2 Non-Blocking Asynchronous case | 1) If the Response Type parameter is configured as "nonBlockingRequestAsynch" (non-blocking asynchronous case), the Originator (CoAP client) should send the oneM2M request to the Receiver (CoAP server) as a CoAP Confirmable message. This request shall be sent using the CoAP POST method, and shall include the Operation parameter, mapped as described in clause 6.2.2.3. 2) The Receiver, after validating the request and before processing it fully, shall return a oneM2M response to the originator. It may either piggyback (2a) this response on the CoAP ACK message (if the request was sent as a Confirmable message) or send the response as a separate CoAP response message after it has sent the CoAP ACK (2b). In this latter case it shall send the response as a Confirmable message. - If the Receiver supports the <request> resource type, it shall respond with a 2.01 (Created) CoAP response code and a oneM2M Response Status Code of "ACCEPTED for nonBlockingRequestAsynch". The response shall include the URI of the new <request> resource in a sequence of one or more Location-Path and/or Location-Query Options. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 18 - If the Receiver does not support the <request> resource type, it shall respond with a 2.04 (Changed) CoAP response code and a oneM2M Response Status Code of "ACCEPTED for nonBlockingRequestAsynch". 3) The Receiver, upon successful processing of the request, shall send a new CoAP Confirmable request message using the CoAP POST method. This message contains a oneM2M NOTIFY primitive whose content contains the response to the original request. 4) The Originator may either piggyback a response to this request (4a) or send it as a separate CoAP response after the acknowledgment message (4b). This response shall contain the appropriate CoAP response code as defined in Table 6.2.4-1 and have an empty payload. Figure 6.3.2-1: Non-Blocking Asynchronous Case |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.3.3 Non-Blocking Synchronous case | 1) If the Response Type parameter is configured as "nonBlockingRequestSynch" (non-blocking synchronous case), the Originator (CoAP client) should send the oneM2M request to the Receiver (CoAP server) as a CoAP Confirmable message. This request shall be sent using the CoAP POST method, and shall include the Operation parameter, mapped as described in clause 6.2.2.3. 2) The Receiver, after validating the request and before processing it fully, shall return a oneM2M response to the originator. It may either piggyback this response (2a) on the CoAP ACK message (if the request was sent as a CON message) or send the response as a separate CoAP message after it has sent the CoAP ACK (2b). In this latter case it shall send the response as a Confirmable message. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 19 - If the Receiver supports the <request> resource type, it shall respond with a 2.01 (Created) CoAP response code and a oneM2M Response Status Code of "ACCEPTED for nonBlockingRequestSynch". The response shall include the URI of the new <request> resource in a sequence of one or more Location-Path and/or Location-Query Options. - If the Receiver does not support the <request> resource type, it shall respond with a 5.01 (Not implemented) CoAP response code and a oneM2M Response Status Code of "NON_BLOCKING_SYNCH_REQUEST_NOT_SUPPORTED". 3) The Originator can use the <request> resource reference to synchronously retrieve the <request> resource that contains the response to the original request. 4) The Receiver, upon receipt of this retrieve request, shall handle it as in clause 6.3.1 since it is a non-blocking request. NOTE: If the Receiver is a Transit CSE, the Receiver acts as CoAP client and CoAP server. Figure 6.3.3-1: Non-Blocking Synchronous Case |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.3.4 Flex Blocking case | 1) If the Response Type parameter is configured as "flex blocking", the Originator (CoAP client) should send the oneM2M request to the Receiver (CoAP server) as a CoAP Confirmable message. This request shall be sent using the CoAP POST method, and shall include the Operation parameter, mapped as described in clause 6.2.2.3. 2) The Receiver shall determine whether to handle the request using "nonBlockingRequestSynch" or "nonBlockingRequestAsynch" mode: - If the Receiver chooses "nonBlockingRequestAsynch" processing proceeds as described in clause 6.3.2, starting from step 2). - If the Receiver chooses "nonBlockingRequestSynch" processing proceeds as described in clause 6.3.3, starting from step 2). |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.4 Mapping rules of caching | This clause specifies how to enable or disable CoAP caching mechanism and how to use cached information. If the CoAP end point supports caching mechanism by freshness, the CoAP server shall: • set the Max-Age Option value to "0" (zero) to disable caching, in order to support complete oneM2M mapping; or oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 20 • set the Max-Age option value to another value (such as the default value), in order to use CoAP caching mechanism for constrained environment. NOTE 1: In the second case, the new request from oneM2M layer can get the stored fresh response from CoAP client, not from CoAP server. If the CoAP end point supports caching mechanism by validity: • the CoAP server shall not present Etag in responses to disable caching, in order to support complete oneM2M mapping; or • the CoAP server shall present Etag in responses, in order to use CoAP caching mechanism for constrained environment. NOTE 2: In the second case, the new request from oneM2M layer can get the stored fresh response from CoAP server, not from oneM2M layer. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 6.5 Usage of Blockwise Transfers | Using Block Options, large oneM2M resource representations can be fragmented and reassembled by CoAP independently of the lower layers as well as the above application. The CoAP Block1 Option shall be used to define the size of the blocks used for oneM2M request primitives and the CoAP Block2 Option shall be used to define the size of the blocks used for oneM2M response responses. Refer to IETF RFC 7959 [3] for further details. |
1b8e2d048ecdcc1f1241868583da88b0 | 118 108 | 7 Security Consideration | This clause applies to CoAP unicast communication only. Security for multicast communication is addressed in clause B.1. CoAP itself does not provide protocol primitives for authentication or authorization. Just as HTTP is secured using Transport Layer Security (TLS) over TCP, CoAP can be secured using Datagram TLS (DTLS) [5]. All CoAP messages shall be sent as DTLS "application data". For matching an ACK or RST to a CON message or a RST to a NON message: The DTLS session shall be the same and the epoch shall be the same. For matching a response to a request, the DTLS session shall be the same and the epoch shall be the same. The response to a DTLS secured request shall always be DTLS secured using the same security session and epoch. OneM2M primitive parameters contained in CoAP messages may be protected by DTLS in a hop-by-hop manner. For the details, see oneM2M security solution specification [4]. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 21 Annex A (informative): Example Procedures A.1 Blocking case of AE Registration Figure A.1-1 illustrates CoAP mapping of AE Registration procedure described in clauses 7.2.2.1, 7.4.6.2.2 and E.1 of ETSI TS 118 104 [2] and shows an example of blocking case which is described in clause 6.3.1. IN-AE IN-CSE Step1: IN-AE creates <AE> resource at IN_CSE Method: POST Uri-Host: m2m.sp1.com Uri-Port: 5683 Uri-Path: CSE02Base Content-Format: 41 oneM2M-RQI: 0001 oneM2M-TY: 2 oneM2M-RVI: 2a Payload: <AE> representation to create Step3: Response Code: 2.01 Created Location-path: /CSE02Base/ae02 Content-Format: 41 oneM2M-RQI: 0001 oneM2M-RSC: 2001 oneM2M-RVI: 2a Payload: <AE> representation created Step2: Check access controls, process request and create <AE> resource for IN-AE Figure A.1-1: Binding Example - Blocking case of AE Registration oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 22 A.2 Non-blocking synchronous case of AE Registration Figure A.2-1 illustrates CoAP mapping of AE Registration procedure described in clauses 7.2.2.1, 7.4.6.2.2 and E.2 of ETSI TS 118 104 [2] and shows an example of non-blocking synchronous case which is described in clause 6.3.3. Figure A.2-1: Binding Example - Non-blocking synchronous case of AE Registration IN-AE IN-CSE Step1: IN-AE creates <AE> resource at IN_CSE Method: POST Token: 2a3b Uri-Host: m2m.sp1.com Uri-Port: 5683 Uri-Path: CSE02Base Content-Format: 41 oneM2M-RQI: 0001 oneM2M-TY: 2 oneM2M-RVI: 2a Payload: <AE> representation to create Step5: Response Code: 2.05 Content Token: 2a3b Content-Format: 41 oneM2M-RQI: 0003 oneM2M-RSC: 2000 oneM2M-RVI: 2a Payload: <AE> representation retrieved Step3: Check access controls, process request and create <AE> resource for IN-AE Step2: Acknowledgement Code: None oneM2M-RQI: 0001 oneM2M-RSC: 1000 oneM2M-RVI: 2a Step4: IN-AE retrieves <AE> resource in IN_CSE Method: GET Token: 2a3b Uri-Host: m2m.sp1.com Uri-Port: 5683 Uri-Path: CSE02Base oneM2M-RQI: 0003 oneM2M-RVI: 2a Payload: <AE> representation to retrieve oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 23 Annex B (normative): Multicast group fan out procedure B.0 Introduction This clause describes the behaviour of CoAP layer for multicast group fan out procedure. Figure B.0-1 illustrates the steps involved in the interaction. Group Hosting CSE (CoAP Client) Member Hosting CSE1 (CoAP Server) Member Hosting CSE2 (CoAP Server) Multicast Address 1 T=NON, Code=0.01,MID=1xxxx Token: 2xx 3 T=NON, Code=2.05, MID=2xxx Token:2xx Payload: content 2 Request Proccess Figure B.0-1: Multicast group fan out procedure • The Group Hosting CSE (CoAP client) shall use the Non-confirmable Method for the resource to the Member Hosting CSEs (CoAP server). The Group Hosting CSE shall provide a unique Token value in the request. • The Member Hosting CSE, upon successful processing of the request, shall send an appropriate response in a separate Non-confirmable message with the same Token value. B.1 Security DTLS is not applicable to multicast group fan out messages. Security for multicast group fan out is addressed in clause 6.1.2.2.3 of ETSI TS 118 103 [4]. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 24 B.2 Caching A GET request to a multicast group fan out shall not contain an ETag option. oneM2M TS-0008 version 4.4.1 Release 4 ETSI ETSI TS 118 108 V4.4.1 (2023-08) 25 History Document history V4.4.1 August 2023 Publication |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 1 Scope | The present document contains the specification of the oneM2M Base Ontology. A formal OWL representation of the Base Ontology can be found at http://www.onem2m.org/ontology/Base_Ontology. The present document also specifies an instantiation of the Base Ontology in oneM2M resources which can be used for semantic annotation and for ontology based interworking [4]. Finally an example is given how external ontologies can be mapped to the Base Ontology. The example uses the Smart Appliances REFerence (SAREF) ontology (http://ontology.tno.nl/saref). |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 2 References | |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 2.1 Normative references | References are either specific (identified by date of publication and/or edition number or version number) or non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the referenced document (including any amendments) applies. Referenced documents which are not found to be publicly available in the expected location might be found at https://docbox.etsi.org/Reference/. NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee their long term validity. The following referenced documents are necessary for the application of the present document. [1] ETSI TS 118 111: "oneM2M; Common Terminology (oneM2M TS-0011)". [2] Void. [3] W3C Recommendation 25 February 2014: "RDF 1.1 Concepts and Abstract Syntax". NOTE: Available at http://www.w3.org/TR/rdf11-concepts/. [4] oneM2M TS-0030: "Ontology based Interworking". [5] ETSI TS 118 104: "oneM2M; Service Layer Core Protocol (oneM2M TS-0004)". [6] W3C Recommendation 5 April 2012: "W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes". NOTE: Available at https://www.w3.org/TR/xmlschema11-2/. |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 2.2 Informative references | References are either specific (identified by date of publication and/or edition number or version number) or non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the referenced document (including any amendments) applies. NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee their long term validity. The following referenced documents are not necessary for the application of the present document but they assist the user with regard to a particular subject area. [i.1] oneM2M Drafting Rules. NOTE: Available at http://www.onem2m.org/images/files/oneM2M-Drafting-Rules.pdf. [i.2] ETSI TS 118 101: "oneM2M; Functional Architecture (oneM2M TS-0001)". ETSI ETSI TS 118 112 V3.7.3 (2021-01) 8 oneM2M TS-0012 version 3.7.3 Release 3 [i.3] The Smart Appliances REFerence (SAREF) ontology. NOTE: Available at http://ontology.tno.nl/saref/. [i.4] Open-source ontology editor PROTÉGÉ. NOTE: Available at http://protege.stanford.edu/. [i.5] W3C Recommendation 11 December 2012: "OWL 2 Web Ontology Language Document Overview". NOTE: Available at http://www.w3.org/TR/owl2-overview/. [i.6] Smart Appliances REFerence (SAREF) ontology. NOTE: Available at https://sites.google.com/site/smartappliancesproject/ontologies/reference-ontology. [i.7] Study on Semantic Assets for Smart Appliances Interoperability. NOTE: Available at https://www.etsi.org/images/files/Events/2015/201502_SMARTAPP/D-S4%20- %20SMART%202013-0077%20-%20Smart%20Appliances%20- %20Final%20Study%20Report_v1.0.pdf. |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 3 Definition of terms, symbols and abbreviations | |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 3.1 Terms | For the purposes of the present document, the terms given in ETSI TS 118 111 [1] and the following apply: annotation property: property that can be used to add information (metadata/data about data) to classes, individuals and Object/Data Properties class: OWL standard ontology language from the World Wide Web Consortium (W3C) (see [i.5]), concepts are called "Classes" concept: entity of an Ontology that has an agreed, well defined, meaning within the domain of interest of that ontology NOTE: A concept is conceptually grouping a set of Individuals. data property: property that relates an individual of a class to data of a specified type and range interworked device: non-oneM2M device (NoDN) for which communication with oneM2M entities can be achieved via an Interworking Proxy application Entity (IPE) object property: property that relates an individual of a domain class to an individual of a range class ontology: formal specification of a conceptualization, that is defining concepts as objects with their properties and relationships versus other concepts ontology based interworking: ontology based interworking allows interworking with many types of non- oneM2M Area Networks and Devices that are described in the form of a oneM2M compliant ontology which is derived from the oneM2M Base Ontology (see oneM2M TS-0030 [4]) NOTE: Ontology based interworking supports the interworking variant "full mapping of the semantic of the non- oneM2M data model to Mca" as indicated in clause F.2 of ETSI TS 118 101 [i.2]. property: in OWL standard ontology language properties represent relations among individuals NOTE: Properties can be sub-categorized as object properties, data properties and annotation properties. proxied device: virtual Device (i.e. a set of oneM2M resources together with an IPE) that represents the Interworked Device in the oneM2M System relation: (also called "interrelation" or "property") stating a relationship among individuals ETSI ETSI TS 118 112 V3.7.3 (2021-01) 9 oneM2M TS-0012 version 3.7.3 Release 3 restriction: class of individuals based on the relationships that members of the class participate in NOTE: Restrictions can be sub-categorized as: existential restrictions, universal restrictions, cardinality restrictions and hasvalue restrictions. |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 3.2 Symbols | Void. |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 3.3 Abbreviations | For the purposes of the present document, the abbreviations given in ETSI TS 118 111 [1] and the following apply: AE Application Entity OWL Web Ontology Language SAREF Smart Appliances REFerence ontology SPARQL SPARQL Protocol and RDF Query Language |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 4 Conventions | The key words "Shall", "Shall not", "May", "Need not", "Should", "Should not" in the present document are to be interpreted as described in the oneM2M Drafting Rules [i.1]. 5 General information on the oneM2M Base Ontology (informative) |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 5.1 Motivation and intended use of the ontology | |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 5.1.1 Why using ontologies in oneM2M? | |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 5.1.1.1 Introduction to ontologies | In a nutshell an ontology is a vocabulary with a structure. The vocabulary applies to a certain domain of interest (e.g. metering, appliances, medicine, etc.) and it contains concepts that are used within that domain of interest, similar to the "defined terms" in clause 3.1. An ontology should: • Capture a shared understanding of a domain of interest. • Provide a formal and machine interpretable model of the domain. The ontology lists and denominates these concepts which have agreed, well defined, meanings within the domain of interest (e.g. the concept of "Device" has an agreed, well defined, meaning within the scope of the Smart Appliances REFerence (SAREF) ontology see [i.3]). Concepts do not identify individuals but they identify classes of individuals. Therefore, in the OWL standard ontology language from the World Wide Web Consortium (W3C) (see [3]), concepts are called "Classes". The structure part of the ontology is introduced through agreed, well defined, relationships between its concepts. Such a relationship - in OWL called "Object Property" - links a subject concept to an object concept: subject concept relationship object concept ETSI ETSI TS 118 112 V3.7.3 (2021-01) 10 oneM2M TS-0012 version 3.7.3 Release 3 in OWL: domain Class Object Property range Class EXAMPLE 1: In SAREF an Object Property "accomplishes" relates the "Device" class to the "Task" class: Device accomplishes Task Also the relationships/Object Properties of an ontology have agreed, well defined, meanings within the domain of interest. In the example above the "accomplishes" part of the relationship is well documented as part of SAREF (see [i.3]). A second type of Properties in OWL is called "Data Properties". A Data Property is linking a subject Class to a data. These data may be typed or untyped. EXAMPLE 2: In SAREF the Data Property "hasManufacturer" links the class "Device with data of datatype "Literal"": Device hasManufacturer Literal Again, the Data Properties of an ontology have agreed, well defined, meanings within the domain of interest. In the example 2, the Data Property "hasManufacturer" indicates that the Literal, that is linked via this Data Property will indicate the manufacturer of the Device. Data Properties can be considered similar to attributes in oneM2M. A third type of Properties in OWL is called "AnnotationProperties". An Annotation Property is used to provide additional information about ontology elements like classes and instances, which typically are external to the ontology and would not be used for reasoning. Example usages for such additional information are for providing a creator, a version or a comment. The object of an annotation property is either a data literal, a URI reference, or an individual. In general, an individual of a certain Class may or may not have a particular relation (Object Property, Data Property or Annotation Property) that is defined by the ontology. However, if such a relation exists for the individual then that relation should be used with the meaning specified by the ontology. One additional, crucial aspect differentiates an ontology from a vocabulary with a structure. An ontology enables specified, allowed constructs (based on predicate logic) and can be represented in a formal, machine interpretable form e.g. by the OWL standard ontology language. This allows the creation of queries (e.g. through the SPARQL query language) that search for individuals of specified classes, having specified relationships, etc. The OWL flavour OWL-DL (where DL stands for "Description Logic"), that is used in the present document and that is supported by the ontology-editing tool "Protégé" (see [i.4]), has the additional advantage that it is underpinned by a description logic. For ontologies that fall into the scope of OWL-DL a reasoner can be used to automatically check the consistency of classes, take what has explicitly stated in the ontology and use it to infer new information. OWL-DL ensures that queries are decidable. Additionally, OWL-DL allows the creation of Intersection, Union and Complement classes, restrictions (e.g. on the required/allowed number of relationships for any individual of the Class along this property) an other useful constructs. |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 5.1.1.2 The purpose of the oneM2M Base Ontology | |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 5.1.1.2.0 Introduction | Ontologies and their OWL representations are used in oneM2M to provide syntactic and semantic interoperability of the oneM2M System with external systems. These external systems are expected to be described by ontologies. The only ontology that is specified by oneM2M is the oneM2M Base Ontology, as described in the present document. However, external organizations and companies are expected to contribute their own ontologies that can be mapped (e.g. by sub-classing, equivalence, etc.) to the oneM2M Base Ontology. ETSI ETSI TS 118 112 V3.7.3 (2021-01) 11 oneM2M TS-0012 version 3.7.3 Release 3 Such external ontologies might describe specific types of devices (as e.g. in the SAREF ontology) or, more generally, they might describe real-world "Things" (like buildings, rooms, cars, cities.) that should be represented in a oneM2M implementation. The value for external organizations and companies to provide their ontologies to oneM2M consists in supplementing oneM2M data with information on the meaning/purpose of these data. The OWL representation of that ontology provides a common format across oneM2M. The oneM2M Base Ontology is the minimal ontology (i.e. mandating the least number of conventions) that is required such that other ontologies can be mapped into oneM2M. |
aafddb1a92a9da57dd021a69d29dbe98 | 118 112 | 5.1.1.2.1 Syntactic interoperability | Syntactic interoperability is mainly used for interworking with non-oneM2M devices in Area Networks. In this case an ontology - represented as an OWL file - that contains the Area Network specific types of communication parameters (names of operations, input/output parameter names, their types and structures, etc.) is used to configure an Interworking Proxy Entity (IPE). With the help of this OWL file the IPE is able to allocate oneM2M resources (AEs, containers) that are structured along the Area Network specific parameters and procedures. This enables oneM2M entities to read/write from/into these resources such that the IPE can serialize the data and send/receive them from/to the devices in the Area Network. The semantic meaning of these resources is implicitly given by the interworked Area Network technology. Each ontology that describes a specific type of interworked Area Network needs to be derived from the oneM2M Base Ontology. In particular the device types of an ontology of an interworked Area Network need to be mapped (e.g. by sub-typing) into the concept "Interworked Device" of the oneM2M Base Ontology. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.