Skip to main content

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

Hi,
  1) I don't know about OMA Mozilla add-on and lwM2M-node-lib, but standalone is able to observe lightweight resource.

  2) For your sensor object, you could :
- reuse the object definition propose by IPSO which is alreay known by Leshan (see [1] and [2])
- create your own object definition and give it to Leshan, to do that put your object definition in DDF file format or "objectspec.json" file format in a folder and set the MODELS_FOLDER environment variable to the path of this folder.

  3) We deregistered client when we get timeout error but now this is fixed. I never encountered this  problem with 500 error. But you 're right the registration should be removed only when the lifetime expires (not on error).

SImon

[1]http://technical.openmobilealliance.org/Technical/technical-information/omna/lightweight-m2m-lwm2m-object-registry
[2]https://github.com/eclipse/leshan/blob/master/leshan-core/src/main/resources/oma-objects-spec.json#L1019

 

Le 16/07/2015 11:48, Ugur Kirbac a écrit :
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


_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev


Back to the top