Skip to content

Commit

Permalink
doc: services: device_mgmt: smp_groups: img_mgmt: Add sha has note
Browse files Browse the repository at this point in the history
Adds a note on when the "sha" hash field can be provided or not
and what the difference in operation is.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
  • Loading branch information
nordicjm authored and carlescufi committed May 9, 2023
1 parent aaed91e commit bb0a85a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions doc/services/device_mgmt/smp_groups/smp_group_1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,14 @@ where:
| "off" | offset of image chunk the request carries |
+-----------------------+---------------------------------------------------+
| "sha" | SHA256 hash of an upload; this is used to |
| | identify an upload session, for example to allow |
| | MCUmgr to continue a broken session. This must be |
| | a full SHA256 of the whole image being uploaded, |
| | and is optionally used for image verification |
| | purposes. Should only be present if "off" is zero |
| | identify an upload session (e.g. to allow MCUmgr |
| | to continue a broken session), and for image |
| | verification purposes. This must be a full SHA256 |
| | hash of the whole image being uploaded, or not |
| | included if the hash is not available (in which |
| | case, upload session continuation and image |
| | verification functionality will be unavailable). |
| | Should only be present if "off" is zero. |
+-----------------------+---------------------------------------------------+
| "data" | optional image data |
+-----------------------+---------------------------------------------------+
Expand All @@ -320,6 +323,9 @@ purposes.
If library gets request with "off" equal zero it checks stored "sha" within its
state and if it matches it will respond to update client application with
offset that it should continue with.
If this hash is not available (e.g. because a file is being streamed) then it
must not be provided, image verification and upload session continuation
features will be unavailable in this case.

Image upload response
=====================
Expand Down

0 comments on commit bb0a85a

Please sign in to comment.