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

Support of send operation for single resource data with TLV format ? #761

Closed
EmbGangsta opened this issue Mar 20, 2024 · 10 comments
Closed

Comments

@EmbGangsta
Copy link

I dont know if it's normal or a bug, but when I run the wakaama client demo with the "send 123 /3/0/9" command, I can see today the supported format is only SENML JSON or SENML CBOR.

Would it be possible to support TLV as well ?

@EmbGangsta EmbGangsta changed the title Support of send operation for single resource data ? Support of send operation for single resource data with TLV format ? Mar 20, 2024
@sbernard31
Copy link
Contributor

At least from LWM2M specification point of view.

TLV is not allowed for send command :

The value included in the payload MUST be either SenML JSON or SenML CBOR format described in Section 7.4. Data Formats for Transferring Resource Information. As example:

source : LWM2M-v1.1.1@core§6.4.6. Send Operation

@EmbGangsta
Copy link
Author

Ok in that case that makes sense, thank you for confirmation.

Is the SenML CBOR more efficient than TLV in term of data size ?

@sbernard31
Copy link
Contributor

I don't know. 🤷

TLV is a binary format so it should be pretty efficient.
In LWM2M v1.0.x, it was the only binary format and probably the most used as you can do anything with it and it was mandatory at client and server side.

LWM2M v1.1.x more or less deprecates TLV :

LwM2M Clients supporting LwM2M TS 1.1 or newer SHOULD NOT use the legacy TLV or JSON formats.

And introduces SenML-CBOR which is based on CBOR described as :

The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation

(source : RFC8949 § Abstract)

So I guess it should be pretty efficient too but I don't know compare to TLV
I suppose that authors add this format because this is an IETF standard (See RFC8428) contrary to TLV which is LWM2M only ?
(It also seems that SenML-CBOR support timestamped value but don't know if this is supported by Wakaama)

But the funny part, in LWM2M v1.2.x , authors introduce another format called LwM2M CBOR which is suppose to be more efficient but is NOT an IETF standard and WITHOUT timestamped value support ... (probably not supported by Wakaama because if I remember well Wakaama is about LWM2M v1.1.x )

@EmbGangsta
Copy link
Author

EmbGangsta commented Mar 20, 2024

Thanks again.

I suppose yes that CBOR is efficient too, I will compare the data part when doing a read with TLV and a send with senml CBOR. I am doing tests with Wireshark/tcpdump on client side to evaluate data usage between formats
Actually I would like to use LWM2M for embedded systems to send binary payloads most of the time ... so I was looking for something efficient !!

I hope the LWM2M standards will converge with something supported by many constructors. Today I am using Wakaama but in the final commercial product maybe we will use the embedded LWM2M stack from modem ...
BTW, what are the legal rules in term of commercial reuse of Wakaama code in a finished sold product ??

@sbernard31
Copy link
Contributor

BTW, what are the legal rules in term of commercial reuse of Wakaama code in a finished sold product ??

Wakaama is dual licensing so you can choose to use one or another of those 2 licenses :

@EmbGangsta
Copy link
Author

EmbGangsta commented Mar 22, 2024 via email

@sbernard31
Copy link
Contributor

I don't know what you called "connection".

I noticed that sometimes I have to update registration before to send Coap/CBOR data but sometimes it's not needed ...

Hard to say but maybe you behind NAT and so from a Server point of view your client IP changes and so you need to do an update ?

See : eclipse-leshan/leshan#1544

@EmbGangsta
Copy link
Author

EmbGangsta commented Mar 22, 2024 via email

@sbernard31
Copy link
Contributor

Please read all answers about : eclipse-leshan/leshan#1544
And also links provided in those answers.

@LukasWoodtli
Copy link
Contributor

@EmbGangsta Can we close this issue? As mentioned by @sbernard31 TLV is not allowed in send commands. So we will not implement that in Wakaama. You should probably use SENML CBOR for your case.

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

No branches or pull requests

3 participants