From d788bc6df0a29dba06bb5c1c410f8c3b017d8186 Mon Sep 17 00:00:00 2001 From: Dominik Ermel Date: Fri, 5 Nov 2021 12:37:39 +0000 Subject: [PATCH] mgmt/mcumgr: Correct packet length information The packet length should include length of CRC16. Signed-off-by: Dominik Ermel --- include/mgmt/mcumgr/serial.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/mgmt/mcumgr/serial.h b/include/mgmt/mcumgr/serial.h index 0e9b132586c..a0d973efaa4 100644 --- a/include/mgmt/mcumgr/serial.h +++ b/include/mgmt/mcumgr/serial.h @@ -35,7 +35,8 @@ * | -------------- | ------------------------------------------------------- | * | 0x06 0x09 | Byte pair indicating the start of a packet. | * | 0x04 0x14 | Byte pair indicating the start of a continuation frame. | - * | Packet length | The combined total length of the *unencoded* body. | + * | Packet length | The combined total length of the *unencoded* body plus | + * | | the final CRC (2 bytes). Length is in Big-Endian format.| * | Body | The actual SMP data (i.e., 8-byte header and CBOR | * | | key-value map). | * | CRC16 | A CRC16 of the *unencoded* body of the entire packet. |