-
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
leshan demo server object version failure #1315
Comments
There appears to be an ambiguity/error introduced in the specification between V1.1.1 and V1.2 with respect to Object versioning. While neither specification appears to allow Object Instance versioning explicitly, V1.2 has an example that does show it. 7.2.3. Object Definition and Object Version Usage At [OMNA], the Object ID:44 will be registered at least twice: An LwM2M Client supporting LwM2M Enabler version 1.0 registers this Object in version 2.2 along with the Server Object version 1.0 ("urn:oma:lwm2m:oma:1"), and the Device Object version 1.0 ("urn:oma:lwm2m:oma:3"). The registration payload is: </1/0>,</1/1>,</3/0>,</44/0>;ver=2.2 Version: 1.1.1 - 2019 06 17
|
re opened and linked to #1273 request support for more compact format where version is attached to object/instance, but applied to whole object, and checked that no object has multiple versions ... this would maximize interoperability with clients other than Eclipse leshan and Wakaama. "Register", "Register Update", and "Discover" operations: </44>;ver=2.2, </44/0>,</44/1> is allowed. |
If I correctly understand the issue this is about attaching The specification is pretty clear about this, the version must be attached to object, correct ? At #1273 (comment), you raise that there is an inconsistency in LWM2M v1.2 specification between attribute definition and example correct ? When there is this kind of inconsistency, we think this is better to follow specification text body than example.
So I think we are not concerned by this issue. Here is our thoughts about interoperability (If you want to discuss about this general idea please open a dedicated issue) Do you open an issue about this at OMA ? or maybe you are member of OMA ? |
I work with two vice chairs of OMA... So yes, I've made them aware. There is text being discussed to clarify this case - and it would allow the behavior. It is, after-all, potentially more compact by a few bytes per object that is versioned. |
How this will affect the 1.0.x and 1.1.x LWM2M version ? |
I understand this will not affect LWM2M v1.0 or v1.1 so I think we can close it ? |
When I try connect to connect a lwm2m v1.1 client to leshan demo server I get an error relating to the object version
Is this an ambiguity in the spec?
Sep 27 22:57:53 ip-172-31-61-197 java[14287]: 2022-09-27 22:57:53,186 RegisterResource [TRACE] POST received : CON-POST MID=16738, Token=B10001, OptionSet={"Uri-Path":"rd", "Content-Format":"application/link-format", "Uri-Query":["lt=60","lwm2m=1.1","ep=urn:dev:test-dh01"]}, "</3303/0>,</1/0>;ver=1.1,</3/0>;".. 39 bytes
Sep 27 22:57:53 ip-172-31-61-197 java[14287]: 2022-09-27 22:57:53,186 LwM2mCoapResource [DEBUG] Invalid request [CON-POST MID=16738, Token=B10001, OptionSet={"Uri-Path":"rd", "Content-Format":"application/link-format", "Uri-Query":["lt=60","lwm2m=1.1","ep=urn:dev:test-dh01"]}, "</3303/0>,</1/0>;ver=1.1,</3/0>;".. 39 bytes] received on the resource /rd from Identity /104.220.84.132:52204[psk=urn:dev:test-dh01]
Sep 27 22:57:53 ip-172-31-61-197 java[14287]: org.eclipse.leshan.core.link.LinkParseException: Unable to parse link </1/0>;ver=1.1 in </3303/0>,</1/0>;ver=1.1,</3/0>;ver=1.1
Sep 27 22:56:53 ip-172-31-61-197 java[14287]: Caused by: java.lang.IllegalArgumentException: ver attribute is only applicable to [OBJECT], and so can not be assigned to /1/0
Sep 27 22:56:53 ip-172-31-61-197 java[14287]: at org.eclipse.leshan.core.link.lwm2m.attributes.MixedLwM2mAttributeSet.validate(MixedLwM2mAttributeSet.java:99)
Sep 27 22:56:53 ip-172-31-61-197 java[14287]: at org.eclipse.leshan.core.link.lwm2m.DefaultLwM2mLinkParser.parseCoreLinkFormat(DefaultLwM2mLinkParser.java:149)
The text was updated successfully, but these errors were encountered: