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: blockwise transfer: device responds with block 0 instead of the correct block #66607

Closed
marco85mars20 opened this issue Dec 18, 2023 · 4 comments
Assignees
Labels
area: LWM2M bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@marco85mars20
Copy link
Collaborator

marco85mars20 commented Dec 18, 2023

Describe the bug
I have a TCP dump log showing the Leshan server requesting block 6 and correctly receiving the requested block. However, when requesting block 7, the device responds with block 0 (not sure if this is the correct term).

Testing on NordicSemi nRF52840 chip.
This appears to be an intermittent issue and can happen with any block, most of the time data is retrieved correctly.
Using Leshan Server-Demo Version 2.0.0-SNAPSHOT
SDK: NCS version 2.4.1

TCP-dump:

# Last 2 Block-transfers of previous successful transfer
# Request
21:09:30.531882 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 26
	0x0000:  6004 8e56 0022 113f XXXX XXXX XXXX XXXX  `..V.".?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0022 f1da  .C.?.{...3..."..
	0x0030:  4801 c66e b0aa f069 2814 5b44 b532 3632  H..n...i(.[D.262
	0x0040:  3432 0130 622d 1662 01b4                 42.0b-.b..
# Response
21:09:30.657153 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 275
	0x0000:  6000 0000 011b 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 011b 7d7a  ...........3..}z
	0x0030:  6845 c66e b0aa f069 2814 5b44 c22d 16b2  hE.n...i(.[D.-..
	0x0040:  01bc ff72 3797 aadb b6df f9eb 1755 a399  ...r7........U..
	0x0050:  8f43 a2b9 f0df 83e5 d460 834e f14b 456f  .C.......`.N.KEo
	0x0060:  347b 8cb7 1106 da7d 3aaf eb4f 9a36 172c  4{.....}:..O.6.,
	0x0070:  8e72 f6c6 c2d6 f248 a2d4 3ed2 8a71 e604  .r.....H..>..q..
	0x0080:  dbbb f534 6822 5b1f ec14 901b c171 22f7  ...4h"[......q".
	0x0090:  0a7a d1af 42b4 3b0b 7f1b 7853 c39a b25e  .z..B.;...xS...^
	0x00a0:  e81e 1513 2f92 07fa 4be1 e393 2795 277f  ..../...K...'.'.
	0x00b0:  6a39 a41e e897 ff00 1b3c 493e efb3 4365  j9.......<I>..Ce
	0x00c0:  663b 6d42 ec3f 3ff0 a9b3 1dd1 e7f7 9a85  f;mB.??.........
	0x00d0:  d6a1 3196 ee77 9989 fe23 4c57 6432 f6a0  ..1..w...#LWd2..
	0x00e0:  921c 5319 2243 2923 0868 112c b6c7 3972  ..S."C)#.h.,..9r
	0x00f0:  1680 2022 25ef ba81 8a93 04e8 b400 af9e  ..."%...........
	0x0100:  a3a5 2111 d031 c1ff 0084 d021 1971 f4a6  ..!..1.....!.q..
	0x0110:  020c f6a0 64e8 be6f 5eb4 8430 c7b0 d302  ....d..o^..0....
	0x0120:  e4a7 78a0 654a 040b c0c9 a004 cf34 0119  ..x.eJ.......4..
	0x0130:  e0d0 003a d004 cede 671e 9401 0d00 3852  ...:....g.....8R
	0x0140:  1923 1e                                  .#.
