docwithnav |
|
CoAP Device API Reference |
Supported CoAP API Reference for IoT Devices |
/docs/reference/coap-api |
0 |
1 |
2 |
3 |
4 |
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-1-ce.png |
Use RPC debug terminal widget in your ThingsBoard instance |
|
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-2-ce.png |
Subscribe to RPC commands from the server. To do this, in the first terminal window send GET request with observe flag |
|
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-3-ce.png |
Send an RPC request "connect" to the device using RPC debug terminal widget |
|
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-4-ce.png |
In the second terminal window simulate send a response from the device to the server |
|
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-5-ce.png |
You should receive a response from the device: {"result":"ok"} |
|
|
0 |
1 |
2 |
3 |
4 |
image |
title |
/images/reference/device-connectivity-apis/client-side-rpc-1-ce.png |
Add two nodes to the Rule Chain: "script" and "rpc call reply" |
|
image |
title |
/images/reference/device-connectivity-apis/client-side-rpc-2-ce.png |
In the script node enter the function: return {msg: {time:String(new Date())}, metadata: metadata, msgType: msgType}; |
|
image |
/images/reference/device-connectivity-apis/client-side-rpc-3-ce.png |
|
image |
title |
/images/reference/device-connectivity-apis/client-side-rpc-coap-4-ce.png |
Send request to the server |
|
image |
title |
/images/reference/device-connectivity-apis/client-side-rpc-coap-5-ce.png |
You should receive a response from the server |
|
|
0 |
1 |
2 |
3 |
4 |
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-1-ce.png |
Use RPC debug terminal widget in your ThingsBoard instance |
|
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-certificate-2-ce.png |
Subscribe to RPC commands from the server. To do this, in the first terminal window send GET request with observe flag |
|
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-3-ce.png |
Send an RPC request "connect" to the device using RPC debug terminal widget |
|
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-certificate-4-ce.png |
In the second terminal window simulate send a response from the device to the server |
|
image |
title |
/images/reference/device-connectivity-apis/server-side-rpc-coap-5-ce.png |
You should receive a response from the device: {"result":"ok"} |
|
|
0 |
1 |
2 |
3 |
4 |
image |
title |
/images/reference/device-connectivity-apis/client-side-rpc-1-ce.png |
Add two nodes to the Rule Chain: "script" and "rpc call reply" |
|
image |
title |
/images/reference/device-connectivity-apis/client-side-rpc-2-ce.png |
In the script node enter the function: return {msg: {time:String(new Date())}, metadata: metadata, msgType: msgType}; |
|
image |
/images/reference/device-connectivity-apis/client-side-rpc-3-ce.png |
|
image |
title |
/images/reference/device-connectivity-apis/client-side-rpc-coap-certificate-4-ce.png |
Send request to the server |
|
image |
title |
/images/reference/device-connectivity-apis/client-side-rpc-coap-certificate-5-ce.png |
You should receive a response from the server |
|
|