sandbox / mbed-client

Fork of mbed-client by Christopher Haster

Committer:
Yogesh Pande
Date:
Sat Apr 02 00:31:13 2016 +0300
Revision:
4:ae5178938864
Parent:
1:79b6cc67d8b4
Latest updated sources from Github and some trace group refactor.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Yogesh Pande 4:ae5178938864 1 # ARM mbed Client overview
Christopher Haster 1:79b6cc67d8b4 2
Yogesh Pande 4:ae5178938864 3 ARM mbed Client is a library that provides the means to connect constrained embedded devices to mbed Device Connector Service, mbed Device Server and to mbed-enabled cloud services from our partners.
Christopher Haster 1:79b6cc67d8b4 4
Yogesh Pande 4:ae5178938864 5 The mbed Client high-level APIs allow mbed OS developers to create applications with LWM2M features as described in the [Lightweight Machine to Machine Technical Specification](http://technical.openmobilealliance.org/Technical/technical-information/release-program/current-releases/oma-lightweightm2m-v1-0):
Christopher Haster 1:79b6cc67d8b4 6
Yogesh Pande 4:ae5178938864 7 - Manage devices on mbed Device Server.
Yogesh Pande 4:ae5178938864 8 - Securely communicate with internet services over the industry standard TLS/DTLS.
Yogesh Pande 4:ae5178938864 9 - Fully control the endpoint and application logic.
Christopher Haster 1:79b6cc67d8b4 10
Christopher Haster 1:79b6cc67d8b4 11 The API is written in C++ to allow quick application development.
Christopher Haster 1:79b6cc67d8b4 12
Yogesh Pande 4:ae5178938864 13 ## Managing devices on mbed Device Server
Christopher Haster 1:79b6cc67d8b4 14
Yogesh Pande 4:ae5178938864 15 mbed Client supports the following three features introduced in the subsequent chapters:
Christopher Haster 1:79b6cc67d8b4 16
Yogesh Pande 4:ae5178938864 17 - [Client Registration and Deregistration](client_reg_dereg.md)
Yogesh Pande 4:ae5178938864 18 - [Device Management and Service Enablement](dev_man_serv_enable.md)
Yogesh Pande 4:ae5178938864 19 - [Information Reporting](info_reporting.md)
Christopher Haster 1:79b6cc67d8b4 20
Yogesh Pande 4:ae5178938864 21 The API also provides an interface to define the application endpoint information. This information will be delivered to mbed Device Server during the registration operation.
Christopher Haster 1:79b6cc67d8b4 22
Yogesh Pande 4:ae5178938864 23 First, you need to create an interface for mbed Client:
Christopher Haster 1:79b6cc67d8b4 24
Christopher Haster 1:79b6cc67d8b4 25 ```
Christopher Haster 1:79b6cc67d8b4 26 #include "mbed-client/m2minterfacefactory.h"
Christopher Haster 1:79b6cc67d8b4 27 #include "mbed-client/m2minterface.h"
Christopher Haster 1:79b6cc67d8b4 28
Christopher Haster 1:79b6cc67d8b4 29 M2MInterface* interface = M2MInterfaceFactory::create_interface(*this,
Christopher Haster 1:79b6cc67d8b4 30 "mbed-endpoint",
Christopher Haster 1:79b6cc67d8b4 31 "test",
Christopher Haster 1:79b6cc67d8b4 32 3600,
Christopher Haster 1:79b6cc67d8b4 33 5684,
Christopher Haster 1:79b6cc67d8b4 34 "",
Christopher Haster 1:79b6cc67d8b4 35 M2MInterface::UDP,
Christopher Haster 1:79b6cc67d8b4 36 M2MInterface::LwIP_IPv4,
Christopher Haster 1:79b6cc67d8b4 37 "");
Christopher Haster 1:79b6cc67d8b4 38 ```
Christopher Haster 1:79b6cc67d8b4 39
Yogesh Pande 4:ae5178938864 40 ### Maximum UDP message size
Christopher Haster 1:79b6cc67d8b4 41
Yogesh Pande 4:ae5178938864 42 The maximum single UDP message size that mbed Client can receive is 1152 bytes. The actual payload size is 1137 bytes, the header information using the remaining 15 bytes.
Christopher Haster 1:79b6cc67d8b4 43
Yogesh Pande 4:ae5178938864 44 For transferring larger amounts of data, the Blockwise feature must be deployed. When using this feature, mbed Client can handle messages up to 64KB. This feature is disabled by default.
Christopher Haster 1:79b6cc67d8b4 45
Yogesh Pande 4:ae5178938864 46 To enable the Blockwise feature, you need to create a `config.json` file in the application level.
Christopher Haster 1:79b6cc67d8b4 47
Yogesh Pande 4:ae5178938864 48 An example:
Christopher Haster 1:79b6cc67d8b4 49 ```
Yogesh Pande 4:ae5178938864 50 {
Yogesh Pande 4:ae5178938864 51 "coap_max_blockwise_payload_size": 1024
Yogesh Pande 4:ae5178938864 52 }
Christopher Haster 1:79b6cc67d8b4 53 ```
Christopher Haster 1:79b6cc67d8b4 54
Yogesh Pande 4:ae5178938864 55 Acceptable values for the `coap_max_blockwise_payload_size` flag are:
Yogesh Pande 4:ae5178938864 56 0, 16, 32, 64, 128, 256, 512 and 1024. Value 0 means that the feature is not used.
Christopher Haster 1:79b6cc67d8b4 57
Christopher Haster 1:79b6cc67d8b4 58 ## How to use the API
Yogesh Pande 4:ae5178938864 59 More information on how to use the API effectively to create and configure Objects, Object Instances and Resources, can be found [here](howto.md).
Christopher Haster 1:79b6cc67d8b4 60
Christopher Haster 1:79b6cc67d8b4 61 ## API documentation
Christopher Haster 1:79b6cc67d8b4 62
Yogesh Pande 4:ae5178938864 63 The documentation for this API is [available here](https://docs.mbed.com/docs/mbed-client-guide/en/latest/api/annotated.html).
Christopher Haster 1:79b6cc67d8b4 64
Christopher Haster 1:79b6cc67d8b4 65 ## Example application
Christopher Haster 1:79b6cc67d8b4 66
Yogesh Pande 4:ae5178938864 67 We have an example application for
Christopher Haster 1:79b6cc67d8b4 68
Yogesh Pande 4:ae5178938864 69 1. [mbed OS](https://github.com/ARMmbed/mbed-client-examples).
Christopher Haster 1:79b6cc67d8b4 70
Yogesh Pande 4:ae5178938864 71 2. [Ubuntu](https://github.com/ARMmbed/mbed-client-linux-example).
Yogesh Pande 4:ae5178938864 72