# Last Request
21:09:30.730108 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 26
	0x0000:  6004 8e56 0022 113f XXXX XXXX XXXX XXXX  `..V.".?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0022 f1c9  .C.?.{...3..."..
	0x0030:  4801 c66f b0aa f069 2814 5b44 b532 3632  H..o...i(.[D.262
	0x0040:  3432 0130 622d 1662 01c4                 42.0b-.b..
# Last Response
21:09:30.905228 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 199
	0x0000:  6000 0000 00cf 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 00cf c680  ...........3....
	0x0030:  6845 c66f b0aa f069 2814 5b44 c22d 16b2  hE.o...i(.[D.-..
	0x0040:  01c4 ffd4 0866 6980 0340 c959 b814 8449  .....fi..@.Y...I
	0x0050:  6da7 dede 82d6 d6b3 4c07 04c6 84e2 9f2b  m.......L......+
	0x0060:  02dc 3e1d d426 9446 c12d f271 999b 18a0  ..>..&.F.-.q....
	0x0070:  66d6 abe1 cd17 40ba b78e eb58 1a82 3c02  f.....@....X..<.
	0x0080:  426d 8630 dcfc bde8 f40f 527f 1378 8fc2  Bm.0......R..x..
	0x0090:  2f65 6b1f 8634 1fb2 cc80 895e 68c7 f3c9  /ek..4.....^h...
	0x00a0:  269f 3bb0 591c 6cd7 d3cc 72cd 4806 2319  &.;.Y.l...r.H.#.
	0x00b0:  14a9 3480 8bbd 0025 3025 8dbf 80f4 a000  ..4....%0%......
	0x00c0:  c6c0 e314 084d 9ea6 8025 8de3 5e18 6690  .....M...%..^.f.
	0x00d0:  08c3 1d3a 5302 3a40 4b16 49db d734 01ff  ...:S.:@K.I..4..
	0x00e0:  d9c4 0265 7ad2 3ec8 030a 706f 7373 756d  ...ez.>...possum
	0x00f0:  2030 250a c104 00                        .0%....
# Execute Request
21:09:30.997770 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 25
	0x0000:  6004 8e56 0021 113f XXXX XXXX XXXX XXXX  `..V.!.?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0021 b0b6  .C.?.{...3...!..
	0x0030:  4802 c670 0016 c119 9ee7 3d88 b532 3632  H..p......=..262
	0x0040:  3432 0130 0135 10ff 30                   42.0.5..0
# Execute ACK
21:09:31.577503 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 12
	0x0000:  6000 0000 0014 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 0014 f389  ...........3....
	0x0030:  6844 c670 0016 c119 9ee7 3d88            hD.p......=.
# Non-related notification
21:09:31.603272 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 22
	0x0000:  6000 0000 001e 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 001e 7337  ...........3..s7
	0x0030:  4845 91c9 7936 0aae e9e1 6729 61c6 622d  HE..y6....g)a.b-
	0x0040:  16ff c200 00a1                           ......
# ACK to previous notification
21:09:31.676791 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 4
	0x0000:  6004 8e56 000c 113f XXXX XXXX XXXX XXXX  `..V...?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 000c ce24  .C.?.{...3.....$
	0x0030:  6000 91c9                                `...
# Attempt 1: Request to start block-wise transfer - failed
21:09:31.681242 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 23
	0x0000:  6004 8e56 001f 113f XXXX XXXX XXXX XXXX  `..V...?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 001f 2639  .C.?.{...3....&9
	0x0030:  4801 c671 5802 246a 84ce f0ec b532 3632  H..qX.$j.....262
	0x0040:  3432 0130 622d 16                        42.0b-.
# Attempt 2: Request to start block-wise transfer - failed
21:09:33.803021 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 23
	0x0000:  6004 8e56 001f 113f XXXX XXXX XXXX XXXX  `..V...?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 001f 2639  .C.?.{...3....&9
	0x0030:  4801 c671 5802 246a 84ce f0ec b532 3632  H..qX.$j.....262
	0x0040:  3432 0130 622d 16                        42.0b-.
# Non-related notification
21:09:34.162074 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 22
	0x0000:  6000 0000 001e 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 001e 7337  ...........3..s7
	0x0030:  4845 91c9 7936 0aae e9e1 6729 61c6 622d  HE..y6....g)a.b-
	0x0040:  16ff c200 00a1                           ......
