Skip to content

Commit d3c2235

Browse files
authored
Merge pull request #53 from ARMmbed/release-4.0.0
mbed-cloud-client-example 4.0.0
2 parents fc46b17 + 20d5345 commit d3c2235

Some content is hidden

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

46 files changed

+2511
-2774
lines changed

CHANGELOG.md

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

3-
## Release 3.4.0 (28.08.2019)
3+
## Release 4.0.0 (25.09.2019)
4+
5+
* Updated to Mbed OS 5.14.0.
6+
* [Linux] Updated Mbed TLS to 2.19.1.
7+
* The example application initialization is now done in multiple steps. This ensures the succcessful initialization of the Device Management Client library. It needs to be properly initialized before the memory intensive components (for example nanostack mesh stack).
8+
* Removed `CY8CKIT_062_WIFI_BT_PSA`, which is no longer supported starting from Mbed OS 5.13.1.
9+
* [Linux] Fixed busy-loop when `stdin` is not connected.
10+
* Added default behavior for optionally created `Factory Reset` Resource located under the `Device` Object `/3/0/5`.
11+
* You can overwrite both `Reboot` and `Factory Reset` Resource default behavior by implementing corresponding handler functions.
12+
* Added support for Discovery `L475VG IOT01A` target board (`configs/wifi.json`).
13+
* Added PSA support for `NUCLEO_F411RE` target board (`configs-psa/wifi.json`).
14+
* Added PSA support for Linux (`define_linux_psa.txt`).
15+
* Changed `NUCLEO_F411RE` Wi-Fi configuration to use ESP8266 module instead of the deprecated X-Nucleo IDW01M1.
16+
* Unified Wi-Fi configuration files. `configs/wifi.json` and `configs-psa/wifi.json` now include all supported Wi-Fi configurations except the minimum configuration example, which is still in `configs/wifi_esp8266_minimal.json`.
17+
* New application feature to introduce random delay for Device Management Client registration after the network connection has been established. You can use this feature to stabilize large mesh-type networks with high latency and limited bandwidth. By default, it is enabled for mesh-type networks and disabled for other configurations. To enable the random delay, define `STARTUP_MAX_RANDOM_DELAY` in seconds.
18+
19+
## Release 3.4.0 (15.08.2019)
420

521
* Added PSA configuration for K66F (`configs-psa/eth_v4.json`).
6-
* Updated usage of new Update Authorization API, which enables [update priority](../updating-firmware/firmware-manifests.html) feature `set_update_authorize_priority_handler` instead of `set_update_authorize_handler`.
7-
* Use `set_message_delivery_status_cb` to ensure that a POST trigger on the `unregister resource` (`/5000/0/1`) does not result in closing the network connection before client is able to send the final ACK to server.
22+
* Updated usage of new Update Authorization API, which takes in priority as well, `set_update_authorize_priority_handler` instead of `set_update_authorize_handler`.
23+
* Use `set_message_delivery_status_cb` as part of unregister resource triggering to make sure device does not close the network connection before client is able to send the final ACK to server.
824
* [Linux] Updated Mbed TLS to 2.18.1.
925
* [Mbed OS] Removed the legacy ESFS-SOTP configurations from the applications. Only KVstore is supported for client storage.
1026

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ LOCAL_ADD_INCLUDE += . \
6161
${LOCAL_NAME}/mbed-cloud-client/mbed-client-pal/Configs/pal_config/SXOS \
6262
${LOCAL_NAME}/mbed-cloud-client/mbed-client/mbed-client-c \
6363
${LOCAL_NAME}/mbed-cloud-client/mbed-coap/mbed-coap \
64+
${LOCAL_NAME}/mbed-cloud-client/mbed-client-randlib \
6465
${LOCAL_NAME}/mbed-cloud-client/nanostack-libservice \
6566
${LOCAL_NAME}/mbed-cloud-client/sal-stack-nanostack-eventloop \
6667
${LOCAL_NAME}/mbed-cloud-client/certificate-enrollment-client/certificate-enrollment-client \
@@ -75,7 +76,6 @@ LOCAL_EXPORT_FLAG += "'MBED_CLOUD_CLIENT_USER_CONFIG_FILE=\"mbed_cloud_client_us
7576

7677
LOCAL_EXPORT_FLAG += "'MBED_CONF_MBED_CLIENT_EVENT_LOOP_SIZE=12000'"
7778
LOCAL_EXPORT_FLAG += "PAL_SIMULATOR_FLASH_OVER_FILE_SYSTEM=1"
78-
LOCAL_EXPORT_FLAG += "MBED_CONF_MBED_TRACE_ENABLE"
7979
LOCAL_EXPORT_FLAG += "MBED_CONF_APP_CLOUD_MODE=1"
8080
LOCAL_EXPORT_FLAG += "MBED_CONF_APP_DEVELOPER_MODE=1"
8181

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
The full documentation for this example is [available on our documentation site](https://cloud.mbed.com/docs/current/connecting/device-management-client-tutorials.html)
1+
The full documentation for this example is [available on our documentation site](https://www.pelion.com/docs/device-management/current/connecting/device-management-client-tutorials.html).
2+
3+
You can report concerns about the documentation or this SW as issues to [this GitHub repository](https://github.com/ARMmbed/mbed-cloud-client-example/issues).
4+

configs-psa/eth_v4.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"macros": [
33
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
4-
"MBED_BOOTLOADER_SIZE=(32*1024)",
54
"MBEDTLS_USE_PSA_CRYPTO"
65
],
76
"target_overrides": {
@@ -12,8 +11,6 @@
1211
"platform.stdio-buffered-serial" : true,
1312
"platform.stdio-flush-at-exit" : true,
1413
"rtos.main-thread-stack-size" : 5120,
15-
"rtos.timer-thread-stack-size" : 256,
16-
"rtos.idle-thread-stack-size" : 256,
1714
"update-client.storage-locations" : 1,
1815
"mbed-trace.enable" : null
1916
},
@@ -72,6 +69,11 @@
7269
"led-pinname" : {
7370
"help" : "PinName for led, which is attached to led blink resource.",
7471
"value" : "LED_RED"
72+
},
73+
"bootloader-size": {
74+
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",
75+
"value" : "(32*1024)",
76+
"macro_name": "MBED_BOOTLOADER_SIZE"
7577
}
7678
}
7779
}

configs-psa/wifi_esp8266_v4.json renamed to configs-psa/wifi.json

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,56 +10,24 @@
1010
"platform.stdio-convert-newlines" : true,
1111
"platform.stdio-buffered-serial" : true,
1212
"platform.stdio-flush-at-exit" : true,
13-
"rtos.main-thread-stack-size" : 5120,
14-
"rtos.timer-thread-stack-size" : 256,
15-
"rtos.idle-thread-stack-size" : 256,
1613
"mbed-cloud-client.psa-support" : 1,
14+
"rtos.main-thread-stack-size" : 5120,
1715
"events.shared-stacksize" : 2048,
1816
"events.shared-eventsize" : 1536,
17+
"update-client.storage-locations" : 1,
1918
"mbed-trace.enable" : null,
2019
"nsapi.default-wifi-security" : "WPA_WPA2",
2120
"nsapi.default-wifi-ssid" : "\"SSID\"",
2221
"nsapi.default-wifi-password" : "\"Password\""
2322
},
24-
"CY8CKIT_062_WIFI_BT_PSA": {
25-
"client_app.mbedtls-user-config-file" : "\"mbedTLSConfig_mbedOS.h\"",
26-
"client_app.pal-user-defined-configuration" : "\"pal_config_MbedOS.h\"",
27-
"target.app_offset" : "0x0A400",
28-
"target.header_offset" : "0x0A000",
29-
"target.bootloader_img" : "tools/mbed-bootloader-cy8ckit_062_wifi_bt_psa-block_device-kvstore-v4.0.1-4-g19c1.hex",
30-
"target.extra_labels_add" : [ "PSA" ],
31-
"target.macros_add" : ["MBEDTLS_PSA_CRYPTO_C"],
32-
"target.network-default-interface-type" : "WIFI",
33-
"target.components_add" : ["FLASHIAP", "SD"],
34-
"target.restrict_size" : "0xADC00",
35-
"storage_filesystem.filesystem" : "LITTLE",
36-
"storage_filesystem.blockdevice" : "SD",
37-
"storage_filesystem.internal_base_address" : "(0x10040000+0xB8000)",
38-
"storage_filesystem.rbp_internal_size" : "(23*1024)",
39-
"storage.storage_type" : "FILESYSTEM",
40-
"storage_filesystem.external_base_address" : "(0x0)",
41-
"storage_filesystem.external_size" : "(1024*1024*64)",
42-
"sd.SPI_MOSI" : "P12_0",
43-
"sd.SPI_MISO" : "P12_1",
44-
"sd.SPI_CLK" : "P12_2",
45-
"sd.SPI_CS" : "P12_3",
46-
"esp8266.rx" : "P10_0",
47-
"esp8266.tx" : "P10_1",
48-
"esp8266.provide-default" : true,
49-
"update-client.application-details" : "(0x1004a000)",
50-
"update-client.storage-address" : "(1024*1024*64)",
51-
"update-client.storage-size" : "0xADC00",
52-
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP_BLOCKDEVICE"
53-
},
5423
"LPC55S69_NS": {
55-
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP_BLOCKDEVICE",
24+
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP_BLOCKDEVICE",
5625
"target.bootloader_img" : "tools/mbed-bootloader-lpc55s69_ns-block_device-kvstore-v4.0.1-4-g65fd.hex",
5726
"target.header_offset" : "0x8000",
5827
"target.app_offset" : "0x8400",
59-
"target.features_add" : [ "BOOTLOADER", "STORAGE" ],
6028
"target.components_add" : [ "SD", "FLASHIAP" ],
6129
"target.extra_labels_add" : [ "PSA" ],
62-
"target.macros_add" : [ "MBEDTLS_PSA_CRYPTO_C", "DISABLE_ERROR_DESCRIPTION" ],
30+
"target.macros_add" : [ "DISABLE_ERROR_DESCRIPTION" ],
6331
"target.restrict_size" : "0x5BC00",
6432
"target.network-default-interface-type" : "WIFI",
6533
"storage.storage_type" : "FILESYSTEM",
@@ -79,6 +47,41 @@
7947
"storage_filesystem.external_base_address" : "0x0",
8048
"storage_filesystem.external_size" : "(1024*1024*64)",
8149
"button-pinname" : "SW2"
50+
},
51+
"NUCLEO_F411RE": {
52+
"client_app.mbedtls-user-config-file" : "\"mbedTLSConfig_mbedOS_SW_TRNG_PSA.h\"",
53+
"client_app.pal-user-defined-configuration" : "\"pal_config_non_trng_MbedOS.h\"",
54+
"target.extra_labels_add" : ["PSA"],
55+
"target.macros_add" : ["DISABLE_ERROR_DESCRIPTION", "MBEDTLS_ENTROPY_NV_SEED"],
56+
"mbed-cloud-client.disable-certificate-enrollment": 1,
57+
"target.network-default-interface-type" : "WIFI",
58+
"target.bootloader_img" : "tools/mbed-bootloader-nucleo_f411re-block_device-kvstore-v4.0.0.bin",
59+
"target.header_offset" : "0x10000",
60+
"target.app_offset" : "0x10400",
61+
"target.components_add" : ["SD", "WIFI_IDW01M1"],
62+
"update-client.bootloader-details" : "(MBED_ROM_START + 30*1024)",
63+
"update-client.application-details" : "(MBED_ROM_START + MBED_BOOTLOADER_SIZE + MBED_CONF_STORAGE_FILESYSTEM_RBP_INTERNAL_SIZE)",
64+
"update-client.storage-address" : "(MBED_CONF_STORAGE_FILESYSTEM_EXTERNAL_SIZE)",
65+
"update-client.storage-size" : "((MBED_ROM_START + MBED_ROM_SIZE - APPLICATION_ADDR) * MBED_CONF_UPDATE_CLIENT_STORAGE_LOCATIONS)",
66+
"mbed-cloud-client.update-storage" : "ARM_UCP_FLASHIAP_BLOCKDEVICE",
67+
"storage_filesystem.internal_base_address" : "(MBED_ROM_START + MBED_BOOTLOADER_SIZE)",
68+
"storage_filesystem.rbp_internal_size" : "(32*1024)",
69+
"storage_filesystem.external_base_address" : "(0x0)",
70+
"storage_filesystem.external_size" : "(1024*1024*64)",
71+
"storage.storage_type" : "FILESYSTEM",
72+
"storage_filesystem.filesystem" : "LITTLE",
73+
"storage_filesystem.blockdevice" : "SD",
74+
"target.macros_remove" : ["MBEDTLS_CONFIG_HW_SUPPORT"],
75+
"sd.SPI_MOSI" : "PC_3",
76+
"sd.SPI_MISO" : "PC_2",
77+
"sd.SPI_CLK" : "PC_7",
78+
"sd.SPI_CS" : "PB_9",
79+
"esp8266.rx" : "PB_7",
80+
"esp8266.tx" : "PA_15",
81+
"esp8266.rst" : null,
82+
"esp8266.rts" : "PA_12",
83+
"esp8266.cts" : "PA_11",
84+
"esp8266.provide-default" : true
8285
}
8386
},
8487
"config": {
@@ -94,6 +97,11 @@
9497
"led-pinname" : {
9598
"help" : "PinName for led, which is attached to led blink resource.",
9699
"value" : "LED_RED"
100+
},
101+
"bootloader-size": {
102+
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",
103+
"value" : "(32*1024)",
104+
"macro_name": "MBED_BOOTLOADER_SIZE"
97105
}
98106
}
99107
}

configs/eth_v4.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"macros": [
3-
"MBED_BOOTLOADER_SIZE=(32*1024)",
43
"ARM_UC_USE_PAL_BLOCKDEVICE=1"
54
],
65
"target_overrides": {
@@ -11,8 +10,6 @@
1110
"platform.stdio-buffered-serial" : true,
1211
"platform.stdio-flush-at-exit" : true,
1312
"rtos.main-thread-stack-size" : 5120,
14-
"rtos.timer-thread-stack-size" : 256,
15-
"rtos.idle-thread-stack-size" : 256,
1613
"update-client.storage-locations" : 1,
1714
"mbed-trace.enable" : null
1815
},
@@ -108,6 +105,11 @@
108105
"led-pinname" : {
109106
"help" : "PinName for led, which is attached to led blink resource.",
110107
"value" : "LED_RED"
108+
},
109+
"bootloader-size": {
110+
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",
111+
"value" : "(32*1024)",
112+
"macro_name": "MBED_BOOTLOADER_SIZE"
111113
}
112114
}
113115
}

configs/eth_v6.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"macros": [
3-
"MBED_BOOTLOADER_SIZE=(32*1024)",
43
"ARM_UC_USE_PAL_BLOCKDEVICE=1"
54
],
65
"target_overrides": {
@@ -11,8 +10,6 @@
1110
"platform.stdio-buffered-serial" : true,
1211
"platform.stdio-flush-at-exit" : true,
1312
"rtos.main-thread-stack-size" : 5120,
14-
"rtos.timer-thread-stack-size" : 256,
15-
"rtos.idle-thread-stack-size" : 256,
1613
"update-client.storage-locations" : 1,
1714
"mbed-trace.enable" : null,
1815
"lwip.ipv4-enabled" : false,
@@ -110,6 +107,11 @@
110107
"led-pinname" : {
111108
"help" : "PinName for led, which is attached to led blink resource.",
112109
"value" : "LED_RED"
110+
},
111+
"bootloader-size": {
112+
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",
113+
"value" : "(32*1024)",
114+
"macro_name": "MBED_BOOTLOADER_SIZE"
113115
}
114116
}
115117
}

configs/mesh_6lowpan.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
"platform.stdio-buffered-serial" : true,
1111
"platform.stdio-flush-at-exit" : true,
1212
"rtos.main-thread-stack-size" : 5120,
13-
"rtos.timer-thread-stack-size" : 256,
14-
"rtos.idle-thread-stack-size" : 256,
1513
"mbed-client.reconnection-count" : 6,
16-
"mbed-client.sn-coap-blockwise-max-time-data-stored": 120,
17-
"mbed-client.tls-max-retry" : 240,
14+
"mbed-client.sn-coap-blockwise-max-time-data-stored": 300,
1815
"client_app.pal_dtls_peer_min_timeout" : "10000",
16+
"client_app.startup_max_random_delay" : 200,
1917
"nanostack-hal.event_loop_thread_stack_size": 8192,
2018
"update-client.storage-locations" : 1,
2119
"mbed-trace.enable" : null,
@@ -60,6 +58,11 @@
6058
"led-pinname" : {
6159
"help" : "PinName for led, which is attached to led blink resource.",
6260
"value" : "LED_RED"
61+
},
62+
"bootloader-size": {
63+
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",
64+
"value" : "(32*1024)",
65+
"macro_name": "MBED_BOOTLOADER_SIZE"
6366
}
6467
}
6568
}

