Setting Measure Points and Invoking Services (Non-DTLS)


Applications can use EnOS open APIs to set measurement points or invoke services for the devices connected via CoAP. The process is shown below.

../../../_images/coap_downstream_flow_non_dtls.png


For more information about the data formats of the request and response, and parameter description, see Invoke Device Services (Pass-through) and Invoke Device Services (Non-Passthrough).


When an application calls an API to set measurement points or invoke services from a device, EnOS caches this request. When a device sends a request to EnOS, EnOS will include the following options in the response to the device’s request.

  • Option (2100): The request topic for issuing commands in non-passthrough mode.
  • Option (2102): The payload of the command.


The format of the response sent to the device by EnOS is as follows:

Code: CoAP return code
Payload: {RequestPayload}
Customized Option 2100:/topic/sys/${ProductKey}/${DeviceKey}/thing/model/down_raw
Customized Option 2102: {Down-Raw Payload}
Parameter Description
Parameter Description
ProductKey The product key used for authentication.
DeviceKey The device key used for authentication.
Payload The payload requested by the device.


After the device completes executing the command, it will send the execution result to EnOS based on the topic and parameter specifications defined by EnOS.

If more commands are to be issued, EnOS will continue to include the command payload in Option(2102).