# ACK to previous notification
21:09:34.236880 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 4
	0x0000:  6004 8e56 000c 113f XXXX XXXX XXXX XXXX  `..V...?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 000c ce24  .C.?.{...3.....$
	0x0030:  6000 91c9                                `...
# Attempt 3: Request to start block-wise transfer - Successful
21:09:38.035624 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 23
	0x0000:  6004 8e56 001f 113f XXXX XXXX XXXX XXXX  `..V...?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 001f 2639  .C.?.{...3....&9
	0x0030:  4801 c671 5802 246a 84ce f0ec b532 3632  H..qX.$j.....262
	0x0040:  3432 0130 622d 16                        42.0b-.
# Block-wise transfer response: block-0
21:09:38.143600 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 274
	0x0000:  6000 0000 011a 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 011a 99da  ...........3....
	0x0030:  6845 c671 5802 246a 84ce f0ec c22d 16b1  hE.qX.$j.....-..
	0x0040:  0cff c200 00a1 d001 1c94 ffd8 ffe0 0010  ................
	0x0050:  4a46 4946 0001 0100 0001 0001 0000 ffdb  JFIF............
	0x0060:  0084 000a 0707 0807 060a 0808 080b 0a0a  ................
	0x0070:  0b0e 1810 0e0d 0d0e 1d15 1611 1823 1f25  .............#.%
	0x0080:  2422 1f22 2126 2b37 2f26 2934 2921 2230  $"."!&+7/&)4)!"0
	0x0090:  4131 3439 3b3e 3e3e 252e 4449 433c 4837  A149;>>>%.DIC<H7
	0x00a0:  3d3e 3b01 0a0b 0b0e 0d0e 1c10 101c 3b28  =>;...........;(
	0x00b0:  2228 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b  "(;;;;;;;;;;;;;;
	0x00c0:  3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b  ;;;;;;;;;;;;;;;;
	0x00d0:  3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b  ;;;;;;;;;;;;;;;;
	0x00e0:  3b3b 3b3b ffc0 0011 0800 e000 e003 0111  ;;;;............
	0x00f0:  0002 1101 0311 01ff c401 a200 0001 0501  ................
	0x0100:  0101 0101 0100 0000 0000 0000 0001 0203  ................
	0x0110:  0405 0607 0809 0a0b 1000 0201 0303 0204  ................
	0x0120:  0305 0504 0400 0001 7d01 0203 0004 1105  ........}.......
	0x0130:  1221 3141 0613 5161 0722 7114 3281 91a1  .!1A..Qa."q.2...
	0x0140:  0823                                     .#
# Block-wise transfer request block-1
21:09:38.223770 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 25
	0x0000:  6004 8e56 0021 113f XXXX XXXX XXXX XXXX  `..V.!.?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0021 11d3  .C.?.{...3...!..
	0x0030:  4801 c672 5802 246a 84ce f0ec b532 3632  H..rX.$j.....262
	0x0040:  3432 0130 622d 1661 14                   42.0b-.a.
# Block-wise transfer response: block-1
21:09:38.320891 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 274
	0x0000:  6000 0000 011a 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 011a a3f6  ...........3....
	0x0030:  6845 c672 5802 246a 84ce f0ec c22d 16b1  hE.rX.$j.....-..
	0x0040:  1cff 42b1 c115 52d1 f024 3362 7282 090a  ..B...R..$3br...
	0x0050:  1617 1819 1a25 2627 2829 2a34 3536 3738  .....%&'()*45678
	0x0060:  393a 4344 4546 4748 494a 5354 5556 5758  9:CDEFGHIJSTUVWX
	0x0070:  595a 6364 6566 6768 696a 7374 7576 7778  YZcdefghijstuvwx
	0x0080:  797a 8384 8586 8788 898a 9293 9495 9697  yz..............
	0x0090:  9899 9aa2 a3a4 a5a6 a7a8 a9aa b2b3 b4b5  ................
	0x00a0:  b6b7 b8b9 bac2 c3c4 c5c6 c7c8 c9ca d2d3  ................
	0x00b0:  d4d5 d6d7 d8d9 dae1 e2e3 e4e5 e6e7 e8e9  ................
	0x00c0:  eaf1 f2f3 f4f5 f6f7 f8f9 fa01 0003 0101  ................
	0x00d0:  0101 0101 0101 0100 0000 0000 0001 0203  ................
	0x00e0:  0405 0607 0809 0a0b 1100 0201 0204 0403  ................
	0x00f0:  0407 0504 0400 0102 7700 0102 0311 0405  ........w.......
	0x0100:  2131 0612 4151 0761 7113 2232 8108 1442  !1..AQ.aq."2...B
	0x0110:  91a1 b1c1 0923 3352 f015 6272 d10a 1624  .....#3R..br...$
	0x0120:  34e1 25f1 1718 191a 2627 2829 2a35 3637  4.%.....&'()*567
	0x0130:  3839 3a43 4445 4647 4849 4a53 5455 5657  89:CDEFGHIJSTUVW
	0x0140:  5859                                     XY
# Block-wise transfer request block-2
21:09:38.393938 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 25
	0x0000:  6004 8e56 0021 113f XXXX XXXX XXXX XXXX  `..V.!.?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0021 01d2  .C.?.{...3...!..
	0x0030:  4801 c673 5802 246a 84ce f0ec b532 3632  H..sX.$j.....262
	0x0040:  3432 0130 622d 1661 24                   42.0b-.a$
# Block-wise transfer response: block-2
21:09:38.515592 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 274
	0x0000:  6000 0000 011a 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 011a 792e  ...........3..y.
	0x0030:  6845 c673 5802 246a 84ce f0ec c22d 16b1  hE.sX.$j.....-..
	0x0040:  2cff 5a63 6465 6667 6869 6a73 7475 7677  ,.Zcdefghijstuvw
	0x0050:  7879 7a82 8384 8586 8788 898a 9293 9495  xyz.............
	0x0060:  9697 9899 9aa2 a3a4 a5a6 a7a8 a9aa b2b3  ................
	0x0070:  b4b5 b6b7 b8b9 bac2 c3c4 c5c6 c7c8 c9ca  ................
	0x0080:  d2d3 d4d5 d6d7 d8d9 dae2 e3e4 e5e6 e7e8  ................
	0x0090:  e9ea f2f3 f4f5 f6f7 f8f9 faff da00 0c03  ................
	0x00a0:  0100 0211 0311 003f 00f1 e883 34aa 17ae  .......?....4...
	0x00b0:  6902 36b5 831c ec91 0757 9234 c161 de9f  i.6......W.4.a..
	0x00c0:  4118 4c0a 9c1a 0636 802c 5bca 6047 75ea  A.L....6.,[.`Gu.
	0x00d0:  78a4 20ff 005d 0ffb 4b4c 0850 65a8 0244  x....]..KL.Pe..D
	0x00e0:  6cc8 7fda a421 a7e4 0c29 8c52 3f74 1ff0  l....!...).R?t..
	0x00f0:  a009 2dce c962 6f7a 9633 56e0 ef94 b83d  ..-..boz.3V....=
	0x0100:  6a84 3636 3ec6 8027 193d a90c 7714 c002  j.66>..'.=..w...
	0x0110:  8a04 2f97 40c6 6ca0 442e 940c 84ad 0222  ../.@.l.D......"
	0x0120:  2940 88cc 0290 0cf2 698c bba5 4a6d af11  )@......i...Jm..
	0x0130:  fa73 5161 c59e d5a3 7f68 a7d9 5f70 9209  .sQa.....h.._p..
	0x0140:  d72a                                     .*
