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

CBOR: Why is the CBOR content format limited to be used with singular resources / resource instances? #585

Open
ghost opened this issue Jun 10, 2024 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 10, 2024

Situation:

LWM2M 1.1 and LWM2M describe the CBOR format to be used on singular Resources or Resource instances

7.4.3. CBOR
The Concise Binary Object Representation format is used for "Read" and "Write" operations on singular Resources or Resource Instances.

In effect, the following ETS test fails due to inconsistency, as you can't query an object instance using CBOR.

6.1.3.8 LightweightM2M-1.1-int-212 – Setting basic information in CBOR format

The question now is: Why is CBOR restricted to single resources or resource instances? Should this be removed? Or should the ETS be changed?

@ghost ghost changed the title CBOR: Why i CBOR: Why is the CBOR content format limited to be used with singular resources / resource instances? Jun 10, 2024
@sbernard31
Copy link

(I'm not OMA member)

About the test :

In effect, the following ETS test fails due to inconsistency, as you can't query an object instance using CBOR.

6.1.3.8 LightweightM2M-1.1-int-212 – Setting basic information in CBOR format

I'm not sure I get you ? do you mean that this test require you to execute a Write OR Read request on an Object Instance with CBOR ?
If this is what you ask, on my side I didn't understand that.

For Write the tests says :

Successive WRITE (CoAP PUT) operations are performed on the Resources of the Instance 0 of the Server Object in
using the predefined values above. The CBOR data format (60) is used

(So this is about several write on Resource)

The Server verifies (READs/CoAP GET) the result of the WRITE operations by querying the Instance 0 of the Server
Object in using client preferred data format.

(This is a read on Object Instance but NOT using CBOR format, except if this is the client preferred data format ? but IMHO this is not a good preferred data format as this is a format with a lot of limitation : #514)

About the specification :

Why is CBOR restricted to single resources or resource instances?

I understand :

  • there is some simple FORMAT (e.g. TEXT, OPAQUE, CBOR ...) which can just hold value (so can only target resource instance or single resource)
  • some others (e.g. SENML_JSON, SENML_CBOR, TLV, ...) which can hold complex structure (so can be used for any LWM2M node)

Why ? I don't know exactly ... historical reasons ? flexibility (some format are more efficient or more simple to implement or more simple to debug ?)

@mkgillmore
Copy link

Do we fix the test or the specification. Group agrees to update both

@sbernard31
Copy link

@mkgillmore could you explain what was the issue and what will be the fix ?

(because my comment try to explain that I didn't see issue, so I would like to understand what I missed)

@mkgillmore
Copy link

The ETS and LwM2M spec appear to be unclear about how to test CBOR with multiple resource instances. This will be discussed in the next OMA DMSO meeting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants