openthread / ot-commissioner

OpenThread Commissioner, a Thread commissioner for joining new Thread devices and managing Thread networks.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
49 stars 36 forks source link

[api] add a new api for getting the mesh local prefix #283

Closed ZhangLe2016 closed 2 months ago

ZhangLe2016 commented 2 months ago

The primary purpose of providing this API is to enable external apps to generate the mesh local address(pefix + rloc) of a Thread device, which serves as the destination address for external commissioner to send UDP proxy commands.

Tested with CLI command:

config set pskc 445f2b5ca6f2a93a55ce570a70efeecb [done] start 192.168.9.2 49154 [done] meshlocalprefix fd2b471153fcbe46 [done]

wgtdkp commented 2 months ago

The mesh-local prefix can already be retrieved with the GetActiveDataset() API, right?

ZhangLe2016 commented 2 months ago

The mesh-local prefix can already be retrieved with the GetActiveDataset() API, right?

do you mean there is no need to provide a dedicated API for the mesh-local prefix?

ZhangLe2016 commented 2 months ago

Discussed with @wgtdkp, the mesh local prefix could be obtained by GetActiveDataset() from the app layer, so lets close this PR.