Skip to content

Commit d788bc6

Browse files
de-nordiccarlescufi
authored andcommitted
mgmt/mcumgr: Correct packet length information
The packet length should include length of CRC16. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 8d40928 commit d788bc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/mgmt/mcumgr/serial.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
* | -------------- | ------------------------------------------------------- |
3636
* | 0x06 0x09 | Byte pair indicating the start of a packet. |
3737
* | 0x04 0x14 | Byte pair indicating the start of a continuation frame. |
38-
* | Packet length | The combined total length of the *unencoded* body. |
38+
* | Packet length | The combined total length of the *unencoded* body plus |
39+
* | | the final CRC (2 bytes). Length is in Big-Endian format.|
3940
* | Body | The actual SMP data (i.e., 8-byte header and CBOR |
4041
* | | key-value map). |
4142
* | CRC16 | A CRC16 of the *unencoded* body of the entire packet. |

0 commit comments

Comments
 (0)