Skip to content

Commit

Permalink
Merge pull request #82 from PelionIoT/release-4.10.0
Browse files Browse the repository at this point in the history
mbed-cloud-client-example 4.10.0
  • Loading branch information
teetak01 authored Jul 8, 2021
2 parents 8979c43 + cac6c9b commit 3d8d83b
Show file tree
Hide file tree
Showing 44 changed files with 543 additions and 338 deletions.
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# Changelog for Pelion Device Management Client example application

## Release 4.9.1 (15.06.2021)
## Release 4.10.0 (07.07.2021)

No changes.
- NXP_LPC54628 target configured to use the new upgraded Update client with `FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY` key.
- Mesh configuration in `mesh_wisun.json` is based on the new update FOTA implementation.
- Changes to the implementation of update candidate image encryption:
- Added a new `FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY` option to `MBED_CLOUD_CLIENT_FOTA_KEY_ENCRYPTION`.
- Replaced `FOTA_USE_DEVICE_KEY` with `FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY` as the default value for `MBED_CLOUD_CLIENT_FOTA_KEY_ENCRYPTION` due to a security vulnerability found in `FOTA_USE_DEVICE_KEY`.
- For Mbed OS devices, the change to using `FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY` is a breaking change and requires a new bootloader that supports this feature.
- This release uses bootloaders compiled with the above improvement by default.
- Deprecated the `FOTA_USE_DEVICE_KEY` option, which will be removed in a future version.
* Updated to Mbed OS 6.12.0.

## Release 4.9.1 (17.06.2021)

* No changes.

## Release 4.9.0 (20.05.2021)
## Release 4.9.0 (21.05.2021)

* [Mbed OS] Increased `SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED` stored time to 15min for mesh to account for long retransmission chains during blockwise transfers.
* [Mbed OS] Updated ISM43362 Wi-Fi driver to #09a71bf with fix to mutex handling.
Expand Down
5 changes: 3 additions & 2 deletions configs-psa/eth_v4.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"target.components_add" : ["SD"],
"fota.num-components" : 2,
"fota.app-default-cb-no-print" : false,
"fota.encryption-support" : true
"fota.encryption-support" : true,
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY"
}
},
"config": {
Expand All @@ -47,7 +48,7 @@
},
"led-pinname" : {
"help" : "PinName for led, which is attached to led blink resource.",
"value" : "LED_RED"
"value" : "LED1"
},
"mbed-trace-max-level": {
"help" : "Max trace level. Must be one of the following: [TRACE_LEVEL_DEBUG, TRACE_LEVEL_INFO, TRACE_LEVEL_WARN, TRACE_LEVEL_ERROR, TRACE_LEVEL_CMD]",
Expand Down
3 changes: 2 additions & 1 deletion configs-psa/eth_v4_with_se_atmel.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"target.components_add" : ["SD", "ATECC608A"],
"fota.num-components" : 2,
"fota.app-default-cb-no-print" : false,
"fota.encryption-support" : true
"fota.encryption-support" : true,
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY"
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion configs/wifi_esp8266_minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"led-pinname" : {
"help" : "PinName for led, which is attached to led blink resource.",
"value" : "LED_RED"
"value" : "LED1"
},
"mbed-trace-max-level": {
"help" : "Max trace level. Must be one of the following: [TRACE_LEVEL_DEBUG, TRACE_LEVEL_INFO, TRACE_LEVEL_WARN, TRACE_LEVEL_ERROR, TRACE_LEVEL_CMD]",
Expand Down
31 changes: 15 additions & 16 deletions define_NXP_LPC54628_update.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
include(${CMAKE_SOURCE_DIR}/define_NXP_LPC54628.txt)

add_definitions(-DMBED_CLOUD_CLIENT_SUPPORT_UPDATE)
# Enable FOTA Update

add_definitions(-DMBED_CONF_UPDATE_CLIENT_APPLICATION_DETAILS=0x8000)
add_definitions(-DMBED_CONF_UPDATE_CLIENT_STORAGE_ADDRESS=0x20000)
add_definitions(-DMBED_CONF_UPDATE_CLIENT_STORAGE_SIZE=0x70000)
add_definitions(-DMBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS=1)
add_definitions(-DMBED_CONF_UPDATE_CLIENT_STORAGE_PAGE=4)
option(FOTA_ENABLE "Enable FOTA client module" ON)
option(FOTA_COAP_DOWNLOAD "Force CoAP download for FOTA client" ON)

add_definitions(-DMBED_CONF_MBED_CLOUD_CLIENT_UPDATE_DOWNLOAD_PROTOCOL=MBED_CLOUD_CLIENT_UPDATE_DOWNLOAD_PROTOCOL_COAP)
add_definitions(-DMBED_CONF_APP_MBED_CLOUD_CLIENT_UPDATE_BUFFER_SIZE=2048)
add_definitions(-DFOTA_DEFAULT_APP_IFS=1)
add_definitions(-DFOTA_CUSTOM_CURR_FW_STRUCTURE=0)
add_definitions(-DFOTA_TRACE_ENABLE=0)
add_definitions(-DFOTA_TRACE_DBG=0)
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_KEY_ENCRYPTION=FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY)
add_definitions(-DAPPLICATION_ADDR=0x8400)
add_definitions(-DHEADER_ADDR=0x8000)
add_definitions(-DFOTA_NUM_COMPONENTS=2)
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_STORAGE_START_ADDR=0x20000)
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_STORAGE_SIZE=0x70000)
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_BLOCK_DEVICE_TYPE=FOTA_EXTERNAL_BD)
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_ENCRYPTION_SUPPORT=1)

