-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with registration of some LwM2M clients after upgrading to leshan-2.0.0-M7 #1273
Comments
Yep the LWM2M spec v1.1 and v1.0 are clear about that : See :
This is a general question about how Leshan should handle device which doesn't strictly respect the specification. As I said at #1270 (comment) So the short idea, trying to be strict by default, but let user make their own server less strict if needed. In your case you can create your own Parser : // define your supported attributes
Collection<AttributeModel<?>> supportedAttributes = new ArrayList<AttributeModel<?>>();
supportedAttributes.addAll(Attributes.ALL);
supportedAttributes.addAll(LwM2mAttributes.ALL);
// change the object_version one
supportedAttributes.remove(LwM2mAttributes.OBJECT_VERSION);
// create your custom model which support to assign OBJECT_VERSION To OBJECT and OBJECT_INSTANCE level instance.
supportedAttributes.add(new YourObjectVersionAttributeModel());
// add the new LinkParser
builder.setLinkParser(new DefaultLwM2mLinkParser(supportedAttributes));
This is a bug you should get a message like :
This is fixed in |
I saw a similar problem: #1315 However, after looking at the specification I closed my ticket even though the V1.1 and V1.2 specification contradict each other on this topic with examples. 7.2.3. Object Definition and Object Version Usage </1/0>,</1/1>,</3/0>,</44/0>;ver=2.2 It seems this is an area that will need clarification in upcoming specifications. For now, however, it would be helpful if leshan allowed the more compact format ... There is discussion in the OMA DSME group that would codify the following behavior: </44>;ver=2.2, </44/0>,</44/1> is OK. |
I answer to that at : #1315 (comment) |
As I said at #1315 (comment), my bet this will not affect LWM2M v1.0 or LWM2M v1.1. So I think we can close this issue ? |
Yes it's a good idea. Thanks for explanation. |
We noticed that after upgrading to leshan-2.0.0-M7, some devices stopped successfully registering in leshan server. We are observing following error:
It seems that the "Object Version" attribute is attached to an object instance (e.g. /1/0) when it is only allowed for the object.
We know that this behavior is not fully consistent with the LwM2M standard but maybe we should allow such devices to register in the Leshan server ?
The text was updated successfully, but these errors were encountered: