0

I am trying to use otServerGetNextLeaderService but it always returns OT_ERROR_NOT_FOUND.

I added a service on one node using otServerAddService and registered the local network data with the Leader using otServerRegister. Then I tried to call otServerGetNextLeaderService but it returned OT_ERROR_NOT_FOUND.

How can I get OT_ERROR_NONE when calling otServerGetNextLeaderService ?

Tester
  • 5
  • 2

1 Answers1

0

It's not year clear what the issue may be.

Have you tried using the OpenThread CLI to test? The following CLI commands may be helpful for testing:

jhui
  • 694
  • 4
  • 3
  • Yes I have used these commands but unfortunately there is no CLI command for `otServerGetNextLeaderService`. I am not sure to understand the purpose of this function. Is this supposed to be called on child node or leader node ? I thought it was meant to be called on child node to ask for the leader services. – Tester Nov 17 '21 at 16:07
  • `otServerGetNextService` is only for iterating on services published by the device itself. Use `otNetDataGetNextService` for iterating on services published by the Leader. – jhui Nov 17 '21 at 21:14
  • I need to use each function once for validation purpose. I have already validated the two functions you mentioned. I need to validate `otServerGetNextLeaderService`. Could you confirm that this function is meant to be used on leader node ? Thank you – Tester Nov 18 '21 at 13:11
  • The latest version of OpenThread does not have `otServerGetNextLeaderService`. – jhui Nov 19 '21 at 02:52