# Block-wise transfer request block-3
21:09:38.593954 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 25
	0x0000:  6004 8e56 0021 113f XXXX XXXX XXXX XXXX  `..V.!.?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0021 f1d0  .C.?.{...3...!..
	0x0030:  4801 c674 5802 246a 84ce f0ec b532 3632  H..tX.$j.....262
	0x0040:  3432 0130 622d 1661 34                   42.0b-.a4
# Block-wise transfer response: block-3
21:09:38.706612 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 274
	0x0000:  6000 0000 011a 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 011a c8bf  ...........3....
	0x0030:  6845 c674 5802 246a 84ce f0ec c22d 16b1  hE.tX.$j.....-..
	0x0040:  3cff c2a9 1677 96b6 5b06 f73c d315 cb98  <....w..[..<....
	0x0050:  a091 b8c7 4a06 7c7f 6ff7 f77a 5048 c323  ....J.|.o..zPH.#
	0x0060:  799b b340 1348 bf68 8fcc 5ebd c500 54a0  y..@.H.h..^...T.
	0x0070:  648f c201 4082 193c b7cd 0325 923f 2b2d  d...@..<...%.?+-
	0x0080:  d9ba 5049 5e82 8b57 91e1 637e ecbc d1d0  ..PI^..W..c~....
	0x0090:  4378 fb26 cee4 e690 0a9f c3fe cd00 6dcd  Cx.&..........m.
	0x00a0:  68a6 51b4 f0c9 9a60 668b 27c9 db25 160d  h.Q....`f.'..%..
	0x00b0:  4509 751f 7a2c 03c5 c5c2 7de5 a432 58ef  E.u.z,....}..2X.
	0x00c0:  57f8 e3a0 0b09 7111 fe32 bf5a 1012 e73d  W.....q..2.Z...=
	0x00d0:  36b7 d298 1137 e540 1095 f4a0 4445 2801  6....7.@....DE(.
	0x00e0:  a568 01bb 690c 9225 f9c6 6803 ddbc 1b65  .h..i..%..h....e
	0x00f0:  b74e 880e 83a5 1145 9da4 731f bacb 4c44  .N.....E..s...LD
	0x0100:  f412 1401 f1f2 fc90 1f7a 422b d319 2413  .........zB+..$.
	0x0110:  7932 67b5 0058 9edf 389e 3fb8 d412 547f  y2g..X..8.?...T.
	0x0120:  bc68 290d a00d 49fc a6d3 e08b 7665 0334  .h)...I.....ve.4
	0x0130:  1266 81f3 5051 364c 8e52 9120 bc4a a280  .f..PQ6L.R...J..
	0x0140:  1dd2                                     ..
