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

Does Californium PR 2088 harm Leshan? #1499

Closed
boaks opened this issue Aug 25, 2023 · 15 comments
Closed

Does Californium PR 2088 harm Leshan? #1499

boaks opened this issue Aug 25, 2023 · 15 comments
Labels
question Any question about leshan

Comments

@boaks
Copy link

boaks commented Aug 25, 2023

Question

Please read the comment by SeppoTakalo.

This explains, that using different token for an blockwise transfer seems to break some function in leshan.
I'm not sure, about that, but maybe someone checks the leshan implementation. If that breaks leshan, as short term solution please adjust the application specific default value for COAP.BLOCKWISE_REUSE_TOKEN to true.

In my understanding of CoAP RFC7252, the freedom of the client to choose the token implies, that the server doesn't make assumptions about the token and the server must not bind state to it (the second part is my interpretation).

If leshan requires to bind server-side state to the token, I would appreciate, if that could be discussed in the IETF core mail list or the IETF Constrained Application Protocol (CoAP): Corrections and Clarifications.

@boaks boaks added the question Any question about leshan label Aug 25, 2023
@sbernard31
Copy link
Contributor

Until now, nobody report issue about it.

If I'm not wrong this was added in Californium 3.8 ?

Leshan depends to Californium 3.8 only since v2.0.0-M11) which is pretty recent and so maybe not so used.

@JaroslawLegierski do you know if you face issue about that with Leshan 2.0.0-M11 or 2.0.0-M12 ? Maybe you are using COAP.BLOCKWISE_REUSE_TOKEN =true ?

About blockwise we are just using transparent blockwise transfer, so I'm not sure what could be specific to Leshan. My first guess if there is a problem this is not limited to LWM2M use case.

@boaks
Copy link
Author

boaks commented Aug 25, 2023

Until now, nobody report issue about it.

That's good the read.

About blockwise we are just using transparent blockwise transfer, so I'm not sure what could be specific to Leshan.

No, the Californium transparent blockwise transfer doesn't use the token to related the transfer's requests.
Let's see, what other reports.

@jvermillard
Copy link
Contributor

It breaks some lwm2m clients (for sure, the Zephyr one)

@boaks
Copy link
Author

boaks commented Aug 25, 2023

It breaks some lwm2m clients (for sure, the Zephyr one)

Hm, but that should be only the case, when Californium is the CoAP client and initiates the blockwise transfer.
Because, if zephyr is the client, zephyr is free to choose the token.
Californium itself doesn't use the token to relate server side state to it. At least I'm not aware.

@jvermillard
Copy link
Contributor

jvermillard commented Aug 25, 2023

"lwm2m clients" not "coap clients"

Exactly, when the LWM2M server pushes a large content to the LWM2M client (POST or PUT), the LWM2M server acts as a CoAP client.

I think the Zephyr client uses the token as a way to reassemble all the packets in a "single" transaction, and if you don't do so, how you can be sure you are assembling blocks of the same transaction?
LWM2M doesn't use Etag or anything alike (to discuss this with OMA https://github.com/OpenMobileAlliance/OMA_LwM2M_for_Developers/issues

@boaks
Copy link
Author

boaks commented Aug 25, 2023

I think the Zephyr client uses the token as a way to reassemble all the packets in a "single" transaction, and if you don't do so, how you can be sure you are assembling blocks of the same transaction?

Let's forward that question to IETF Constrained Application Protocol (CoAP): Corrections and Clarifications. And see, what we get as answer.

@boaks
Copy link
Author

boaks commented Aug 25, 2023

how you can be sure you are assembling blocks of the same transaction?

AFAIK, on the coap-client side, that's defined by the etag in the response.
And on the coap-server side, there is only one ongoing transaction.

@sbernard31
Copy link
Contributor

LWM2M doesn't use Etag

At least, I didn't find any reference to Etag in LWM2M v1.0.2, v1.1.1 and v1.2.1

@boaks
Copy link
Author

boaks commented Aug 25, 2023

If LwM2M refers to RFC7252 and RFC7959,it refers to the etag.

@boaks
Copy link
Author

boaks commented Aug 25, 2023

Anyway, details about RFC 7252, 7641, 7959 are in my opinion best discussed at the IETF/CORE.

@sbernard31
Copy link
Contributor

sbernard31 commented Aug 25, 2023

I just wanted to say that LWM2M says nothing about using etag or not using it.

If etag is needed for some COAP blockwise, FETCH or observe, this is more RFC/IETF concerns. (Not specific to LWM2M)

@JaroslawLegierski
Copy link
Contributor

@JaroslawLegierski do you know if you face issue about that with Leshan 2.0.0-M11 or 2.0.0-M12 ? Maybe you are using COAP.BLOCKWISE_REUSE_TOKEN =true ?

We are using the default implementation with COAP.BLOCKWISE_REUSE_TOKEN=false however we haven't encountered any specific issue till now.

@boaks
Copy link
Author

boaks commented Aug 31, 2023

Thanks a lot.
It' still unclear, why the zephyr lwm2m client fails and how to fix it.

@boaks
Copy link
Author

boaks commented Oct 18, 2023

AFAIK, the zephyr client has addressed that issue.
Though no other incompatibility issue was reported, I guess, this can be closed.
Any opinion?

@sbernard31
Copy link
Contributor

I guess we can close it too.

Thx for let us know.

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

No branches or pull requests

4 participants