Skip to content
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

Client responds TLV payload not including Object Instance ID #463

Closed
PeterEB opened this issue Feb 2, 2018 · 4 comments
Closed

Client responds TLV payload not including Object Instance ID #463

PeterEB opened this issue Feb 2, 2018 · 4 comments
Labels
bug Dysfunctionnal behavior client Impact LWM2M client

Comments

@PeterEB
Copy link

PeterEB commented Feb 2, 2018

When I send a Read request to leshan client demo to read object /3 and /6. The client responds TLV payload not including the Object Instance ID.

But in LwM2M Technical Specification. It show even Request on Single-Instance Object. The responds TLV payload should including the Object Instance ID and all its readable Resources.

LwM2M Technical Specification 6.4.3.2:
tlv

The leshan client demo responds TLV payload:

// Read /3 with TLV Format
<Buffer c8 00 12 4c 65 73 68 61 6e 20 44 65 6d 6f 20 44 65 76 69 63 65 c8 01 09 4d 6f 64 65 
  6c 20 35 30 30 c8 02 0f 4c 54 2d 35 30 30 2d 30 30 30 2d 30 30 30 31 c5 03 31 2e 30 2e 30 
  c1 09 34 c4 0a 00 00 94 dd 83 0b 41 00 00 c4 0d 5a 72 e9 26 c3 0e 2b 30 38 c8 0f 0b 41 73 
  69 61 2f 54 61 69 70 65 69 c1 10 55 c4 11 44 65 6d 6f c5 12 31 2e 30 2e 31 c5 13 31 2e 30 
  2e 32 c1 14 04 c4 15 00 00 b8 00 >

// Read /6 with TLV Format
<Buffer c8 00 08 c0 35 00 00 00 00 00 00 c8 01 08 40 59 00 00 00 00 00 00 c4 05 5a 72 eb df>
@sbernard31
Copy link
Contributor

In the draft version there was a kind of optimization where object level was optional for single instance object.

But it seems OMA changed this. Now the spec say :
"For simplicity and to prevent any ambiguity on Object Instance Identity, when the Object Instance ID is not specified in the request, the Object Instance TLV MUST be used, whatever the number of Object Instances (1 or more) to return to the LwM2M Server."

So I will fix it.

@sbernard31 sbernard31 added bug Dysfunctionnal behavior client Impact LWM2M client labels Feb 2, 2018
@sbernard31
Copy link
Contributor

@PeterEB the #466 should fix this issue.
If you have time, you could review the PR or just test it to see if it behave better now.

@PeterEB
Copy link
Author

PeterEB commented Feb 7, 2018

Great! It works well! 😍

@sbernard31
Copy link
Contributor

#466 is integrated in master now.
Thx for reporting this.

danielhqv pushed a commit to husqvarnagroup/leshan that referenced this issue Mar 9, 2018
…ance object.

This optimization was removed from the specification.
The spec say now :
For simplicity and to prevent any ambiguity on Object Instance Identity,
when the Object Instance ID is not specified in the request, the Object
Instance TLV MUST be used, whatever the number of Object Instances (1 or
more) to return to the LwM2M Server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Dysfunctionnal behavior client Impact LWM2M client
Projects
None yet
Development

No branches or pull requests

2 participants