0

I would like to find a simple use case to demonstrate how to use the OpenThread command dataset mgmtgetcommand active. This command is used to "retrieve Active Operational Dataset values from the Leader" according to Thread specification. So, I need to find a use case with a node which has lost the active dataset and sends a MGMT_ACTIVE_GET.req message to the leader to retrieve it.

How can I do that using OpenThread CLI ?

I can't find how to modify the network name for example on Node 1 dataset without Node 2 to automatically update its active dataset.

Tester
  • 5
  • 2

1 Answers1

0

You can use the dataset commit active command on a given node to write new values to the Active Operational Dataset.

jhui
  • 694
  • 4
  • 3
  • Thank you for your answer. Here is the commands I use: On both node: - `factoryreset` - `panid 0x1234` - `ifconfig up` - `thread start` On leader node : - `dataset networkname newName` - `dataset activetimestamp 1` - `dataset commit active` If I wait a bit and I send the command `dataset active` on both node, I can see they both took the new network name. My question is: How can I test `dataset mgmtgetcommand active` if the nodes already share automatically their dataset ? – Tester Oct 22 '21 at 09:04
  • Your method creates an incomplete active operational dataset and, thus, sets the active timestamp to 0. When you set a new active operational dataset with active timestamp 1, both nodes are expected to take the change. I would suggest following the quick start guide here: https://github.com/openthread/openthread/blob/main/src/cli/README_DATASET.md#quick-start – jhui Oct 25 '21 at 21:14
  • Ok, so how could I test `dataset mgmtgetcommand active` ? I have already tried the quick start guide you mentioned but I don't understand how it could help me. Do you have a CLI use case with `dataset mgmtgetcommand active` ? Thank you – Tester Oct 26 '21 at 13:28
  • You can modify an existing active operational dataset without changing the active timestamp value. As long as the active timestamp is the same between two nodes, they will not sync between each other. – jhui Oct 26 '21 at 17:51
  • First I created the same dataset on both node except network name which is different. Then I launched command `dataset commit active`. Now I have two different datasets with two different network names but same timestamp. I tried to use `dataset mgmtgetcommand active networkname`. Leader responds correctly with its network name according to Wireshark but the node does not udpate its network name. I can't find where the reception of MGMT_ACTIVE_GET.rsp is handled. – Tester Oct 28 '21 at 15:12
  • Current implementation of `dataset mgmtgetcommand active` only sends the request packet but does not display the response message. – jhui Nov 10 '21 at 05:22