Skip to content

Commit

Permalink
Merge pull request #84 from PelionIoT/release-4.11.1
Browse files Browse the repository at this point in the history
mbed-cloud-client-example 4.11.1
  • Loading branch information
teetak01 authored Oct 13, 2021
2 parents 3693858 + 4e8c128 commit d93e8f9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mbed-cloud-client.lib
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/PelionIoT/mbed-cloud-client/#105a1846277c80e5eb15ad74de7e4d7b15e57c26
https://github.com/PelionIoT/mbed-cloud-client/#8a30590179cdfb4c6949a7f5b14cae39448d8454
4 changes: 2 additions & 2 deletions pal-platform/pal-platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
20 changes: 14 additions & 6 deletions source/fota_platform_hooks_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}

Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d93e8f9

Please sign in to comment.