# Block-wise transfer request block-4
21:09:38.783885 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 25
	0x0000:  6004 8e56 0021 113f XXXX XXXX XXXX XXXX  `..V.!.?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0021 e1cf  .C.?.{...3...!..
	0x0030:  4801 c675 5802 246a 84ce f0ec b532 3632  H..uX.$j.....262
	0x0040:  3432 0130 622d 1661 44                   42.0b-.aD
# Block-wise transfer response: block-4
21:09:38.874643 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 274
	0x0000:  6000 0000 011a 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 011a b42d  ...........3...-
	0x0030:  6845 c675 5802 246a 84ce f0ec c22d 16b1  hE.uX.$j.....-..
	0x0040:  4cff 67a0 0da3 2fee 203f ecd0 50db 7e46  L.g.../..?..P.~F
	0x0050:  6981 2ece 6810 7934 00d3 6cad da80 216b  i...h.y4..l...!k
	0x0060:  2140 0cfb 3c8b f75a 8b06 a289 a64f bdcd  !@..<..Z.....O..
	0x0070:  201e 2e62 6187 8e98 0d3b 3f85 cfe3 400d  ...ba....;?...@.
	0x0080:  dadf 5a00 6503 1e9d 6803 d0bc 29e3 9360  ..Z.e...h...)..`
	0x0090:  91db cebc 0e37 0a8b 58bb 9ea9 a46b 0354  .....7..X....k.T
	0x00a0:  40f1 2647 ad5d c0d8 a080 a00f 902e be4c  @.&G.].........L
	0x00b0:  4628 4495 6828 2803 6b44 9235 b1bd 171b  F(D.h((.kD.5....
	0x00c0:  4c5e 5f43 d734 7513 32a7 8b61 c8fb a680  L^_C.4u.2..a....
	0x00d0:  225e 4d03 2699 b12f 1da9 0879 4dd8 957f  "^M.&../...yM...
	0x00e0:  1a62 2384 ff00 a429 f7a4 3279 47fa 6165  .b#....)..2yG.ae
	0x00f0:  e99a 6c42 0f99 837a 9a40 5d8d b7b7 95fd  ..lB...z.@].....
	0x0100:  ca06 5ab5 098f 9982 d319 a3f6 371f 3046  ..Z.........7.0F
	0x0110:  2bf4 a2c0 0814 d004 bf67 a008 9a1e 2802  +........g....(.
	0x0120:  3f27 8a00 af24 5408 81a1 140c 85a1 c74a  ?'...$T........J
	0x0130:  0060 2eb4 00a6 77c7 ddcd 210f 478c f505  .`....w...!.G...
	0x0140:  690c                                     i.
# Block-wise transfer request block-5
21:09:38.944949 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 25
	0x0000:  6004 8e56 0021 113f XXXX XXXX XXXX XXXX  `..V.!.?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0021 d1ce  .C.?.{...3...!..
	0x0030:  4801 c676 5802 246a 84ce f0ec b532 3632  H..vX.$j.....262
	0x0040:  3432 0130 622d 1661 54                   42.0b-.aT
# Block-wise transfer response: block-5
21:09:39.073694 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 274
	0x0000:  6000 0000 011a 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 011a c7ec  ...........3....
	0x0030:  6845 c676 5802 246a 84ce f0ec c22d 16b1  hE.vX.$j.....-..
	0x0040:  5cff eabc 21a0 ff00 6cde 7f7a 353d 2a82  \...!...l..z5=*.
	0x0050:  c7ba 68d6 11e9 f64b 0a01 9ef4 0d9a 1408  ..h....K........
	0x0060:  2803 e3cb 96df 3350 c443 40c2 802c fdcb  (.....3P.C@..,..
	0x0070:  1c7f 78d0 20b7 9159 7c99 3a52 188b 0149  ..x....Y|.:R...I
	0x0080:  f069 9242 c72e 6819 7ac4 c62d ae04 9dd7  .i.B..h.z..-....
	0x0090:  e5fa d202 b08f 6cdc d311 2423 787c 76e6  ......l...$#x|v.
	0x00a0:  8025 b75d d105 ef9c d202 5b0f f8fe 6cd1  .%.]......[...l.
	0x00b0:  d468 ded1 352b ad26 4924 b4f2 8b30 dbfb  .h..5+.&I$...0..
	0x00c0:  c4cd 31fa 9dee 97f1 06c7 cb8d 751d 0acc  ..1.........u...
	0x00d0:  cc17 0655 8f68 fea6 8e6a 88ab 40e5 ae2e  ...U.h...j..@...
	0x00e0:  2d2f 35a9 a58e dc43 0349 955d d9c0 a6e4  -/5....C.I.]....
	0x00f0:  d936 46b7 d834 b9c7 cadb 4fb3 52b8 58af  .6F..4....O.R.X.
	0x0100:  3787 c1ff 0053 75ff 007d 0a7a 06a5 27d1  7....Su..}.z..'.
	0x0110:  af21 ec92 0ff6 4d30 31af bf72 7648 a51a  .!....M01..rvH..
	0x0120:  9014 b752 006f bb40 1091 400c c500 284c  ...R.o.@..@...(L
	0x0130:  d023 d03e 186a b6da 75dc d14e e016 3b97  .#.>.j..u..N..;.
	0x0140:  3506                                     5.
# Non-related notification
21:09:39.088988 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 22
	0x0000:  6000 0000 001e 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 001e 7337  ...........3..s7
	0x0030:  4845 91c9 7936 0aae e9e1 6729 61c6 622d  HE..y6....g)a.b-
	0x0040:  16ff c200 00a1                           ......
# Block-wise transfer request block-6
21:09:39.154676 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 25
	0x0000:  6004 8e56 0021 113f XXXX XXXX XXXX XXXX  `..V.!.?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0021 c1cd  .C.?.{...3...!..
	0x0030:  4801 c677 5802 246a 84ce f0ec b532 3632  H..wX.$j.....262
	0x0040:  3432 0130 622d 1661 64                   42.0b-.ad
# ACK to previous notification
21:09:39.159440 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 4
	0x0000:  6004 8e56 000c 113f XXXX XXXX XXXX XXXX  `..V...?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 000c ce24  .C.?.{...3.....$
	0x0030:  6000 91c9                                `...
# Block-wise transfer response: block-6
21:09:39.348508 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 274
	0x0000:  6000 0000 011a 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 011a fa57  ...........3...W
	0x0030:  6845 c677 5802 246a 84ce f0ec c22d 16b1  hE.wX.$j.....-..
	0x0040:  6cff 88f5 f867 b7bd c3c5 2d5d c0d0 1d28  l....g....-]...(
	0x0050:  2028 03e3 f9ed 4a72 3914 1256 a061 4016  .(....Jr9..V.a@.
	0x0060:  aebe 58e3 4f6a 00ab 40cd 9b28 d2ef 4b94  ..X.Oj..@..(..K.
	0x0070:  b644 b174 6a17 6119 2e86 36da 6802 41c5  .D.tj.a...6.h.A.
	0x0080:  b7d4 d211 6e14 f3ed 1e4f e288 50bb 0105  ....n....O..P...
	0x0090:  b9d8 ae68 0343 4ed8 977f 30ca eda6 3337  ...h.CN...0...37
	0x00a0:  7b47 7059 4e0e 6860 7656 ba55 dfd9 a295  {GpYN.h`vV.U....
	0x00b0:  6dd9 83ae 7750 864e 74f9 d3ef 42e3 f0a6  m...wP.Nt...B...
	0x00c0:  044c 8636 e78a 5602 4e73 c1a0 6396 7b88  .L.6..V.Ns..c.{.
	0x00d0:  cf0e c28b 20b9 38d4 ae14 72d9 fad0 064e  ......8...r....N
	0x00e0:  ab3c d770 3438 5c33 039c 7341 264a 82ab  .<.p48\3..sA&J..
	0x00f0:  b5a8 196e 1861 64f9 8e0d 002b d867 ee4c  ...n.ad....+.g.L
	0x0100:  3f1a 622b 35ac 89d8 1fa1 a404 4bd6 802d  ?.b+5.......K..-
	0x0110:  5a67 cee3 8a06 8f4a f055 aead 753a 2a48  Zg.....J.U..u:*H
	0x0120:  eb6e 3bb5 2b17 73d6 1176 205f 4a64 0b40  .n;.+.s..v._Jd.@
	0x0130:  1f1f c374 c9c3 7229 0898 dba5 caee 84fc  ...t..r)........
	0x0140:  de94                                     ..

# Block-wise transfer request block-7
21:09:39.423687 IP6 XXXX:XXXX:XXXX:XXXX::1.5683 > YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860: UDP, length 25
	0x0000:  6004 8e56 0021 113f XXXX XXXX XXXX XXXX  `..V.!.?$.v`....
	0x0010:  0000 0000 0000 0001 YYYY YYYY YYYY YYYY  ........$.v`...(
	0x0020:  0f43 d53f b67b cdb7 1633 8c14 0021 b1cc  .C.?.{...3...!..
	0x0030:  4801 c678 5802 246a 84ce f0ec b532 3632  H..xX.$j.....262
	0x0040:  3432 0130 622d 1661 74                   42.0b-.at

# ERROR: Block-wise transfer response: block-0
21:09:39.549546 IP6 YYYY:YYYY:YYYY:YYYY:f43:d53f:b67b:cdb7.35860 > XXXX:XXXX:XXXX:XXXX::1.5683: UDP, length 274
	0x0000:  6000 0000 011a 1140 YYYY YYYY YYYY YYYY  `......@$.v`...(
	0x0010:  0f43 d53f b67b cdb7 XXXX XXXX XXXX XXXX  .C.?.{..$.v`....
	0x0020:  0000 0000 0000 0001 8c14 1633 011a 99d3  ...........3....
	0x0030:  6845 c678 5802 246a 84ce f0ec c22d 16b1  hE.xX.$j.....-..
	0x0040:  0cff c200 00a1 d001 1c94 ffd8 ffe0 0010  ................
	0x0050:  4a46 4946 0001 0100 0001 0001 0000 ffdb  JFIF............
	0x0060:  0084 000a 0707 0807 060a 0808 080b 0a0a  ................
	0x0070:  0b0e 1810 0e0d 0d0e 1d15 1611 1823 1f25  .............#.%
	0x0080:  2422 1f22 2126 2b37 2f26 2934 2921 2230  $"."!&+7/&)4)!"0
	0x0090:  4131 3439 3b3e 3e3e 252e 4449 433c 4837  A149;>>>%.DIC<H7
	0x00a0:  3d3e 3b01 0a0b 0b0e 0d0e 1c10 101c 3b28  =>;...........;(
	0x00b0:  2228 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b  "(;;;;;;;;;;;;;;
	0x00c0:  3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b  ;;;;;;;;;;;;;;;;
	0x00d0:  3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b 3b3b  ;;;;;;;;;;;;;;;;
	0x00e0:  3b3b 3b3b ffc0 0011 0800 e000 e003 0111  ;;;;............
	0x00f0:  0002 1101 0311 01ff c401 a200 0001 0501  ................
	0x0100:  0101 0101 0100 0000 0000 0000 0001 0203  ................
	0x0110:  0405 0607 0809 0a0b 1000 0201 0303 0204  ................
	0x0120:  0305 0504 0400 0001 7d01 0203 0004 1105  ........}.......
	0x0130:  1221 3141 0613 5161 0722 7114 3281 91a1  .!1A..Qa."q.2...
	0x0140:  0823                                     .#
# Leshan server detects the error and stops requesting new blocks
@marco85mars20 marco85mars20 added the bug The issue is a bug, or the PR is fixing a bug label Dec 18, 2023
@rlubos
Copy link
Contributor

rlubos commented Dec 19, 2023

I'm sort of confused here, as if you indeed use NCS version 2.4.1, that revision had no generic support for block transfer in LwM2M library. Can you check the latest main? There were some heavy development regarding block transfer support since the revision you mention, including #54761, #61858 and corresponding bugfixes.

@henrikbrixandersen henrikbrixandersen added the priority: low Low impact/importance bug label Dec 19, 2023
@marco85mars20
Copy link
Collaborator Author

@rlubos apologies for the confusion, we have been cherry-picking commits related to the block-wise transfer feature, also from the 2 PRs you have mentioned.
Everything works as expected most of the time, but sometimes we have noticed glitches, and this is one of them, that has been captured only once and by chance while doing some investigations.
We will be performing further testing with the latest main and report back in case we spot related issues.

@rlubos
Copy link
Contributor

rlubos commented Jan 31, 2024

@marco85mars20 Any updates?

@marco85mars20
Copy link
Collaborator Author

A few weeks ago we switched to NCS v3.4.99-ncs1-1 (aka v4.5.1), and we haven't observed this issue yet, but as well we have not done proper testing yet. I believe we can close this issue for the moment. I will open a new one in case needed.

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

4 participants