add_definitions(-DMBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE)
add_definitions(-DUPDATE_CLIENT_STORAGE_FLASHIAP_BLOCKDEVICE)
add_definitions(-DARM_UC_PROFILE_MBED_CLOUD_CLIENT=1)
add_definitions(-DARM_UC_FEATURE_DELTA_PAAL=0)
add_definitions(-DARM_UC_FEATURE_PAL_BLOCKDEVICE=1)
add_definitions(-DARM_UC_USE_PAL_BLOCKDEVICE=1)
add_definitions(-DATOMIC_QUEUE_USE_PAL=1)
add_definitions(-DPAL_USE_FILESYSTEM=0)
7 changes: 5 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@

#if defined MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER && \
(MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER == 1)
#include "NetworkInterface.h"
#include "NetworkManager.h"
#endif

Expand Down Expand Up @@ -208,7 +207,7 @@ static coap_response_code_e read_requested(const M2MResourceBase& resource,
// Allocate buffer when first request comes in
if (offset == 0) {
large_res_data = (uint8_t*)malloc(large_res_size);
memset(large_res_data, '0', large_res_size);
memset(large_res_data, 0, large_res_size);
}

if (!large_res_data) {
Expand Down Expand Up @@ -294,6 +293,10 @@ void main_application(void)

#if defined MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER &&\
(MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER == 1)
if (network_manager.configure_factory_mac_address(NetworkInterface::get_default_instance()) != NM_ERROR_NONE) {
printf("Failed: configure_factory_mac_address\n");
return;
}
printf("Configuring Interface\r\n");
if (network_manager.reg_and_config_iface(NetworkInterface::get_default_instance()) != NM_ERROR_NONE) {
printf("Failed to register and configure Interface\r\n");
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/#7e45d92cf759d62c2d881bd7be318c807d8a47c2
https://github.com/PelionIoT/mbed-cloud-client/#d7edc529ed3722c811ff401440ef58ea980bf543
2 changes: 1 addition & 1 deletion mbed-os.lib
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ARMmbed/mbed-os/#c73413893fb98aaaeda74513c981ac68adc8645d
https://github.com/ARMmbed/mbed-os/#cecc47b4a53951527dd3f670465c8566396ad101
9 changes: 6 additions & 3 deletions mbed_app.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"target.header_offset" : "0xa000",
"target.app_offset" : "0xa200",
"target.components_add" : ["SD"],
"fota.encryption-support" : true
"fota.encryption-support" : true,
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY"
},
"K66F": {
"enable-ds-custom-metrics-example" : 1,
Expand Down Expand Up @@ -73,6 +74,7 @@
"target.components_add" : ["SD"],
"target.macros_remove" : ["MBEDTLS_CONFIG_HW_SUPPORT"],
"fota.encryption-support" : true,
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY",
"sd.SPI_MOSI" : "PC_3",
"sd.SPI_MISO" : "PC_2",
"sd.SPI_CLK" : "PC_7",
Expand All @@ -95,7 +97,8 @@
"led-pinname" : "LED1",
"mbed-client.sn-coap-max-blockwise-payload-size" : 256,
"mbed-client-pal.pal-max-frag-len" : 1,
"fota.encryption-support" : true
"fota.encryption-support" : true,
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY"
}
},
"config": {
Expand All @@ -110,7 +113,7 @@
},
"led-pinname" : {
"help" : "PinName for led, which is attached to led blink resource.",
"value" : "LED_RED"
"value" : "LED1"
},
"bootloader-size": {
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",
Expand Down
1 change: 1 addition & 0 deletions mbed_cloud_client_user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@
#define MBED_CLOUD_DEV_UPDATE_ID
#endif /* MBED_CONF_APP_DEVELOPER_MODE */


#endif /* MBED_CLOUD_CLIENT_USER_CONFIG_H */
64 changes: 28 additions & 36 deletions mesh_wisun.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{
"macros": [
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
"MAX_ERROR_COUNT=0",
"MBED_CLOUD_CLIENT_ENDPOINT_TYPE=\"routernode\"",
"MBED_CLOUD_CLIENT_SUPPORT_UPDATE",
"MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP",
"MBED_CLOUD_CLIENT_SUPPORT_MULTICAST_UPDATE",
"MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP"
"FOTA_CUSTOM_PLATFORM=1"
],
"target_overrides": {
"*": {
"target.features_add" : ["BOOTLOADER", "STORAGE"],
"target.features_add" : ["STORAGE"],
"target.c_lib" : "std",
"platform.stdio-baud-rate" : 115200,
"platform.stdio-convert-newlines" : true,
"platform.stdio-buffered-serial" : true,
"platform.stdio-flush-at-exit" : true,
"rtos.main-thread-stack-size" : 5120,
"client_app.user-config" : "\"mbed_cloud_client_user_config_mesh.h\"",
"client_app.user-config" : "\"mbed_cloud_client_user_config.h\"",
"mbed-client.reconnection-count" : 6,
"mbed-client.sn-coap-blockwise-max-time-data-stored": 900,
"client_app.pal_dtls_peer_min_timeout" : "60000",
Expand All @@ -25,8 +24,16 @@
"mbed-client.disable-resource-type" : 1,
"nanostack-hal.event_loop_thread_stack_size": 8192,
"nanostack-hal.use-kvstore" : true,
"update-client.storage-locations" : 1,
"mbed-trace.enable" : null,
"storage.storage_type" : null,
"storage_filesystem.filesystem" : null,
"storage_filesystem.blockdevice" : null,
"storage_tdb_internal.internal_base_address": null,
"storage_tdb_internal.internal_size" : null,
"storage_filesystem.internal_base_address" : null,
"storage_filesystem.rbp_internal_size" : null,
"storage_filesystem.external_base_address" : null,
"storage_filesystem.external_size" : null,
"mbed-mesh-api.wisun-regulatory-domain" : "3",
"mbed-mesh-api.wisun-operating-class" : "2",
"mbed-mesh-api.wisun-operating-mode" : "3",
Expand All @@ -52,27 +59,24 @@
"events.shared-highprio-stacksize" : 3072,
"events.shared-highprio-eventsize" : 512,
"mbed-cloud-client.network-manager" : 1,
"mbed-cloud-client.observable-timer" : 15
"mbed-cloud-client.observable-timer" : 15,
"fota.enable" : true,
"fota.multicast-support" : "FOTA_MULTICAST_NODE_MODE",
"fota.resume-support" : "FOTA_RESUME_UNSUPPORTED",
"fota.num-components" : 2,
"fota.app-default-cb-no-print" : false,
"fota.encryption-support" : false,
"fota.default-app-ifs" : false
},
"NUCLEO_F429ZI": {
"client_app.mbedtls-user-config-file" : "\"configs/wisun_mbedTLSConfig_mbedOS.h\"",
"target.network-default-interface-type" : "MESH",
"target.bootloader_img" : "tools/mbed-bootloader-nucleo_f429zi-internal_flash-no_rot-v4.1.0.bin",
"target.extra_labels_add" : ["BL_INTERNAL_FLASH"],
"target.header_offset" : "0x8000",
"target.app_offset" : "0x8400",
"target.app_offset" : "0x8200",
"target.restrict_size" : "0xD7C00",
"update-client.bootloader-details" : "0x080078CC",
"update-client.application-details" : "(MBED_ROM_START + MBED_BOOTLOADER_SIZE)",
"update-client.storage-address" : "(MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS+MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
"update-client.storage-size" : "(1024*1024-MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
"update-client.storage-page" : 1,
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP",
"storage_tdb_internal.internal_base_address": "(MBED_ROM_START+1024*1024)",
"storage_tdb_internal.internal_size" : "(128*1024)",
"storage.storage_type" : "TDB_INTERNAL",
"s2lp.provide-default" : true,
"update-client.delta-storage-address" : "(MBED_ROM_START + 896*1024)",
"update-client.delta-storage-size" : "(1*128*1024)"
"s2lp.provide-default" : true

},
"NUCLEO_F429ZI_AGGRESSIVE": {
"target.macros_add" : ["PAL_DEFAULT_STAGGER_ESTIMATE=1", "MBED_CLOUD_CLIENT_MULTICAST_SMALL_NETWORK"]
Expand All @@ -86,25 +90,13 @@
"target.mbed_rom_start" : "0x60000000",
"target.mbed_rom_size" : "0x800000",
"target.sectors" : [[1610612736,4096]],
"target.bootloader_img" : "tools/mbed-bootloader-rt1050-qspi-internal_flash-no_rot-94579e9.bin",
"target.extra_labels_add" : ["BL_INTERNAL_FLASH"],
"target.header_offset" : "0x10000",
"target.app_offset" : "0x10400",
"target.app_offset" : "0x10200",
"target.restrict_size" : "0x1EFC00",
"bootloader-size" : "(64*1024)",
"led-pinname" : "NC",
"button-pinname" : "NC",
"update-client.bootloader-details" : "0x6000F000",
"update-client.application-details" : "0x60010000",
"update-client.storage-address" : "(MBED_ROM_START + 64*1024 + 1984*1024)",
"update-client.storage-size" : "(1984*1024)",
"update-client.storage-locations" : 1,
"update-client.storage-page" : 256,
"update-client.delta-storage-address" : "(MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_BASE_ADDRESS + MBED_CONF_STORAGE_TDB_INTERNAL_INTERNAL_SIZE)",
"update-client.delta-storage-size" : "(1024*1024)",
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP",
"storage_tdb_internal.internal_base_address": "(MBED_ROM_START + 64*1024 + 1984*2*1024 + 64*1024)",
"storage_tdb_internal.internal_size" : "(2*128*1024)",
"storage.storage_type" : "TDB_INTERNAL",
"atmel-rf.provide-default" : true
},
"MIMXRT1050_EVK_AGGRESSIVE": {
Expand All @@ -128,7 +120,7 @@
},
"led-pinname" : {
"help" : "PinName for led, which is attached to led blink resource.",
"value" : "LED_RED"
"value" : "LED1"
},
"bootloader-size": {
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",
Expand Down
Loading

0 comments on commit 3d8d83b

Please sign in to comment.