Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[leshan-dev] Resource Discovery and Observation in LwM2M

Hello,
I have a few questions about Resource observation and URI notation in LwM2M and CoAP documentations. In LwM2M documentation, Object ID to write a resource should be 16-bit unsigned integer (http://dev_devtoolkit.openmobilealliance.org/IoT/LWM2M10/doc/TS/index.html#!Documents/identifiers.htm), it returns an error if tried otherwise. However, in the CoAP documentation, under RESTful fashion, it can be any string like  <coap://server/temperature/felt> (http://tools.ietf.org/html/draft-ietf-core-observe-16#page-3).

I have been experimenting Leshan library (Standalone Server) with OMA Mozilla add-on and LwM2M-node-lib (https://github.com/telefonicaid/lwm2m-node-lib).

For Device Management, it works fine. I can read and observe DM Objects, however I would like to understand how it works with actual resources like sensor data, measurements. 

We have created a set of static JSON data on the client side as payload. What we need to do is to create an object in the client side and observe it every 40 seconds.

Here I’m kinda stuck, is there any tips to create a sensor resource in the client side and observe it from Leshan standalone?

In addition to that, what is the best way to create Object ID, resource, resource ID? 

By the way, Leshan standalone, somehow disconnects from the client after sometime, especially if it returns 500 error. Is it a bug? Shouldn’t it keep the connection alive when the Mozilla Client update registration automatically when the lifetime expires?

Cheers

Back to the top