Skip to content

Commit

Permalink
Merge pull request #44 from ARMmbed/release-3.1.1
Browse files Browse the repository at this point in the history
mbed-cloud-client-example 3.1.1
  • Loading branch information
teetak01 authored May 13, 2019
2 parents b4b4f55 + 27e0762 commit d629dda
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog for Pelion Device Management Client example application

## Release 3.1.1 (13.05.2019)

* Updated to Mbed OS 5.12.2.
* Fixed the application initialization issue in production flow. This fixes a regression caused by 3.1.0 release.
* Fixed a compilation issue of Nucleo F429ZI board with the root-level `mbed_app.json`.

## Release 3.1.0 (26.04.2019)

* Updated to Mbed OS 5.12.1.
Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ project(mbedCloudClientExample)
add_definitions(-DNS_EXCLUDE_HIGHRES_TIMER)
add_definitions(-DNS_EVENTLOOP_USE_TICK_TIMER)
add_definitions(-DMBED_CONF_MBED_CLIENT_EVENT_LOOP_SIZE=8192)
if(${OS_BRAND} STREQUAL "FreeRTOS")
add_definitions(-DMBED_CONF_MBED_CLIENT_DNS_THREAD_STACK_SIZE=2048)
else()
add_definitions(-DMBED_CONF_MBED_CLIENT_DNS_THREAD_STACK_SIZE=102400)
endif()

# mbed-cloud-client-example
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
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/ARMmbed/mbed-cloud-client/#caf14b6e3117636ea86a3845929ac5c22f303d3f
https://github.com/ARMmbed/mbed-cloud-client/#ab201631cbb03e879aa7f6943e942cd8f024e2e9
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/#0063e5de32fc575f061244c96ac60c41c07bd2e6
https://github.com/ARMmbed/mbed-os/#cfa7938a4dd6d1a4c501945b9c26ca68f70e284e
1 change: 1 addition & 0 deletions mbed_app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"macros": [
"MBED_BOOTLOADER_SIZE=(32*1024)",
"ARM_UC_USE_PAL_BLOCKDEVICE=1"
],
"target_overrides": {
Expand Down
2 changes: 2 additions & 0 deletions source/application_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,13 @@ static bool application_init_verify_cloud_configuration()
}
#endif
#ifndef MCC_MINIMAL
#if MBED_CONF_APP_DEVELOPER_MODE == 1
status = fcc_verify_device_configured_4mbed_cloud();
print_fcc_status(status);
if (status != FCC_STATUS_SUCCESS && status != FCC_STATUS_EXPIRED_CERTIFICATE) {
result = 1;
}
#endif
#endif
return result;
}
Expand Down
13 changes: 9 additions & 4 deletions source/simplem2mclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class SimpleM2MClient {
bool call_register() {

_cloud_client.on_registered(this, &SimpleM2MClient::client_registered);
_cloud_client.on_registration_updated(this, &SimpleM2MClient::client_registration_updated);
_cloud_client.on_unregistered(this, &SimpleM2MClient::client_unregistered);
_cloud_client.on_error(this, &SimpleM2MClient::error);

Expand Down Expand Up @@ -87,7 +88,7 @@ class SimpleM2MClient {

void client_registered() {
_registered = true;
printf("\nClient registered\n");
printf("Client registered\n");
static const ConnectorClientEndpointInfo* endpoint = NULL;
if (endpoint == NULL) {
endpoint = _cloud_client.endpoint_info();
Expand All @@ -108,10 +109,14 @@ class SimpleM2MClient {
#endif
}

void client_registration_updated() {
printf("Client registration updated\n");
}

void client_unregistered() {
_registered = false;
_register_called = false;
printf("\nClient unregistered - Exiting application\n\n");
printf("Client unregistered - Exiting application\n");
#ifdef MBED_HEAP_STATS_ENABLED
print_heap_stats();
#endif
Expand Down Expand Up @@ -216,8 +221,8 @@ class SimpleM2MClient {
error = "UNKNOWN";
}
printf("\nError occurred : %s\r\n", error);
printf("Error code : %d\r\n\n", error_code);
printf("Error details : %s\r\n\n",_cloud_client.error_description());
printf("Error code : %d\r\n", error_code);
printf("Error details : %s\r\n",_cloud_client.error_description());
}

bool is_client_registered() {
Expand Down

0 comments on commit d629dda

Please sign in to comment.