Server functionality. Explanation, examples.

19 views
Skip to first unread message

Paweł Pyszko

unread,
May 24, 2021, 7:29:34 AM5/24/21
to openthread-users
Hello everybody,
I am trying to find good starting point from practical point of view to Server feature of Thread functionality.

My understanding of this matter is limited to use case for it which in general mesh-local shared data context and I am not even sure it is the best way to achive this.

I haven't found any examples to prove it. There is CLI example to register server but there is no client site to read registered data. It is one site of story only so it is hard to get what is the purpose of this feature.

Following sources I found that command "server" (without any additional arguments) calls otServerGetNextService, but it only shows services on device that created this service. Not on other nodes connected to this network.

To test this feature I used simulation on PC host.

Can someone explain how to use Services with example CLI or API based? Can it be used to share data context on mesh-local layer?

My goal is to evenly distribute some kind of resource on mesh network consisting of multiple nodes. It should be resistant to network topology changes like leader change. I assume that Leader will be responsible managing access to this resource among nodes and a new Leader must carry on the job of it's predecessor.

Best regards,
Paweł P.

Jonathan Hui

unread,
May 24, 2021, 11:55:08 AM5/24/21
to Paweł Pyszko, openthread-users
To read out services published in network data by the Leader, take a look at otNetDataGetNextService(). You can find an example of its usage in src/cli/cli_network_data.cpp that is invoked when using the netdata show CLI command.

--
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/9192074b-7c1b-469f-95d9-a7d671e189f8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages