In this section, we first present the mechanisms in the LwM2M protocol that constitute the fundamentals (defined in the previous section) of the full integration and interoperation of the localization technologies, including bootstrapping, resource registration, operations and common system architectures. Then, we describe the designed uniform object models, based on LwM2M/IPSO specifications, that can be used to inclusively represent the location-related data from various and diverse localization technologies. Finally, for each aspect of the architecture, we describe the overall flow of the interoperation process based on the proposed solution.
4.1. Bootstrapping, Registration and Discovery
Bootstrapping is an LwM2M functionality that is used for server configuration, security and credential management, as well as provisioning of access control lists [
10]. For client-based bootstrapping, a dedicated LwM2M bootstrap server is used, which is a specific server that is contacted by the client during its boot-up and prepares the client for communication with regular LwM2M servers. Considering the privacy and security concerns regarding the localization technologies [
18], the LwM2M bootstrap interface offers key functionalities, by means of credentials and access control management, in order to prevent unauthorized operations on positioning data.
Device registration is another LwM2M feature that allows a LwM2M client device to inform an LwM2M server about its existence and register its capabilities and resources [
10]. This way, the LwM2M server can act as a lookup server, enabling any application to perform queries and discover all devices with positioning capabilities.
This not only allows device registration, but also enables a discovery of the application/device to understand what kind of location-related objects a device holds and which resources are exposed by the particular object. Further, by identifying object IDs and/or reading the descriptive resources (e.g., application type), additional and detailed information can be retrieved. Next, it can start reading the location data, retrieving the information it is interested in and also performing all the operations defined in the following section. In
Figure 4, the LwM2M registration process is illustrated with a flow diagram. Besides the registration operation, an LwM2M client can also update its registration or perform a de-registration when shutting down or discontinuing use of an LwM2M server [
10].
4.2. Light-Weight and Efficient Operations
Since LwM2M relies on the CoAP application protocol, the CoAP methods constitute the fundamentals of the LwM2M interactions and operations. A minimal CoAP request consists of the method to be applied to the resource, the identifier of the resource, a payload and metadata about the request [
15]. CoAP supports the basic methods of GET, POST, PUT and DELETE. The CoAP GET method is the fundamental information retrieving method, whereas the PUT method is used to update the resource identified by the requested URI, and the POST method usually results in a new resource being created or the target resource being updated [
15]. Besides these basic CoAP methods, there have been recent efforts to define new CoAP methods in order to create CoAP applications with improved functionalities. The newly-specified FETCH, PATCH and iPATCHmethods allow accessing and updating parts of a resource [
19]. In addition to the basic methods, these new methods can be very beneficial for dealing with location data. For instance, an application can read
X,
Y and
Z coordinates of a localized object with a single FETCH request, upon which it will only receive the related data aggregated in a single packet. Although the current LwM2M specification does not support CoAP PATCH/FETCH functionality, the preview of the next version of the LwM2M specification declares that these methods will be included in the near future [
20].
The LwM2M protocol also defines an information reporting interface (based on the CoAP observe mechanism), which can be used to achieve object tracking by means of the repeating retrieval of the location data [
21]. Using this mechanism, a device, called the observer, can indicate that it is interested in observing a location object instance and to be notified about any state change of the relevant data. This way, the device will periodically notify the observer with a single message that contains the value of the observed resource or the set of resource values for the observed object instance aggregated in one packet.
4.3. LwM2M Position Object Models
As we mentioned in the previous sections, LwM2M relies on uniform object models, which are collections of mandatory and optional resources representing atomic pieces of information. Therefore, we create powerful location-related objects and resources that can be used to represent spatial and non-spatial location data in various technologies.
In
Table 1, the list of location-related object models is provided. The first object, GPS location (3336), is the location object defined by the IPSO alliance to represent GPS localization data, such as latitude, longitude, uncertainty and velocity. The details and defined resources for this object are listed in
Table 2. This object provides the model for spatial location data, but it is too limited considering the indoor localization technologies because most of the indoor localization technologies provide a relative position (in coordinates) with respect to a reference point.
Therefore, we define three new object models, namely position object, localization relay object and localization server object. The position object (3360) provides the necessary resources to represent coordinate-based localization data, whereas an instance of the localization relay object (3361) will expose all necessary resources to associate and link the tag with a localization server, which can provide its location data. Finally, the localization server object (3362) can be used to expose the localization server itself as an LwM2M device. The last two object models can be used for infrastructure-based localization systems. The details of these models are provided in
Table 3,
Table 4 and
Table 5, respectively. In these models, the IDs for the proposed/created objects and resources (3360, 3361, 5552, 5553, etc.) are not standardized, but these IDs have been selected during the design as they were not assigned according to the LwM2M object and resource registry [
16]. However, a final ID assignment should go via OMA registration procedure. In addition, as multiple instances can be created by client devices, these devices can expose multiple position objects through several instances.
For each resource, the ‘Operations’ field indicates the supported operations by this specific LwM2M resource. As can be seen in
Table 3, unlike the IPSO GPS location object, the resources in the position object support both read and write operations. This feature is essential in order to enable localization servers to write the position data to the client device when using infrastructure-assisted localization technologies. By means of the LwM2M bootstrap interface and the security features of LwM2M, only the authorized servers and devices that have the right device management credentials can perform such write operations on the position object resources.
As is presented in
Table 3, the position object is composed of several location-related resources, which are mostly defined in the IPSO specification. For this object, ‘
X value’ and ‘
Y value’ are mandatory resources and have to be defined in any position object. The ‘
Z value’ is optional due to the existence of 2D localization systems. The optional minimum and maximum values for the
X,
Y and
Z coordinates can be used to define the measurement area in which localization is performed. ‘Sensor unit’ defines the unit in which the coordinate measurements are expressed. The ‘uncertainty’ can be used to deliver the accuracy of the latest localization measurement, so third parties can evaluate the location data accordingly. ‘Timestamp’ exposes crucial information regarding the age of the location data. As the tracked objects are mobile, location data are valid for a certain amount of time. The timestamp is also useful when someone tries to combine or match location data from two or more different resources in order to improve location accuracy.
The position object also offers the ‘latitude’, ‘longitude’, ‘altitude’, ‘compass direction’ and ‘elevation direction’ resources, which can be used in order to specify the actual position of the reference point and the relative orientation of the measurement area with respect to this reference point. By mapping reference points of the localization systems, any location data can be translated between two systems, which enables the interoperation of multiple localization systems.
‘Server URI’ can be used to link the position object with the corresponding localization server, if existing. Then, the client application can retrieve detailed information about the localization technology and system setup, such as the number of anchors, the number of tracked objects and any supported feature (maximum update rate, accuracy, etc.). The ‘target ID’ resource can be used to read the unique ID exposed by the tag or assigned by the localization server, while the ‘update flag’ is used to notify that the position data have been last updated by a localization server. Finally, ‘application type’ defines a string resource where system developers can embed any kind of information regarding the localization system. For instance, “cm-level UWB localization technology” would show that this application is exposing really accurate location data for tracked objects.
The localization relay object (3361) is an object we created in order to expose the necessary resources to associate and link the target tag with a localization server. This object is necessary for the localization systems where the location is calculated by a backend server. This way, the tag can relay any request to the corresponding backend server by means of created ‘server URI’ and/or ‘tag ID’ resources. The ‘server URI’ resource can provide an URI (in string format) that identifies the backend server itself or any instance or resource available on the server. Any client first needs to retrieve the server URI and/or the tag ID, and then, it can start retrieving the location data directly from the localization server.
The localization server object (3362) is another proposed object model used to represent a single localization server, which tracks several objects, but only exposes proprietary API. Apart from the ‘application type’, this object exposes only a ‘location server’ resource, which can be used to describe a proprietary API via a string written in JSON format. This server object could also encompass technology-related resources (5508 to 5515, 5552, 5701, etc.) in order to expose more information about the localization system.