From 4e8c128d2f200f52d65b2d92cd18f652e5e398ab Mon Sep 17 00:00:00 2001 From: Teemu Takaluoma Date: Wed, 13 Oct 2021 11:07:30 +0300 Subject: [PATCH] mbed-cloud-client-example 4.11.1 --- CHANGELOG.md | 4 ++++ mbed-cloud-client.lib | 2 +- pal-platform/pal-platform.json | 4 ++-- source/fota_platform_hooks_impl.cpp | 20 ++++++++++++++------ west.yml | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef831fd..458d92e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog for Pelion Device Management Client example application +## Release 4.11.1 (11.10.2021) + +- Updated Parsec to 0.6.0 version. This version is compatible with Mbed TLS 2.27.0. + ## Release 4.11.0 (17.09.2021) - Application restructuring: diff --git a/mbed-cloud-client.lib b/mbed-cloud-client.lib index 07619d3..be8505e 100644 --- a/mbed-cloud-client.lib +++ b/mbed-cloud-client.lib @@ -1 +1 @@ -https://github.com/PelionIoT/mbed-cloud-client/#105a1846277c80e5eb15ad74de7e4d7b15e57c26 +https://github.com/PelionIoT/mbed-cloud-client/#8a30590179cdfb4c6949a7f5b14cae39448d8454 diff --git a/pal-platform/pal-platform.json b/pal-platform/pal-platform.json index a0a930a..2e85620 100644 --- a/pal-platform/pal-platform.json +++ b/pal-platform/pal-platform.json @@ -52,11 +52,11 @@ "to": "Middleware/trusted_storage/trusted_storage" }, "parsec_se_driver": { - "version": "0.5.0", + "version": "0.6.0", "from": { "protocol": "git", "location": "https://github.com/parallaxsecond/parsec-se-driver.git", - "tag": "0.5.0" + "tag": "0.6.0" }, "to": "Middleware/parsec_se_driver/parsec_se_driver" }, diff --git a/source/fota_platform_hooks_impl.cpp b/source/fota_platform_hooks_impl.cpp index e2c71c6..d68041d 100644 --- a/source/fota_platform_hooks_impl.cpp +++ b/source/fota_platform_hooks_impl.cpp @@ -37,13 +37,17 @@ static fota_component_desc_info_t external_component_info; /*Subcomponent callbacks*/ int sub_component_rollback_handler(const char *comp_name, const char *sub_comp_name, const uint8_t *vendor_data, size_t vendor_data_size, void *app_ctx) { - printf("sub_component_rollback_handler sub_comp_name: %s, vendor_data: %.*s", sub_comp_name, (int)vendor_data_size, vendor_data); + printf("-----------------------------------------------------------------------------------\n"); + printf("sub_component_rollback_handler CB invoked for sub_comp_name: %s, vendor_data: %.*s\n", sub_comp_name, (int)vendor_data_size, vendor_data); + return FOTA_STATUS_SUCCESS; } int sub_component_finalize_handler(const char *comp_name, const char *sub_comp_name, const uint8_t *vendor_data, size_t vendor_data_size, fota_status_e fota_status, void *app_ctx) { - printf("sub_component_finalize_handler sub_comp_name: %s, vendor_data: %.*s", sub_comp_name, (int)vendor_data_size, vendor_data); + printf("-----------------------------------------------------------------------------------\n"); + printf("sub_component_finalize_handler CB invoked for sub_comp_name: %s, vendor_data: %.*s\n", sub_comp_name, (int)vendor_data_size, vendor_data); + return FOTA_STATUS_SUCCESS; } #endif //#if defined(TARGET_LIKE_LINUX) && (MBED_CLOUD_CLIENT_FOTA_SUB_COMPONENT_SUPPORT == 1) @@ -60,9 +64,11 @@ static void print_component_info(const char *comp_name, const char *sub_comp_nam } static int pdmc_component_verifier(const char *comp_name, const char *sub_comp_name, const uint8_t *vendor_data, size_t vendor_data_size, void* app_ctx) -{ - printf("pdmc_component_verifier called for %s\n", comp_name); +{ + printf("-----------------------------------------------------------------------------------\n"); + printf("pdmc_component_verifier CB invoked for sub_comp_name: %s, vendor_data: %.*s\n", sub_comp_name, (int)vendor_data_size, vendor_data); print_component_info(comp_name, sub_comp_name, vendor_data, vendor_data_size); + return FOTA_STATUS_SUCCESS; } @@ -89,6 +95,8 @@ static int pdmc_component_installer(const char *comp_name, const char *sub_comp_ #else static int pdmc_component_installer(const char *comp_name, const char *sub_comp_name, const char *file_name, const uint8_t *vendor_data, size_t vendor_data_size, void *app_ctx) { + printf("-----------------------------------------------------------------------------------\n"); + printf("pdmc_component_installer CB invoked\n"); print_component_info(comp_name, sub_comp_name, vendor_data, vendor_data_size); return FOTA_STATUS_SUCCESS; } @@ -127,7 +135,7 @@ int fota_platform_init_hook(bool after_upgrade) dummy_sub_component_desc.rollback_order = 2; dummy_sub_component_desc.verify_cb= pdmc_component_verifier; dummy_sub_component_desc.verify_order = 1; - ret = fota_sub_component_add("MAIN","img1_id", &dummy_sub_component_desc); //Component MAIN registered by default during fota initialization, no need to call `fota_component_add` for MAIN component. + ret = fota_sub_component_add("MAIN","BL", &dummy_sub_component_desc); //Component MAIN registered by default during fota initialization, no need to call `fota_component_add` for MAIN component. if (ret != 0){ return ret; } @@ -141,7 +149,7 @@ int fota_platform_init_hook(bool after_upgrade) dummy_sub_component_desc2.rollback_order = 1; dummy_sub_component_desc2.verify_cb = pdmc_component_verifier; dummy_sub_component_desc2.verify_order = 2; - ret = fota_sub_component_add("MAIN","img2_id", &dummy_sub_component_desc2);//Component MAIN registered by default during fota initialization, no need to call `fota_component_add` for MAIN component. + ret = fota_sub_component_add("MAIN","rootfs", &dummy_sub_component_desc2);//Component MAIN registered by default during fota initialization, no need to call `fota_component_add` for MAIN component. #endif return ret; diff --git a/west.yml b/west.yml index 88be4c8..ccf20e1 100644 --- a/west.yml +++ b/west.yml @@ -10,7 +10,7 @@ manifest: - name: pelion-dm repo-path: mbed-cloud-client remote: PelionIoT - revision: 105a1846277c80e5eb15ad74de7e4d7b15e57c26 + revision: 8a30590179cdfb4c6949a7f5b14cae39448d8454 path: modules/lib/pelion-dm - name: zephyr remote: zephyrproject-rtos