ot-cli : CoAP with multiple observer and resource per device

15 views
Skip to first unread message

Richard Retanubun

unread,
Jan 21, 2022, 4:27:29 PM1/21/22
to openthread-users
Hello,

I am trying to prototype an application using ot-cli and its coap commands.

If I am understanding is correct, each device:
  • can only publish one resource with coap resource command
  • can only observe (i.e. subscribe) to one resource from another node with the coap observe command

Is my understanding correct? or am I missing something in command usage?

Is there plans to add multiple observe point? For a sensor application it is useful for the central device to observe many sleepy-sensors and just get notified when the sensor uses coap set on its published resource.

Thank you for everyone's time
--
Richard R

Jonathan Hui

unread,
Jan 21, 2022, 4:47:37 PM1/21/22
to Richard Retanubun, openthread-users
You are correct that the existing OpenThread CoAP CLI only supports publishing a single resource and observing a single resource. However, OpenThread's CoAP API should support publishing multiple resources and observing multiple resources from multiple endpoints. The OpenThread CoAP CLI serves as an example of how to use the OpenThread APIs. I'm not aware of any existing plans to enhance this. However, contributions are always welcome!

--
Jonathan Hui



--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/e00f4283-9e86-4bd8-ad8e-5b46713a5833n%40googlegroups.com.

Richard Retanubun

unread,
Jan 21, 2022, 5:41:08 PM1/21/22
to Jonathan Hui, openthread-users
Got it. Thanks for the clarification, Jonathan. 
Glad to know that the CoAP API is not limited to single resources.
Makes sense for ot-cli to keep things simple.
Reply all
Reply to author
Forward
0 new messages