doc: guides: device_mgmt: smp: fs: Add supported hash/checksum info
Adds information on the supported hash/checksum mcumgr command. Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
77374b3857
commit
7f56c06ea8
|
@ -20,6 +20,8 @@ File management group defines following commands:
|
|||
+-------------------+-----------------------------------------------+
|
||||
| ``2`` | File hash/checksum |
|
||||
+-------------------+-----------------------------------------------+
|
||||
| ``3`` | Supported file hash/checksum types |
|
||||
+-------------------+-----------------------------------------------+
|
||||
|
||||
File download
|
||||
*************
|
||||
|
@ -445,3 +447,80 @@ where:
|
|||
+-----------------------+---------------------------------------------------+
|
||||
|
||||
In case when "rc" is not 0, success, the other fields will not appear.
|
||||
|
||||
Supported file hash/checksum types
|
||||
**********************************
|
||||
|
||||
Command allows listing which hash and checksum types are available on a device.
|
||||
Requires Kconfig :kconfig:option:`CONFIG_MCUMGR_GRP_FS_CHECKSUM_HASH_SUPPORTED_CMD`
|
||||
to be enabled.
|
||||
|
||||
Supported file hash/checksum types request
|
||||
==========================================
|
||||
|
||||
Supported file hash/checksum types request header:
|
||||
|
||||
.. table::
|
||||
:align: center
|
||||
|
||||
+--------+--------------+----------------+
|
||||
| ``OP`` | ``Group ID`` | ``Command ID`` |
|
||||
+========+==============+================+
|
||||
| ``0`` | ``8`` | ``3`` |
|
||||
+--------+--------------+----------------+
|
||||
|
||||
The command sends empty CBOR map as data.
|
||||
|
||||
Supported file hash/checksum types response
|
||||
===========================================
|
||||
|
||||
Supported file hash/checksum types response header:
|
||||
|
||||
.. table::
|
||||
:align: center
|
||||
|
||||
+--------+--------------+----------------+
|
||||
| ``OP`` | ``Group ID`` | ``Command ID`` |
|
||||
+========+==============+================+
|
||||
| ``1`` | ``8`` | ``3`` |
|
||||
+--------+--------------+----------------+
|
||||
|
||||
CBOR data of successful response:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
format (0 = int, 1 = byte array)
|
||||
{
|
||||
(str)"types" : {
|
||||
(str)<hash_checksum_name> : {
|
||||
(str)"format" : (uint)
|
||||
(str)"size" : (uint)
|
||||
}
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
In case of error the CBOR data takes form:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
{
|
||||
(str)"rc" : (int)
|
||||
}
|
||||
|
||||
where:
|
||||
|
||||
.. table::
|
||||
:align: center
|
||||
|
||||
+-----------------------+---------------------------------------------------+
|
||||
| <hash_checksum_name> | name of the hash/checksum type |
|
||||
| | :ref:`mcumgr_group_8_hash_checksum_types` |
|
||||
+-----------------------+---------------------------------------------------+
|
||||
| "format" | format that the hash/checksum returns where 0 is |
|
||||
| | for numerical and 1 is for byte array. |
|
||||
+-----------------------+---------------------------------------------------+
|
||||
| "size" | size (in bytes) of output hash/checksum response. |
|
||||
+-----------------------+---------------------------------------------------+
|
||||
|
||||
In case when "rc" is not 0, success, the other fields will not appear.
|
||||
|
|
Loading…
Reference in a new issue