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

LwM2mNodeTextEncoder do not support OPAQUE resources #675

Closed
davideicardi opened this issue Apr 5, 2019 · 2 comments
Closed

LwM2mNodeTextEncoder do not support OPAQUE resources #675

davideicardi opened this issue Apr 5, 2019 · 2 comments
Labels
client Impact LWM2M client new feature New feature from LWM2M specification server Impact LWM2M server

Comments

@davideicardi
Copy link
Contributor

The LwM2mNodeTextEncoder doesn't support encoding OPAQUE resources.
From specification it seems to be a supported scenario: http://www.openmobilealliance.org/release/LightweightM2M/V1_0_2-20180209-A/OMA-TS-LightweightM2M-V1_0_2-20180209-A.pdf

From APPENDIX C:

Opaque: Represented as a Base64 encoding of the binary data [RFC4648]. For example, the sequence of bytes (in hex notation) {0x01, 0x02, 0x03, 0x04, 0x05} converts to the ASCII string “AQIDBAU=” in Base64 encoding.

It is by design or it is just a missing feature? Can I try to write a pull request?

thanks!

@sbernard31 sbernard31 added client Impact LWM2M client new feature New feature from LWM2M specification server Impact LWM2M server labels Apr 5, 2019
@sbernard31
Copy link
Contributor

We started to implement the specification when it was just a draft.
By the past, this was not allowed : http://www.openmobilealliance.org/release/LightweightM2M/V1_0-20141126-C/OMA-TS-LightweightM2M-V1_0-20141126-C.pdf

And it seems we missed this addition.

Can I try to write a pull request?

of course :)
We have a Base64 class which could help, see https://github.com/eclipse/leshan/blob/leshan-1.0.0-M10/leshan-core/src/main/java/org/eclipse/leshan/util/Base64.java

@sbernard31
Copy link
Contributor

This is now implemented in : https://github.com/eclipse/leshan/releases/tag/leshan-1.0.0-M11
Here an issue about potential enhancement and future behavior changing : #678

Thx @davideicardi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Impact LWM2M client new feature New feature from LWM2M specification server Impact LWM2M server
Projects
None yet
Development

No branches or pull requests

2 participants