Using the OIC FrameworkΒΆ

Apache Mynewt includes support for the OIC interoperability standard through the oicmgr framework. Mynewt defines and exposes oicmgr as an OIC Server resource with the following identity and properties:

URI

/omgr

Resource Type(rt)

x.mynewt.nmgr

Interface(if)

oic.if_rw (default), oic.if.baseline

Discoverable

Yes

The newtmgr application tool uses CoAP (Constrained Application Protocol) requests to send commands to oicmgr.
It sends a CoAP request for /omgr as follows:
  • Specifies the newtmgr command to execute in the URI query string.

  • Uses a GET method for newtmgr commands that retreive information from your application, for example, the taskstat and mpstat commands.

  • Uses a PUT method for newtmgr commands that send data to or modify the state of your application, for example, the echo or datetime commands.

  • Sends the CBOR-encoded command request data in the CoAP message payload.

The oicmgr framework supports transport over BLE, serial, and IP connections to the device.