Closed Maartenwn closed 4 months ago
Thanks for the detailed tests and examples! Is there a standard Zephyr example that I can test with?
Seeing the download method as a regular call instead of a generator makes me realize that this should be an option for all uploads and downloads.
Maybe something like
download is a regular async function
download_iter is the async iterator (not sure I like that name)
download would wrap download_iter
And this approach would be for all download/upload methods, including firmware updates.
What do you think?
Might be nice to check the checksum after uploading a file to check if the file is correctly uploaded.
That would be nice! Like a default arg that will do the SMP calls asking for the checksum from the device, then compares with a checksum calculated from smpclient?
In the Zephyr tree, it looks like samples/subsys/mgmt/mcumgr/smp_svr with overlay-fs.conf
would be the closest match.
In the Zephyr tree, it looks like samples/subsys/mgmt/mcumgr/smp_svr with
overlay-fs.conf
would be the closest match.
Looks the best however that example doesn't enable hashing by default. This can be enabled by enabling the MCUMGR_GRP_FS_CHECKSUM_HASH. You also have to enable an hashing algoritm by setting MCUMGR_GRP_FS_CHECKSUM_IEEE_CRC32 and/or MCUMGR_GRP_FS_HASH_SHA256 (this requires also setting an backend), see https://docs.zephyrproject.org/latest/services/device_mgmt/smp_groups/smp_group_8.html#file-hash-checksum
Hello! The breaking changes from SMP 3.0.1 have been merged to main as of e5727fb8caa5a9c4bdb3e1487bd7f8258526b82d. This branch can be rebased to integrate the changes. Primarily it's renaming ErrorV0 -> ErrorV1 and ErrorV1 -> ErrorV2.
Might be nice to check the checksum after uploading a file to check if the file is correctly uploaded.
That would be nice! Like a default arg that will do the SMP calls asking for the checksum from the device, then compares with a checksum calculated from smpclient?
I am not sure if this belongs in this pr, as this could be in a separate pr.
I am not sure if this belongs in this pr, as this could be in a separate pr.
Agreed, we'll move along.
Added file management.
As this uses changes in smp that are currently not released this will be draft.
Might be nice to check the checksum after uploading a file to check if the file is correctly uploaded.