![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This is a simple mbed client example demonstrating, registration of a device with mbed Device Connector and reading and writing values as well as deregistering on different Network Interfaces including Ethernet, WiFi, 6LoWPAN ND and Thread respectively.
Fork of mbed-os-example-client by
Diff: simpleclient.h
- Revision:
- 59:b2569564d62c
- Parent:
- 57:bb3eca53b307
diff -r e5468bc5bf9a -r b2569564d62c simpleclient.h --- a/simpleclient.h Thu Jan 26 14:30:12 2017 +0000 +++ b/simpleclient.h Fri Jan 27 14:45:11 2017 +0000 @@ -174,9 +174,9 @@ // Add ResourceID's and values to the security ObjectID/ObjectInstance security->set_resource_value(M2MSecurity::M2MServerUri, _server_address); security->set_resource_value(M2MSecurity::SecurityMode, M2MSecurity::Certificate); - security->set_resource_value(M2MSecurity::ServerPublicKey, SERVER_CERT, sizeof(SERVER_CERT)); - security->set_resource_value(M2MSecurity::PublicKey, CERT, sizeof(CERT)); - security->set_resource_value(M2MSecurity::Secretkey, KEY, sizeof(KEY)); + security->set_resource_value(M2MSecurity::ServerPublicKey, SERVER_CERT, sizeof(SERVER_CERT) - 1); + security->set_resource_value(M2MSecurity::PublicKey, CERT, sizeof(CERT) - 1); + security->set_resource_value(M2MSecurity::Secretkey, KEY, sizeof(KEY) - 1); } return security; }