Skip to content

Commit 3d8d83b

Browse files
authored
Merge pull request #82 from PelionIoT/release-4.10.0
mbed-cloud-client-example 4.10.0
2 parents 8979c43 + cac6c9b commit 3d8d83b

File tree

44 files changed

+543
-338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+543
-338
lines changed

CHANGELOG.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
# Changelog for Pelion Device Management Client example application
22

3-
## Release 4.9.1 (15.06.2021)
3+
## Release 4.10.0 (07.07.2021)
44

5-
No changes.
5+
- NXP_LPC54628 target configured to use the new upgraded Update client with `FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY` key.
6+
- Mesh configuration in `mesh_wisun.json` is based on the new update FOTA implementation.
7+
- Changes to the implementation of update candidate image encryption:
8+
- Added a new `FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY` option to `MBED_CLOUD_CLIENT_FOTA_KEY_ENCRYPTION`.
9+
- 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`.
10+
- 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.
11+
- This release uses bootloaders compiled with the above improvement by default.
12+
- Deprecated the `FOTA_USE_DEVICE_KEY` option, which will be removed in a future version.
13+
* Updated to Mbed OS 6.12.0.
14+
15+
## Release 4.9.1 (17.06.2021)
16+
17+
* No changes.
618

7-
## Release 4.9.0 (20.05.2021)
19+
## Release 4.9.0 (21.05.2021)
820

921
* [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.
1022
* [Mbed OS] Updated ISM43362 Wi-Fi driver to #09a71bf with fix to mutex handling.

configs-psa/eth_v4.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"target.components_add" : ["SD"],
3333
"fota.num-components" : 2,
3434
"fota.app-default-cb-no-print" : false,
35-
"fota.encryption-support" : true
35+
"fota.encryption-support" : true,
36+
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY"
3637
}
3738
},
3839
"config": {
@@ -47,7 +48,7 @@
4748
},
4849
"led-pinname" : {
4950
"help" : "PinName for led, which is attached to led blink resource.",
50-
"value" : "LED_RED"
51+
"value" : "LED1"
5152
},
5253
"mbed-trace-max-level": {
5354
"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]",

configs-psa/eth_v4_with_se_atmel.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"target.components_add" : ["SD", "ATECC608A"],
4141
"fota.num-components" : 2,
4242
"fota.app-default-cb-no-print" : false,
43-
"fota.encryption-support" : true
43+
"fota.encryption-support" : true,
44+
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY"
4445
}
4546
},
4647
"config": {

configs/wifi_esp8266_minimal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
},
6565
"led-pinname" : {
6666
"help" : "PinName for led, which is attached to led blink resource.",
67-
"value" : "LED_RED"
67+
"value" : "LED1"
6868
},
6969
"mbed-trace-max-level": {
7070
"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]",

define_NXP_LPC54628_update.txt

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
include(${CMAKE_SOURCE_DIR}/define_NXP_LPC54628.txt)
22

3-
add_definitions(-DMBED_CLOUD_CLIENT_SUPPORT_UPDATE)
3+
# Enable FOTA Update
44

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

11-
add_definitions(-DMBED_CONF_MBED_CLOUD_CLIENT_UPDATE_DOWNLOAD_PROTOCOL=MBED_CLOUD_CLIENT_UPDATE_DOWNLOAD_PROTOCOL_COAP)
12-
add_definitions(-DMBED_CONF_APP_MBED_CLOUD_CLIENT_UPDATE_BUFFER_SIZE=2048)
8+
add_definitions(-DFOTA_DEFAULT_APP_IFS=1)
9+
add_definitions(-DFOTA_CUSTOM_CURR_FW_STRUCTURE=0)
10+
add_definitions(-DFOTA_TRACE_ENABLE=0)
11+
add_definitions(-DFOTA_TRACE_DBG=0)
12+
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_KEY_ENCRYPTION=FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY)
13+
add_definitions(-DAPPLICATION_ADDR=0x8400)
14+
add_definitions(-DHEADER_ADDR=0x8000)
15+
add_definitions(-DFOTA_NUM_COMPONENTS=2)
16+
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_STORAGE_START_ADDR=0x20000)
17+
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_STORAGE_SIZE=0x70000)
18+
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_BLOCK_DEVICE_TYPE=FOTA_EXTERNAL_BD)
19+
add_definitions(-DMBED_CLOUD_CLIENT_FOTA_ENCRYPTION_SUPPORT=1)
1320

14-
add_definitions(-DMBED_CLOUD_CLIENT_UPDATE_STORAGE=ARM_UCP_FLASHIAP_BLOCKDEVICE)
15-
add_definitions(-DUPDATE_CLIENT_STORAGE_FLASHIAP_BLOCKDEVICE)
16-
add_definitions(-DARM_UC_PROFILE_MBED_CLOUD_CLIENT=1)
17-
add_definitions(-DARM_UC_FEATURE_DELTA_PAAL=0)
18-
add_definitions(-DARM_UC_FEATURE_PAL_BLOCKDEVICE=1)
19-
add_definitions(-DARM_UC_USE_PAL_BLOCKDEVICE=1)
20-
add_definitions(-DATOMIC_QUEUE_USE_PAL=1)
21-
add_definitions(-DPAL_USE_FILESYSTEM=0)

main.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151

5252
#if defined MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER && \
5353
(MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER == 1)
54-
#include "NetworkInterface.h"
5554
#include "NetworkManager.h"
5655
#endif
5756

@@ -208,7 +207,7 @@ static coap_response_code_e read_requested(const M2MResourceBase& resource,
208207
// Allocate buffer when first request comes in
209208
if (offset == 0) {
210209
large_res_data = (uint8_t*)malloc(large_res_size);
211-
memset(large_res_data, '0', large_res_size);
210+
memset(large_res_data, 0, large_res_size);
212211
}
213212

214213
if (!large_res_data) {
@@ -294,6 +293,10 @@ void main_application(void)
294293

295294
#if defined MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER &&\
296295
(MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER == 1)
296+
if (network_manager.configure_factory_mac_address(NetworkInterface::get_default_instance()) != NM_ERROR_NONE) {
297+
printf("Failed: configure_factory_mac_address\n");
298+
return;
299+
}
297300
printf("Configuring Interface\r\n");
298301
if (network_manager.reg_and_config_iface(NetworkInterface::get_default_instance()) != NM_ERROR_NONE) {
299302
printf("Failed to register and configure Interface\r\n");

mbed-cloud-client.lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/PelionIoT/mbed-cloud-client/#7e45d92cf759d62c2d881bd7be318c807d8a47c2
1+
https://github.com/PelionIoT/mbed-cloud-client/#d7edc529ed3722c811ff401440ef58ea980bf543

mbed-os.lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/ARMmbed/mbed-os/#c73413893fb98aaaeda74513c981ac68adc8645d
1+
https://github.com/ARMmbed/mbed-os/#cecc47b4a53951527dd3f670465c8566396ad101

mbed_app.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"target.header_offset" : "0xa000",
3939
"target.app_offset" : "0xa200",
4040
"target.components_add" : ["SD"],
41-
"fota.encryption-support" : true
41+
"fota.encryption-support" : true,
42+
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY"
4243
},
4344
"K66F": {
4445
"enable-ds-custom-metrics-example" : 1,
@@ -73,6 +74,7 @@
7374
"target.components_add" : ["SD"],
7475
"target.macros_remove" : ["MBEDTLS_CONFIG_HW_SUPPORT"],
7576
"fota.encryption-support" : true,
77+
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY",
7678
"sd.SPI_MOSI" : "PC_3",
7779
"sd.SPI_MISO" : "PC_2",
7880
"sd.SPI_CLK" : "PC_7",
@@ -95,7 +97,8 @@
9597
"led-pinname" : "LED1",
9698
"mbed-client.sn-coap-max-blockwise-payload-size" : 256,
9799
"mbed-client-pal.pal-max-frag-len" : 1,
98-
"fota.encryption-support" : true
100+
"fota.encryption-support" : true,
101+
"fota.key-encryption" : "FOTA_USE_ENCRYPTED_ONE_TIME_FW_KEY"
99102
}
100103
},
101104
"config": {
@@ -110,7 +113,7 @@
110113
},
111114
"led-pinname" : {
112115
"help" : "PinName for led, which is attached to led blink resource.",
113-
"value" : "LED_RED"
116+
"value" : "LED1"
114117
},
115118
"bootloader-size": {
116119
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",

mbed_cloud_client_user_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@
4242
#define MBED_CLOUD_DEV_UPDATE_ID
4343
#endif /* MBED_CONF_APP_DEVELOPER_MODE */
4444

45+
4546
#endif /* MBED_CLOUD_CLIENT_USER_CONFIG_H */

0 commit comments

Comments
 (0)