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

lwm2m: block-wise context retrieval method #57165

Closed
RomainPelletant opened this issue Apr 24, 2023 · 1 comment
Closed

lwm2m: block-wise context retrieval method #57165

RomainPelletant opened this issue Apr 24, 2023 · 1 comment
Assignees
Labels
area: LWM2M bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@RomainPelletant
Copy link
Contributor

Describe the bug
Based on Zephyr LwM2M client and Leshan software, OTA feature in push mode in not able to success due to token update between each block-wise packet from Leshan (Californium precisely).
It seems that token changes during block-wise transfer is a valid behavior : here

To Reproduce
Steps to reproduce the behavior:

  1. LwM2M client sample with OTA object implemented in push mode
  2. Write binary from Leshan on 5/0/0 object
  3. LwM2M client creates the block-wise context successfully
  4. The second block-wise transferred cannot be associated to a block context cause the token has changed (and block-wise context retrieval is based on token)

Expected behavior
Complete an entire block-wise transfer

Additional context
It is possible to disable that feature from Californium side (as noticed in Leshan/Californium issue) in setting this line in Californium config : COAP.BLOCKWISE_REUSE_TOKEN=true

Do you see a method to update block-wise context retrieval?

@RomainPelletant RomainPelletant added the bug The issue is a bug, or the PR is fixing a bug label Apr 24, 2023
@rlubos
Copy link
Contributor

rlubos commented Apr 24, 2023

Perhaps instead of identifying the block transfer with a token, we could identify one with the LwM2M resource path? I don't really see another option, given that we can no longer rely on a token, there's nothing else constant at the CoAP level other than URI.

token/tkl fields of struct lwm2m_block_context in such case no longer seem to be needed, and we could replace level/res_id/res_inst_id with a proper struct lwm2m_obj_path entry, to identify the block context.

Any thoughts? CC @SeppoTakalo

RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant pushed a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
RomainPelletant pushed a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
Replace block context retrieval using object path instead of token.
Changing token between each block is a correct behavior and restore a functional link with Leshan/Californium
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
Replace block context retrieval using object path instead of token.
Changing token between each block is a correct behavior and restore a functional link with Leshan/Californium
Fix issue zephyrproject-rtos#57165

Signed-off-by: RomainPelletant <[email protected]>
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
Replace block context retrieval using object path instead of token.
Changing token between each block is a correct behavior and restore a functional link with Leshan/Californium
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
Replace block context retrieval using object path instead of token.
Update block context structure
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
Replace block context retrieval using object path instead of token.
Update block context structure
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
Replace block context retrieval using object path instead of token.
Update block context structure
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
Replace block context retrieval using object path instead of token.
Update block context structure
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
Replace block context retrieval using object path instead of token.
Update block context structure
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 25, 2023
Replace block context retrieval using object path instead of token.
Update block context structure
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
@jgl-meta jgl-meta added the priority: low Low impact/importance bug label Apr 25, 2023
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 26, 2023
Replace block context retrieval using object path instead of token.
Update block context structure
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
RomainPelletant added a commit to RomainPelletant/zephyr that referenced this issue Apr 26, 2023
Replace block context retrieval using object path instead of token.
Update block context structure
Fix issue zephyrproject-rtos#57165

Signed-off-by: romain pelletant <[email protected]>
carlescufi pushed a commit that referenced this issue May 3, 2023
Replace block context retrieval using object path instead of token.
Update block context structure
Fix issue #57165

Signed-off-by: romain pelletant <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: LWM2M bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants