Skip to content

Commit

Permalink
mbed-cloud-client-example 4.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Risto Huhtala authored and Risto Huhtala committed May 21, 2021
1 parent 8ef8fce commit a2f72c2
Show file tree
Hide file tree
Showing 20 changed files with 195 additions and 2,773 deletions.
38 changes: 23 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
# Changelog for Pelion Device Management Client example application

## Release 4.8.0 (19.04.2021)
## Release 4.9.0 (20.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.
* Removed unregister resource `5000/0/1` from the application. Device Management Client library now implements OMA resource ` 1/0/4`, which supports deregistration.
* Removed delta-tool from the application.
* The current supported version (2.2.0 or later) of [manifest-tool](https://github.com/PelionIoT/manifest-tool) provides the functionality internally.
* Updated cURL to 7.76.0 in `pal-platform`.
* Fixed Atmel SE configuration.
* Updated to Mbed OS 6.9.0.
* [Linux] Updated Mbed TLS to 2.25.0.

## Release 4.8.0 (24.03.2021)

* Updated to Mbed OS 6.8.0.
* Updated cURL to 7.75.0 in `pal-platform`.
* Updated parsec-se-driver to 0.4.0.
* Updated to Pelion end-to-end test library v0.2.10.
* Updated to Pelion E2E test library v0.2.10.
* Removed support for SXOS platform in the application.
* Consolidated the K64F ESP8266 configuration to `wifi_esp8266_minimal.json`.
* Removed K66F PSA.
* `DISCO_L475VG_IOT01A` target bootloader increased from 36kB to 38kB.
* Consolidated the K64F ESP8266 configuration to wifi_esp8266_minimal.json.
* K66F PSA has been removed.
* DISCO_L475VG_IOT01A target bootloader was increased from 36kB to 38kB.
* Introduction of upgraded Update client:
* The new features of the upgraded Update client:
* Component update.
* Resume after power failure.
* Defer firmware update installation.
* Candidate encryption on external storage.
* Configured Mbed OS non-mesh and Linux targets to use the new upgraded Update client.

<span class="notes">**Note:** To use legacy Update client in your Mbed OS non mesh target, please refer to the configurations in PDMC example 4.7.1.</span>

* Mbed OS non-mesh and Linux targets are configured to use the new upgraded Update client.
* Note - if you wish to use legacy Update client in your Mbed OS non mesh target, please refer to the configurations in PDMC exmaple 4.7.1.
* Legacy Update client is still used in Mbed OS mesh targets and SDK's targets (NXP, Renesas).
* Upgraded update client bootloaders are located in prebuild-bl folder. Legacy bootloaders are located in tools folder.
* On `K64F`, `NUCLEO_F411RE` and `DISCO_L475VG_IOT01A` targets, the update candidate is stored encrypted on the external storage encrypted.

* Created migration documentation guide for existing customers who wish to migrate legacy Update client to the new Update client.

<span class="notes">**Note:** After you migrate to the new Update client, only the "Component update" feature is available. To use other features of the new Update client, reflash the device with the new configuration and new bootloader.</span>
* Upgraded update client bootloaders are located in prebuild-bl folder. Legacy bootloaders are located in tools folder
* On K64F, NUCLEO_F411RE, DISCO_L475VG_IOT01A targets, the update candidate is stored encrypted on the external storage encrypted.
* Migration documentation guide was created for existing customers that wish to migrate legacy Update client to the new Update client - [TBD Link to https://github.com/PelionIoT/mbed_Cloud_Docs/pull/1689/files].
* Note - once migrated to new Update client, only "Component update" feature will be available. For using other features of new Update client, the device needs to be reflashed with the new configuration and new bootloader.

## Release 4.7.1 (28.01.2021)

Expand Down
1 change: 1 addition & 0 deletions configs-psa/eth_v4.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"target_overrides": {
"*": {
"target.features_add" : ["EXPERIMENTAL_API", "STORAGE"],
"target.c_lib" : "std",
"platform.stdio-baud-rate" : 115200,
"platform.stdio-convert-newlines" : true,
"platform.stdio-buffered-serial" : true,
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 @@ -29,7 +29,8 @@
"mbed-trace.enable" : null,
"target.OUTPUT_EXT" : "hex",
"mbed-os-atecc608a.i2c-iface-devtype" : "ATECC608A",
"mbed-os-atecc608a.i2c-iface-slave_address" : "0x6C"
"mbed-os-atecc608a.i2c-iface-slave_address" : "0x6C",
"mbed-cloud-client.secure-element-support" : 1
},
"K64F": {
"target.network-default-interface-type" : "ETHERNET",
Expand Down
4 changes: 3 additions & 1 deletion configs/wisun_mbedTLSConfig_mbedOS.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ----------------------------------------------------------------------------
// Copyright 2016-2019 ARM Ltd.
// Copyright 2016-2021 Pelion.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand All @@ -24,6 +24,8 @@

// Enable new define to allow usage of Wi-SUN network security.
#define MBEDTLS_PEM_PARSE_C
#define MBEDTLS_NIST_KW_C
#define MBEDTLS_SHA1_C

#include "mbedtls/check_config.h"

Expand Down
10 changes: 2 additions & 8 deletions custom_targets.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
{
"NUCLEO_F429ZI_WISUN": {
"NUCLEO_F429ZI_AGGRESSIVE": {
"inherits": ["NUCLEO_F429ZI"]
},
"NUCLEO_F429ZI_WISUN_SMALL": {
"inherits": ["NUCLEO_F429ZI_WISUN"]
},
"MIMXRT1050_EVK_WISUN": {
"MIMXRT1050_EVK_AGGRESSIVE": {
"inherits": ["MIMXRT1050_EVK"]
},
"MIMXRT1050_EVK_WISUN_SMALL": {
"inherits": ["MIMXRT1050_EVK_WISUN"]
}
}
2 changes: 1 addition & 1 deletion drivers/COMPONENT_WIFI_ISM43362.lib
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ARMmbed/wifi-ism43362/#3813a4bb8623cc9b0525978748581f60d47142fa
https://github.com/ARMmbed/wifi-ism43362/#09a71bf84fec10704ed2dcecf38f97cb2c95c2b9
25 changes: 2 additions & 23 deletions main.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
#include "nanostack-event-loop/eventOS_scheduler.h"
#endif

#ifdef MBED_CLOUD_CLIENT_SUPPORT_MULTICAST_UPDATE
#include "multicast.h"
#endif

#if defined MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER && \
(MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER == 1)
#include "NetworkInterface.h"
Expand Down Expand Up @@ -80,7 +76,6 @@ int main(void)
static M2MResource *button_res;
static M2MResource *pattern_res;
static M2MResource *blink_res;
static M2MResource *unregister_res;
static M2MResource *factory_reset_res;
static M2MResource *large_res;
static uint8_t *large_res_data = NULL;
Expand Down Expand Up @@ -182,12 +177,6 @@ void sent_callback(const M2MBase &base,
}
}

void unregister_triggered(void)
{
printf("Unregister resource triggered\r\n");
unregister_res->send_delayed_post_response();
}

void factory_reset_triggered(void *)
{
printf("Factory reset resource triggered\r\n");
Expand Down Expand Up @@ -291,7 +280,6 @@ void main_application(void)
* 4. Connect Device Management Client to service using `setup()`. // Implemented in `mbedClient.register_and_connect)`.
*/
(void) mcc_platform_interface_init();
mbedClient.init();

// application_init() runs the following initializations:
// 1. platform initialization
Expand All @@ -302,6 +290,8 @@ void main_application(void)
return;
}

mbedClient.init();

#if defined MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER &&\
(MBED_CONF_MBED_CLOUD_CLIENT_NETWORK_MANAGER == 1)
printf("Configuring Interface\r\n");
Expand Down Expand Up @@ -358,11 +348,6 @@ void main_application(void)
// Use delayed response
blink_res->set_delayed_response(true);

// Create resource for unregistering the device. Path of this resource will be: 5000/0/1.
unregister_res = mbedClient.add_cloud_resource(5000, 0, 1, "unregister", M2MResourceInstance::STRING,
M2MBase::POST_ALLOWED, NULL, false, (void *)unregister_triggered, (void *)sent_callback);
unregister_res->set_delayed_response(true);

// Create optional Device resource for running factory reset for the device. Path of this resource will be: 3/0/5.
factory_reset_res = M2MInterfaceFactory::create_device()->create_resource(M2MDevice::FactoryReset);
if (factory_reset_res) {
Expand All @@ -378,15 +363,9 @@ void main_application(void)
button_res->set_auto_observable(true);
pattern_res->set_auto_observable(true);
blink_res->set_auto_observable(true);
unregister_res->set_auto_observable(true);
factory_reset_res->set_auto_observable(true);
#endif

#endif

// TODO! replace when api available in wisun interface
#ifdef MBED_CLOUD_CLIENT_SUPPORT_MULTICAST_UPDATE
arm_uc_multicast_interface_configure(1);
#endif

mbedClient.register_and_connect();
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/#3f00170a0eda5a54ce0762fc7d3d83dc95610102
https://github.com/PelionIoT/mbed-cloud-client/#64904a11eac01714b9131744dc0a6b181224ef09
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/#26606218ad9d1ee1c8781aa73774fd7ea3a7658e
https://github.com/ARMmbed/mbed-os/#c73413893fb98aaaeda74513c981ac68adc8645d
2 changes: 1 addition & 1 deletion mbed_cloud_client_user_config_mesh.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ----------------------------------------------------------------------------
// Copyright 2021 Pelion Ltd.
// Copyright 2021 Pelion.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down
40 changes: 15 additions & 25 deletions mesh_wisun.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{
"macros": [
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
"MBEDTLS_PEM_PARSE_C",
"MBEDTLS_NIST_KW_C",
"MBEDTLS_SHA1_C",
"MAX_ERROR_COUNT=0",
"MBED_CLOUD_CLIENT_ENDPOINT_TYPE=\"routernode\""
"MBED_CLOUD_CLIENT_ENDPOINT_TYPE=\"routernode\"",
"MBED_CLOUD_CLIENT_SUPPORT_UPDATE",
"MBED_CLOUD_CLIENT_SUPPORT_MULTICAST_UPDATE",
"MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP"
],
"target_overrides": {
"*": {
"target.features_add" : ["BOOTLOADER", "STORAGE"],
"target.c_lib" : "std",
"target.macros_add" : ["MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP", "MBED_CLOUD_CLIENT_SUPPORT_MULTICAST_UPDATE", "ENABLE_ASYNC_REST_RESPONSE"],
"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\"",
"mbed-client.reconnection-count" : 6,
"mbed-client.sn-coap-blockwise-max-time-data-stored": 300,
"mbed-client.sn-coap-blockwise-max-time-data-stored": 900,
"client_app.pal_dtls_peer_min_timeout" : "60000",
"mbed-client.dtls_peer_max_timeout" : "600000",
"mbed-client-pal.pal-max-frag-len" : 2,
Expand Down Expand Up @@ -55,7 +54,7 @@
"mbed-cloud-client.network-manager" : 1,
"mbed-cloud-client.observable-timer" : 15
},
"NUCLEO_F429ZI_WISUN": {
"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",
Expand All @@ -75,15 +74,15 @@
"update-client.delta-storage-address" : "(MBED_ROM_START + 896*1024)",
"update-client.delta-storage-size" : "(1*128*1024)"
},
"NUCLEO_F429ZI_WISUN_SMALL": {
"NUCLEO_F429ZI_AGGRESSIVE": {
"target.macros_add" : ["PAL_DEFAULT_STAGGER_ESTIMATE=1", "MBED_CLOUD_CLIENT_MULTICAST_SMALL_NETWORK"]
},
"MIMXRT1050_EVK_WISUN": {
"MIMXRT1050_EVK": {
"client_app.mbedtls-user-config-file" : "\"configs/wisun_mbedTLSConfig_mbedOS.h\"",
"target.network-default-interface-type" : "MESH",
"target.macros_remove" : ["HYPERFLASH_BOOT"],
"target.tickless-from-us-ticker" : true,
"target.macros_add" : ["MBED_APP_COMPILE","SE2435L_PA","DISABLE_AT24MAC","HAVE_AT86RF215M", "ARM_UC_DELTAPAAL_WRITE_BUF_SIZE=256"],
"target.macros_add" : ["MBED_APP_COMPILE", "DISABLE_AT24MAC", "ARM_UC_DELTAPAAL_WRITE_BUF_SIZE=256"],
"target.mbed_rom_start" : "0x60000000",
"target.mbed_rom_size" : "0x800000",
"target.sectors" : [[1610612736,4096]],
Expand All @@ -106,18 +105,9 @@
"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,
"atmel-rf.SPI_MOSI" : "GPIO_B0_02",
"atmel-rf.SPI_MISO" : "GPIO_B0_01",
"atmel-rf.SPI_SCLK" : "GPIO_B0_03",
"atmel-rf.SPI_CS" : "GPIO_B0_00",
"atmel-rf.SPI_RST" : "GPIO_AD_B1_09",
"atmel-rf.SPI_IRQ" : "GPIO_AD_B1_08",
"atmel-rf.SE2435L_CSD" : "GPIO_B1_02",
"atmel-rf.SE2435L_ANT_SEL" : "GPIO_B1_03",
"atmel-rf.SPI_SLP" : "A4"
"atmel-rf.provide-default" : true
},
"MIMXRT1050_EVK_WISUN_SMALL": {
"MIMXRT1050_EVK_AGGRESSIVE": {
"target.macros_add" : ["PAL_DEFAULT_STAGGER_ESTIMATE=1", "MBED_CLOUD_CLIENT_MULTICAST_SMALL_NETWORK"]
}
},
Expand Down Expand Up @@ -147,13 +137,13 @@
},
"cpu-stats-enabled": {
"macro_name": "MBED_CPU_STATS_ENABLED",
"help": "Set to 1 to enable cpu stats. When enabled the function mbed_stats_cpu_get returns non-zero data. See mbed_stats.h for more information",
"value": 1
"help" : "Set to 1 to enable cpu stats. When enabled the function mbed_stats_cpu_get returns non-zero data. See mbed_stats.h for more information",
"value" : 1
},
"heap-stats-enabled": {
"macro_name": "MBED_HEAP_STATS_ENABLED",
"help": "Set to 1 to enable heap stats. When enabled the function mbed_stats_heap_get returns non-zero data. See mbed_stats.h for more information",
"value": 1
"help" : "Set to 1 to enable heap stats. When enabled the function mbed_stats_heap_get returns non-zero data. See mbed_stats.h for more information",
"value" : 1
}
}
}
2 changes: 1 addition & 1 deletion pal-platform/SDK/ZephyrOS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ if(CONFIG_PELION_SOURCES)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/storage/flash_map)
# Copy configuration file to include directory visible for all libraries.
# Needed for the file to be visible by Zephyr's mbedtls library.
configure_file("${CMAKE_SOURCE_DIR}/pal-platform/SDK/ZephyrOS/config-tls-pelion.h" "${CMAKE_BINARY_DIR}/zephyr/include/generated" COPYONLY)
configure_file("${CMAKE_SOURCE_DIR}/pal-platform/SDK/ZephyrOS/config-tls-generic.h" "${CMAKE_BINARY_DIR}/zephyr/include/generated" COPYONLY)
endif()
Loading

0 comments on commit a2f72c2

Please sign in to comment.