Simple Mbed Cloud client application using features of K64F including Wi-Fi and SD Card
Fork of mbed-cloud-connect-example-ethernet by
Configuration
- Put ESP-WROOM-02 shield
- Put Mbed Application Shield
- Edit the text in the main.cpp
#define WIFI_SSID "SSID" #define WIFI_PSWD "PASSWORD"
- Download and replace your developer certificate from Mbed Cloud portal from the menu [Mbed Cloud] - [Certificate]
Revision 2:6ed27f413b30, committed 2018-02-14
- Comitter:
- MarceloSalazar
- Date:
- Wed Feb 14 13:20:30 2018 +0000
- Parent:
- 1:1ccf36276cd3
- Child:
- 3:bd00f3af8f03
- Commit message:
- Update Simple MCC lib
Changed in this revision
--- a/main.cpp Wed Feb 14 10:43:56 2018 +0000
+++ b/main.cpp Wed Feb 14 13:20:30 2018 +0000
@@ -26,9 +26,6 @@
#include "FATFileSystem.h"
#include "EthernetInterface.h"
-#define LED_OFF 1
-
-DigitalOut led(LED_RED, LED_OFF);
InterruptIn button(BUTTON1);
// Pointers to the resources that will be created in main_application().
@@ -45,97 +42,41 @@
void pattern_updated(const char *) {
printf("PUT received, new value: %s\n", pattern_ptr->get_value());
+ // Placeholder for PUT action
}
void blink_callback(void *) {
const char *pattern = pattern_ptr->get_value();
- printf("LED pattern = %s\n", pattern);
+ printf("POST received. LED pattern = %s\n", pattern);
+ // Placeholder for POST action
// The pattern is something like 500:200:500, so parse that.
- // LED blinking is done while parsing.
- led = !led;
- while (*pattern != '\0') {
- // Wait for requested time.
- wait_ms(atoi(pattern));
- led = !led;
- // Search for next value.
- pattern = strchr(pattern, ':');
- if(!pattern) {
- break; // while
- }
- pattern++;
- }
-
- led = LED_OFF;
}
-void button_notification_status_callback(const M2MBase& object, const NoticationDeliveryStatus status)
+void button_callback(const M2MBase& object, const NoticationDeliveryStatus status)
{
- switch(status) {
- case NOTIFICATION_STATUS_BUILD_ERROR:
- printf("Notification callback: (%s) error when building CoAP message\n", object.uri_path());
- break;
- case NOTIFICATION_STATUS_RESEND_QUEUE_FULL:
- printf("Notification callback: (%s) CoAP resend queue full\n", object.uri_path());
- break;
- case NOTIFICATION_STATUS_SENT:
- printf("Notification callback: (%s) Notification sent to server\n", object.uri_path());
- break;
- case NOTIFICATION_STATUS_DELIVERED:
- printf("Notification callback: (%s) Notification delivered\n", object.uri_path());
- break;
- case NOTIFICATION_STATUS_SEND_FAILED:
- printf("Notification callback: (%s) Notification sending failed\n", object.uri_path());
- break;
- case NOTIFICATION_STATUS_SUBSCRIBED:
- printf("Notification callback: (%s) subscribed\n", object.uri_path());
- break;
- case NOTIFICATION_STATUS_UNSUBSCRIBED:
- printf("Notification callback: (%s) subscription removed\n", object.uri_path());
- break;
- default:
- break;
- }
+ printf("Button notification. Callback: (%s)\n", object.uri_path());
+ // Placeholder for GET
}
-// This function is called when a POST request is received for resource 5000/0/1.
-void unregister_cb(void *)
-{
- printf("Unregister resource executed\n");
- client->close();
-}
-
-// This function is called when a POST request is received for resource 5000/0/2.
-void factory_reset_cb(void *)
-{
- printf("Factory reset resource executed\n");
- client->close();
- kcm_status_e kcm_status = kcm_factory_reset();
- if (kcm_status != KCM_STATUS_SUCCESS) {
- printf("Failed to do factory reset - %d\n", kcm_status);
- } else {
- printf("Factory reset completed. Now restart the device\n");
- }
-}
int main(void)
{
- // IOTMORF-1712: DAPLINK starts the previous application during flashing a new binary
- // This is workaround to prevent possible deletion of credentials or storage corruption
- // while replacing the application binary.
+ // Requires DAPLink 245+ (https://github.com/ARMmbed/DAPLink/pull/364)
+ // Older versions: workaround to prevent possible deletion of credentials:
wait(2);
// Misc OS setup
srand(time(NULL));
+ // Placeholder for network
EthernetInterface net;
+
+ // Placeholder for storage
SDBlockDevice sd(PTE3, PTE1, PTE2, PTE4);
FATFileSystem fs("sd");
printf("Start Simple Mbed Cloud Client\n");
- // Initialize button interrupt
- button.fall(&button_press);
-
// Initialize SD card
int status = sd.init();
if (status != BD_ERROR_OK) {
@@ -148,7 +89,6 @@
if (status) {
printf("Failed to mount FAT file system, reformatting...\r\n");
status = fs.reformat(&sd);
-
if (status) {
printf("Failed to reformat FAT file system\r\n");
return -1;
@@ -169,6 +109,9 @@
printf("IP address %s\n", ip_addr);
}
+ // Placeholder for GET requests. Initialize button interrupt.
+ button.fall(&button_press);
+
SimpleMbedCloudClient mbedClient(&net);
// Save pointer to mbedClient so that other functions can access it.
client = &mbedClient;
@@ -185,7 +128,7 @@
button->set_value("0");
button->methods(M2MMethod::GET);
button->observable(true);
- button->attach_notification(M2MMethod::GET, (void*)button_notification_status_callback);
+ button->attach_notification(M2MMethod::GET, (void*)button_callback);
MbedCloudClientResource *pattern = mbedClient.create_resource("3201/0/5853", "pattern_resource");
pattern->set_value("500:500:500:500");
@@ -197,14 +140,6 @@
blink->methods(M2MMethod::POST);
blink->attach(M2MMethod::POST, (void*)blink_callback);
- MbedCloudClientResource *unregister = mbedClient.create_resource("5000/0/1", "unregister");
- unregister->methods(M2MMethod::POST);
- unregister->attach(M2MMethod::POST, (void*)unregister_cb);
-
- MbedCloudClientResource *factoryReset = mbedClient.create_resource("5000/0/2", "factory_reset");
- factoryReset->methods(M2MMethod::POST);
- factoryReset->attach(M2MMethod::POST, (void*)factory_reset_cb);
-
mbedClient.register_and_connect();
// Check if client is registering or registered, if true sleep and repeat.
--- a/mbed_app.json Wed Feb 14 10:43:56 2018 +0000
+++ b/mbed_app.json Wed Feb 14 13:20:30 2018 +0000
@@ -12,10 +12,6 @@
"platform.stdio-convert-newlines": true,
"mbed-client.event-loop-size": 1024,
"mbed-trace.enable": null
- },
- "K64F": {
- "update-client.application-details": "0x00020000",
- "update-client.bootloader-details": "0x172e4"
}
},
"config": {
--- a/mbed_cloud_dev_credentials.c Wed Feb 14 10:43:56 2018 +0000
+++ b/mbed_cloud_dev_credentials.c Wed Feb 14 13:20:30 2018 +0000
@@ -16,24 +16,246 @@
#ifndef __MBED_CLOUD_DEV_CREDENTIALS_H__
#define __MBED_CLOUD_DEV_CREDENTIALS_H__
-#if MBED_CONF_APP_DEVELOPER_MODE == 1
-#error "Replace mbed_cloud_dev_credentials.c with your own developer cert."
-#endif
-
#include <inttypes.h>
-const char MBED_CLOUD_DEV_BOOTSTRAP_ENDPOINT_NAME[] = "";
-const char MBED_CLOUD_DEV_ACCOUNT_ID[] = "";
-const char MBED_CLOUD_DEV_BOOTSTRAP_SERVER_URI[] = "";
+const char MBED_CLOUD_DEV_BOOTSTRAP_ENDPOINT_NAME[] = "015d75eb0fe302420a01640503c00000";
+const char MBED_CLOUD_DEV_ACCOUNT_ID[] = "015b5c9279be02420a01041200000000";
+const char MBED_CLOUD_DEV_BOOTSTRAP_SERVER_URI[] = "coaps://coap-systemtest.dev.mbed.com:5684?aid=015b5c9279be02420a01041200000000";
+
+const uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE[] =
+{ 0x30, 0x82, 0x02, 0x18, 0x30, 0x82, 0x01, 0xbd,
+ 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x11, 0x00,
+ 0xa0, 0x27, 0xa6, 0xfd, 0xac, 0x10, 0x4c, 0xae,
+ 0x86, 0x93, 0x10, 0xfc, 0xe3, 0xfa, 0xfe, 0xe8,
+ 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,
+ 0x3d, 0x04, 0x03, 0x02, 0x30, 0x77, 0x31, 0x0b,
+ 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
+ 0x02, 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06,
+ 0x03, 0x55, 0x04, 0x08, 0x0c, 0x0e, 0x43, 0x61,
+ 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73,
+ 0x68, 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10,
+ 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x09, 0x43,
+ 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,
+ 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04,
+ 0x0a, 0x0c, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c,
+ 0x74, 0x64, 0x31, 0x29, 0x30, 0x27, 0x06, 0x03,
+ 0x55, 0x04, 0x03, 0x0c, 0x20, 0x30, 0x31, 0x35,
+ 0x64, 0x37, 0x35, 0x65, 0x62, 0x30, 0x66, 0x65,
+ 0x33, 0x30, 0x32, 0x34, 0x32, 0x30, 0x61, 0x30,
+ 0x31, 0x36, 0x34, 0x30, 0x35, 0x30, 0x33, 0x63,
+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x1e, 0x17,
+ 0x0d, 0x31, 0x37, 0x30, 0x37, 0x32, 0x34, 0x31,
+ 0x38, 0x34, 0x35, 0x32, 0x35, 0x5a, 0x17, 0x0d,
+ 0x32, 0x37, 0x30, 0x37, 0x32, 0x34, 0x31, 0x38,
+ 0x34, 0x35, 0x32, 0x35, 0x5a, 0x30, 0x77, 0x31,
+ 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,
+ 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30, 0x15,
+ 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x0e, 0x43,
+ 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,
+ 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12, 0x30,
+ 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x09,
+ 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,
+ 0x65, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55,
+ 0x04, 0x0a, 0x0c, 0x07, 0x41, 0x52, 0x4d, 0x20,
+ 0x4c, 0x74, 0x64, 0x31, 0x29, 0x30, 0x27, 0x06,
+ 0x03, 0x55, 0x04, 0x03, 0x0c, 0x20, 0x30, 0x31,
+ 0x35, 0x64, 0x37, 0x35, 0x65, 0x62, 0x30, 0x66,
+ 0x65, 0x33, 0x30, 0x32, 0x34, 0x32, 0x30, 0x61,
+ 0x30, 0x31, 0x36, 0x34, 0x30, 0x35, 0x30, 0x33,
+ 0x63, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x59,
+ 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce,
+ 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48,
+ 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00,
+ 0x04, 0x65, 0x4b, 0x1c, 0x37, 0xd6, 0x47, 0x10,
+ 0x8d, 0x8a, 0x3b, 0xa9, 0xd9, 0xa8, 0xba, 0x89,
+ 0xe2, 0x56, 0x2a, 0x0a, 0x07, 0xbb, 0x46, 0xb5,
+ 0xff, 0x58, 0x91, 0x81, 0xd2, 0x8f, 0xa2, 0xc4,
+ 0xe4, 0x3f, 0x3b, 0xdd, 0x66, 0x73, 0x79, 0x64,
+ 0xf5, 0x73, 0x0f, 0x41, 0x47, 0xa9, 0x6e, 0x4f,
+ 0x75, 0x49, 0xa9, 0x53, 0x6a, 0xeb, 0xa4, 0xd7,
+ 0x6b, 0x37, 0xd9, 0xec, 0x48, 0xe5, 0xce, 0xab,
+ 0x3e, 0xa3, 0x2a, 0x30, 0x28, 0x30, 0x12, 0x06,
+ 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xa0, 0x20,
+ 0x81, 0x49, 0x04, 0x05, 0x02, 0x03, 0x40, 0x00,
+ 0x91, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13,
+ 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01,
+ 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06,
+ 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,
+ 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21,
+ 0x00, 0xfc, 0x47, 0x35, 0x0e, 0x23, 0xaf, 0x34,
+ 0x04, 0xc9, 0x1b, 0xed, 0x43, 0x80, 0x81, 0xed,
+ 0xfb, 0x2f, 0x1d, 0x8b, 0x1b, 0x96, 0xcd, 0xdd,
+ 0xa7, 0x85, 0xb6, 0x72, 0x19, 0xc7, 0x57, 0xd5,
+ 0x18, 0x02, 0x21, 0x00, 0x98, 0x31, 0x66, 0x9c,
+ 0x49, 0x14, 0x22, 0x6c, 0xa0, 0x82, 0x8d, 0x37,
+ 0x90, 0x1b, 0x9a, 0xd3, 0x5d, 0x65, 0x07, 0xb7,
+ 0x99, 0x3d, 0xcd, 0x4a, 0x42, 0x4e, 0x20, 0xe3,
+ 0xdb, 0x3d, 0x43, 0xce };
-const uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE[] =
-{ 0x0 };
+const uint8_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE[] =
+{ 0x30, 0x82, 0x02, 0x32, 0x30, 0x82, 0x01, 0xd9,
+ 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x45,
+ 0x5e, 0x28, 0x41, 0x2b, 0xca, 0xf1, 0xb1, 0x4e,
+ 0xea, 0xad, 0x06, 0x25, 0x6a, 0xd8, 0x4a, 0x30,
+ 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,
+ 0x04, 0x03, 0x02, 0x30, 0x71, 0x31, 0x0b, 0x30,
+ 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
+ 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,
+ 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,
+ 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,
+ 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,
+ 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,
+ 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,
+ 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,
+ 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,
+ 0x64, 0x31, 0x23, 0x30, 0x21, 0x06, 0x03, 0x55,
+ 0x04, 0x03, 0x13, 0x1a, 0x41, 0x52, 0x4d, 0x20,
+ 0x4f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c,
+ 0x53, 0x20, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74,
+ 0x72, 0x61, 0x70, 0x20, 0x43, 0x41, 0x30, 0x20,
+ 0x17, 0x0d, 0x31, 0x37, 0x30, 0x33, 0x32, 0x30,
+ 0x31, 0x35, 0x31, 0x31, 0x33, 0x33, 0x5a, 0x18,
+ 0x0f, 0x32, 0x30, 0x35, 0x32, 0x30, 0x33, 0x32,
+ 0x30, 0x31, 0x35, 0x32, 0x31, 0x33, 0x33, 0x5a,
+ 0x30, 0x71, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
+ 0x55, 0x04, 0x06, 0x13, 0x02, 0x47, 0x42, 0x31,
+ 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x08,
+ 0x13, 0x0e, 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69,
+ 0x64, 0x67, 0x65, 0x73, 0x68, 0x69, 0x72, 0x65,
+ 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04,
+ 0x07, 0x13, 0x09, 0x43, 0x61, 0x6d, 0x62, 0x72,
+ 0x69, 0x64, 0x67, 0x65, 0x31, 0x10, 0x30, 0x0e,
+ 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x07, 0x41,
+ 0x52, 0x4d, 0x20, 0x4c, 0x74, 0x64, 0x31, 0x23,
+ 0x30, 0x21, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
+ 0x1a, 0x41, 0x52, 0x4d, 0x20, 0x4f, 0x66, 0x66,
+ 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, 0x2b, 0x06, 0x01, 0x04, 0x01,
+ 0x82, 0x37, 0x15, 0x01, 0x04, 0x03, 0x02, 0x01,
+ 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48,
+ 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x47, 0x00,
+ 0x30, 0x44, 0x02, 0x20, 0x09, 0x7d, 0xce, 0x2f,
+ 0x1c, 0x93, 0xf9, 0x1f, 0x5f, 0x0f, 0xf5, 0x02,
+ 0x76, 0x7e, 0xa2, 0xf0, 0x5b, 0x1f, 0xc9, 0xe4,
+ 0x04, 0xae, 0x58, 0xf0, 0xd6, 0x3d, 0xea, 0x1a,
+ 0xf4, 0x81, 0x4d, 0x87, 0x02, 0x20, 0x0c, 0xd4,
+ 0xbd, 0x67, 0xa4, 0xf4, 0xd6, 0x3d, 0x52, 0xa5,
+ 0xbe, 0x6d, 0x66, 0x03, 0xc5, 0xb1, 0x29, 0x7e,
+ 0x9a, 0xb0, 0x19, 0x30, 0x69, 0x9d, 0x7d, 0x72,
+ 0xb7, 0x88, 0x3c, 0xb9, 0x94, 0x9b };
-const uint8_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE[] =
-{ 0x0 };
+const uint8_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE[] =
+{ 0x30, 0x82, 0x02, 0x1d, 0x30, 0x82, 0x01, 0xc3,
+ 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x48,
+ 0x74, 0xf6, 0xaf, 0xd3, 0xce, 0x7b, 0xb7, 0x40,
+ 0xa3, 0x02, 0xc6, 0x6f, 0x4f, 0xa1, 0xed, 0x30,
+ 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,
+ 0x04, 0x03, 0x02, 0x30, 0x66, 0x31, 0x0b, 0x30,
+ 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
+ 0x47, 0x42, 0x31, 0x17, 0x30, 0x15, 0x06, 0x03,
+ 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43, 0x61, 0x6d,
+ 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x73, 0x68,
+ 0x69, 0x72, 0x65, 0x31, 0x12, 0x30, 0x10, 0x06,
+ 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61,
+ 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x31,
+ 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x0a,
+ 0x13, 0x07, 0x41, 0x52, 0x4d, 0x20, 0x4c, 0x74,
+ 0x64, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55,
+ 0x04, 0x03, 0x13, 0x0f, 0x41, 0x52, 0x4d, 0x20,
+ 0x4f, 0x53, 0x20, 0x4c, 0x57, 0x4d, 0x32, 0x4d,
+ 0x20, 0x43, 0x41, 0x30, 0x20, 0x17, 0x0d, 0x31,
+ 0x37, 0x30, 0x33, 0x32, 0x30, 0x31, 0x35, 0x32,
+ 0x39, 0x32, 0x32, 0x5a, 0x18, 0x0f, 0x32, 0x30,
+ 0x35, 0x32, 0x30, 0x33, 0x32, 0x30, 0x31, 0x35,
+ 0x33, 0x39, 0x32, 0x32, 0x5a, 0x30, 0x66, 0x31,
+ 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,
+ 0x13, 0x02, 0x47, 0x42, 0x31, 0x17, 0x30, 0x15,
+ 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0e, 0x43,
+ 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,
+ 0x73, 0x68, 0x69, 0x72, 0x65, 0x31, 0x12, 0x30,
+ 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x09,
+ 0x43, 0x61, 0x6d, 0x62, 0x72, 0x69, 0x64, 0x67,
+ 0x65, 0x31, 0x10, 0x30,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7f,
+ 0xef, 0x5e, 0xf6, 0x70, 0xe5, 0xab, 0x6d, 0x08,
+ 0x73, 0xba, 0x48, 0x63, 0x71, 0x59, 0x85, 0x86,
+ 0x04, 0x30, 0x10, 0x06, 0x09, 0x2b, 0x06, 0x01,
+ 0x04, 0x01, 0x82, 0x37, 0x15, 0x01, 0x04, 0x03,
+ 0x02, 0x01, 0x00, 0x30, 0x0a, 0x06, 0x08, 0x2a,
+ 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03,
+ 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0x83,
+ 0xb5, 0x3b, 0x4e, 0x00, 0x6b, 0x14, 0x28, 0x08,
+ 0xc4, 0x9b, 0x9e, 0xb2, 0x1b, 0xbf, 0x69, 0xc8,
+ 0xc5, 0x63, 0xe1, 0x06, 0xa7, 0x0d, 0xdf, 0x52,
+ 0xdb, 0xac, 0xb9, 0x73, 0x14, 0x4e, 0x40, 0x02,
+ 0x20, 0x49, 0xa5, 0x60, 0x11, 0xce, 0x05, 0x6a,
+ 0x44, 0x97, 0xf1, 0xff, 0x19, 0x04, 0x77, 0x51,
+ 0x65, 0x04, 0x5b, 0xb1, 0x35, 0xf0, 0xf3, 0xaf,
+ 0x58, 0xb2, 0x1d, 0xc2, 0x1f, 0x6c, 0x61, 0xb8,
+ 0x7b };
-const uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY[] =
-{ 0x0 };
+const uint8_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY[] =
+{ 0x30, 0x81, 0x93, 0x02, 0x01, 0x00, 0x30, 0x13,
+ 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02,
+ 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d,
+ 0x03, 0x01, 0x07, 0x04, 0x79, 0x30, 0x77, 0x02,
+ 0x01, 0x01, 0x04, 0x20, 0xa7, 0x55, 0x4b, 0xf8,
+ 0x2b, 0xb1, 0x4c, 0xec, 0x06, 0xe0, 0x38, 0xd7,
+ 0x0d, 0xd8, 0x9c, 0x3b, 0x78, 0x2c, 0xfd, 0x97,
+ 0xb6, 0xa5, 0x1f, 0xf9, 0xf4, 0xfc, 0x77, 0x12,
+ 0x0e, 0xdf, 0x5b, 0xfc, 0xa0, 0x0a, 0x06, 0x08,
+ 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07,
+ 0xa1, 0x44, 0x03, 0x42, 0x00, 0x04, 0x65, 0x4b,
+ 0x1c, 0x37, 0xd6, 0x47, 0x10, 0x8d, 0x8a, 0x3b,
+ 0xa9, 0xd9, 0xa8, 0xba, 0x89, 0xe2, 0x56, 0x2a,
+ 0x0a, 0x07, 0xbb, 0x46, 0xb5, 0xff, 0x58, 0x91,
+ 0x81, 0xd2, 0x8f, 0xa2, 0xc4, 0xe4, 0x3f, 0x3b,
+ 0xdd, 0x66, 0x73, 0x79, 0x64, 0xf5, 0x73, 0x0f,
+ 0x41, 0x47, 0xa9, 0x6e, 0x4f, 0x75, 0x49, 0xa9,
+ 0x53, 0x6a, 0xeb, 0xa4, 0xd7, 0x6b, 0x37, 0xd9,
+ 0xec, 0x48, 0xe5, 0xce, 0xab, 0x3e };
const char MBED_CLOUD_DEV_MANUFACTURER[] = "dev_manufacturer";
@@ -46,8 +268,10 @@
const char MBED_CLOUD_DEV_HARDWARE_VERSION[] = "dev_hardware_version";
const uint32_t MBED_CLOUD_DEV_MEMORY_TOTAL_KB = 0;
+
const uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_CERTIFICATE);
const uint32_t MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_SERVER_ROOT_CA_CERTIFICATE);
+const uint32_t MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE_SIZE = sizeof(MBED_CLOUD_DEV_LWM2M_SERVER_ROOT_CA_CERTIFICATE);
const uint32_t MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY_SIZE = sizeof(MBED_CLOUD_DEV_BOOTSTRAP_DEVICE_PRIVATE_KEY);
#endif //__MBED_CLOUD_DEV_CREDENTIALS_H__
--- a/simple-mbed-cloud-client.lib Wed Feb 14 10:43:56 2018 +0000 +++ b/simple-mbed-cloud-client.lib Wed Feb 14 13:20:30 2018 +0000 @@ -1,1 +1,1 @@ -https://github.com/bridadan/simple-mbed-cloud-client/#fdb9b7f54c5379287ef6f274fd4c267fdbd6bc8e +https://github.com/ARMmbed/simple-mbed-cloud-client/#5163a8da0281c6c1d3d84d5f693b45da485d928b
Toyomasa Watarai