configs/mesh_thread.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
1212
"platform.stdio-buffered-serial" : true,
1313
"platform.stdio-flush-at-exit" : true,
1414
"rtos.main-thread-stack-size" : 5120,
15-
"rtos.timer-thread-stack-size" : 256,
16-
"rtos.idle-thread-stack-size" : 256,
1715
"mbed-client.reconnection-count" : 6,
18-
"mbed-client.sn-coap-blockwise-max-time-data-stored": 120,
19-
"mbed-client.tls-max-retry" : 240,
16+
"mbed-client.sn-coap-blockwise-max-time-data-stored": 300,
2017
"client_app.pal_dtls_peer_min_timeout" : "10000",
18+
"client_app.startup_max_random_delay" : 200,
2119
"nanostack-hal.event_loop_thread_stack_size": 8192,
2220
"update-client.storage-locations" : 1,
2321
"mbed-trace.enable" : null,
@@ -61,6 +59,11 @@
6159
"led-pinname" : {
6260
"help" : "PinName for led, which is attached to led blink resource.",
6361
"value" : "LED_RED"
62+
},
63+
"bootloader-size": {
64+
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",
65+
"value" : "(32*1024)",
66+
"macro_name": "MBED_BOOTLOADER_SIZE"
6467
}
6568
}
6669
}

configs/mesh_wisun.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"macros": [
3-
"MBED_BOOTLOADER_SIZE=(32*1024)",
43
"ARM_UC_USE_PAL_BLOCKDEVICE=1",
54
"MBEDTLS_PEM_PARSE_C",
65
"MBEDTLS_NIST_KW_C",
@@ -14,12 +13,10 @@
1413
"platform.stdio-buffered-serial" : true,
1514
"platform.stdio-flush-at-exit" : true,
1615
"rtos.main-thread-stack-size" : 5120,
17-
"rtos.timer-thread-stack-size" : 256,
18-
"rtos.idle-thread-stack-size" : 256,
1916
"mbed-client.reconnection-count" : 6,
20-
"mbed-client.sn-coap-blockwise-max-time-data-stored": 120,
21-
"mbed-client.tls-max-retry" : 240,
17+
"mbed-client.sn-coap-blockwise-max-time-data-stored": 300,
2218
"client_app.pal_dtls_peer_min_timeout" : "10000",
19+
"client_app.startup_max_random_delay" : 200,
2320
"nanostack-hal.event_loop_thread_stack_size": 8192,
2421
"update-client.storage-locations" : 1,
2522
"mbed-trace.enable" : null,
@@ -70,6 +67,11 @@
7067
"led-pinname" : {
7168
"help" : "PinName for led, which is attached to led blink resource.",
7269
"value" : "LED_RED"
70+
},
71+
"bootloader-size": {
72+
"help" : "Helper macro to enable calculation of rom regions. target.header_offset and target.app_offset still needs to be calculated manually, though.",
73+
"value" : "(32*1024)",
74+
"macro_name": "MBED_BOOTLOADER_SIZE"
7375
}
7476
}
7577
}

0 commit comments

Comments
 (0)