Soracom Inventory is a device management service based on LwM2M, a lightweight M2M protocol defined by Open Mobile Alliance. Devices that use Inventory communicate with the Soracom platform, allowing you to
write device data,
observe device status for notifications, and
execute commands remotely.
Inventory allows you to read various data from your device, such as operational status, signal strength, and remaining battery. You can also track the physical location of devices equipped with GPS.
LwM2M also provides capabilities of restarting processes and devices, which through the Soracom platform can be managed directly on the User Console or through the Soracom API. You can also extend command functionality by defining custom commands on the device agent.
Device management using LwM2M involves setting up an agent process on the device in order to communicate with Inventory. This process typically requires manual key exchange between Inventory and the device for security and authentication. However, when devices communicate using a Soracom Air cellular connection, key exchange is performed automatically and can be installed remotely on the device.
Once the automated key exchange has taken place, the device agent can continue to communicate with Inventory through other network interfaces, such as wired ethernet and Wifi.
Inventory integrates natively with other Soracom services, allowing you to extend LwM2M management functionality in your application. For example, device notifications reported by the agent (such as when signal strength changes) can be sent directly to Soracom Harvest, or forwarded to your server or cloud service using Beam or Funnel.
Inventory uses the OMA DM (Device Management) protocol, which consists of the following components:
- Bootstrap Server - Provides key exchange and authentication functionality necessary for establishing a connection with a managed device.
- Device Management Server - Provides the major device management functions featured in Inventory.
- Agent - An executable binary or SDK on the managed device that communicates with the Bootstrap Server and Device Management Server.
When registering a device for management with Inventory, the Agent will first communicate with the Bootstrap Server over a Soracom Air cellular connection in order to register device information and perform a key exchange.
Once the registration process is complete, the managed device will appear on the User Console in the list of Inventory devices, and is also accessible using the Soracom API. When performing
execute management tasks, communication will occur between the device Agent and the Device Management Server.
As management tasks use the key established during bootstrapping, management can be performed over other network interfaces, such as Wifi.
When using Inventory, your device should be configured to use the following servers:
Device management with LwM2M is organized using Resource Model format, which has a tree structure consisting of Object → Object Instance → Resource. Each node in this tree is assigned a number, which results in a tree structure such as
For example, the resource
/3/0/0 contains the manufacturer information of the device. A
read request for this resource will cause the device Agent to return the manufacturer information as a response.
/3/0/4 resource corresponds to a reboot function. An
execute request for this resource will command the device to restart.
The OMA LwM2M Object and Resource Registry contains a large number of pre-defined resources that can be used with Inventory.
While the Object and Resource Registry provides numerous pre-defined resource responses, the actual behavior depends on the managed device Agent process. In the example of
/3/0/0 to retrieve the device manager, it is up to the Agent to determine how the manufacturer information is obtained from the device.
Soracom Inventory documentation refers to Eclipse Wakaama and Eclipse Leshan, two LwM2M libraries that are compatible with Inventory. Support for each library is provided by their respective contributors. When implementing custom object models for your device agent, refer to their respective documentation for additional information.
You can also define custom objects each with custom-defined resources to manage additional properties of your devices that are not defined in the LwM2M Object and Resource Registry. For more information, refer to the Custom Object Models documentation.
- Each account is limited to a maximum of 16 custom object definitions
- Each object definition is limited to 20 resource definitions per object