mirror of
https://github.com/espressif/openthread.git
synced 2026-07-31 16:17:47 +00:00
@@ -122,7 +122,7 @@ Done
|
||||
|
||||
### mgmtget
|
||||
|
||||
Usage: `commissioner mgmtget [locator] [sessionid] [steeringdata] [joinerudpport] [binary <TLV Types>]`
|
||||
Usage: `commissioner mgmtget [locator] [sessionid] [steeringdata] [joinerudpport] [-x <TLV Types>]`
|
||||
|
||||
Send a `MGMT_GET` message to the Leader.
|
||||
|
||||
@@ -133,7 +133,7 @@ Done
|
||||
|
||||
### mgmtset
|
||||
|
||||
Usage: `commissioner mgmtset [locator <locator>] [sessionid <sessionid>] [steeringdata <steeringdata>] [joinerudpport <joinerudpport>] [binary <TLVs>]`
|
||||
Usage: `commissioner mgmtset [locator <locator>] [sessionid <sessionid>] [steeringdata <steeringdata>] [joinerudpport <joinerudpport>] [-x <TLVs>]`
|
||||
|
||||
Send a `MGMT_SET` message to the Leader.
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ Done
|
||||
|
||||
### active
|
||||
|
||||
Usage: `dataset active [binary]`
|
||||
Usage: `dataset active [-x]`
|
||||
|
||||
Print Active Operational Dataset in human-readable form.
|
||||
|
||||
@@ -187,7 +187,7 @@ Done
|
||||
Print Active Operational Dataset as hex-encoded TLVs.
|
||||
|
||||
```bash
|
||||
> dataset active binary
|
||||
> dataset active -x
|
||||
0e080000000000010000000300001035060004001fffe002084eb74ab03c56e6d00708fdc7fe165c83a67805108e2104f183e698da87e96efc1e45aa51030f4f70656e5468726561642d383631310102861104108d6273023d82c841eff0e68db86f35740c030000ff
|
||||
Done
|
||||
```
|
||||
@@ -361,23 +361,23 @@ Done
|
||||
|
||||
### mgmtgetcommand
|
||||
|
||||
Usage: `dataset mgmtgetcommand <active|pending> [address <destination>] [TLV list] [binary]`
|
||||
Usage: `dataset mgmtgetcommand <active|pending> [address <destination>] [TLV list] [-x]`
|
||||
|
||||
Send MGMT_ACTIVE_GET or MGMT_PENDING_GET.
|
||||
|
||||
```bash
|
||||
> dataset mgmtgetcommand active address fdde:ad00:beef:0:558:f56b:d688:799 activetimestamp binary 0c030001ff
|
||||
> dataset mgmtgetcommand active address fdde:ad00:beef:0:558:f56b:d688:799 activetimestamp -x 0c030001ff
|
||||
Done
|
||||
```
|
||||
|
||||
### mgmtsetcommand
|
||||
|
||||
Usage: `dataset mgmtsetcommand <active|pending> [TLV Type list] [binary]`
|
||||
Usage: `dataset mgmtsetcommand <active|pending> [TLV Type list] [-x]`
|
||||
|
||||
Send MGMT_ACTIVE_SET or MGMT_PENDING_SET.
|
||||
|
||||
```bash
|
||||
> dataset mgmtsetcommand active activetimestamp 123 binary 0c030001ff
|
||||
> dataset mgmtsetcommand active activetimestamp 123 -x 0c030001ff
|
||||
Done
|
||||
```
|
||||
|
||||
@@ -423,7 +423,7 @@ Done
|
||||
|
||||
### pending
|
||||
|
||||
Usage: `dataset pending [binary]`
|
||||
Usage: `dataset pending [-x]`
|
||||
|
||||
Print Pending Operational Dataset in human-readable form.
|
||||
|
||||
@@ -447,7 +447,7 @@ Done
|
||||
Print Pending Operational Dataset as hex-encoded TLVs.
|
||||
|
||||
```bash
|
||||
> dataset pending binary
|
||||
> dataset pending -x
|
||||
0e080000000000010000000300001035060004001fffe002084eb74ab03c56e6d00708fdc7fe165c83a67805108e2104f183e698da87e96efc1e45aa51030f4f70656e5468726561642d383631310102861104108d6273023d82c841eff0e68db86f35740c030000ff
|
||||
Done
|
||||
```
|
||||
|
||||
@@ -206,7 +206,7 @@ otError Commissioner::ProcessMgmtGet(uint8_t aArgsLength, char *aArgs[])
|
||||
{
|
||||
tlvs[length++] = OT_MESHCOP_TLV_JOINER_UDP_PORT;
|
||||
}
|
||||
else if (strcmp(aArgs[index], "binary") == 0)
|
||||
else if (strcmp(aArgs[index], "-x") == 0)
|
||||
{
|
||||
VerifyOrExit(++index < aArgsLength, error = OT_ERROR_INVALID_ARGS);
|
||||
value = static_cast<long>(strlen(aArgs[index]) + 1) / 2;
|
||||
@@ -277,7 +277,7 @@ otError Commissioner::ProcessMgmtSet(uint8_t aArgsLength, char *aArgs[])
|
||||
SuccessOrExit(error = Interpreter::Interpreter::ParseLong(aArgs[index], value));
|
||||
dataset.mJoinerUdpPort = static_cast<uint16_t>(value);
|
||||
}
|
||||
else if (strcmp(aArgs[index], "binary") == 0)
|
||||
else if (strcmp(aArgs[index], "-x") == 0)
|
||||
{
|
||||
VerifyOrExit(++index < aArgsLength, error = OT_ERROR_INVALID_ARGS);
|
||||
length = static_cast<int>((strlen(aArgs[index]) + 1) / 2);
|
||||
|
||||
@@ -256,7 +256,7 @@ otError Dataset::ProcessActive(uint8_t aArgsLength, char *aArgs[])
|
||||
SuccessOrExit(error = otDatasetGetActive(mInterpreter.mInstance, &dataset));
|
||||
error = Print(dataset);
|
||||
}
|
||||
else if ((aArgsLength == 1) && (strcmp(aArgs[0], "binary") == 0))
|
||||
else if ((aArgsLength == 1) && (strcmp(aArgs[0], "-x") == 0))
|
||||
{
|
||||
otOperationalDatasetTlvs dataset;
|
||||
|
||||
@@ -286,7 +286,7 @@ otError Dataset::ProcessPending(uint8_t aArgsLength, char *aArgs[])
|
||||
SuccessOrExit(error = otDatasetGetPending(mInterpreter.mInstance, &dataset));
|
||||
error = Print(dataset);
|
||||
}
|
||||
else if ((aArgsLength == 1) && (strcmp(aArgs[0], "binary") == 0))
|
||||
else if ((aArgsLength == 1) && (strcmp(aArgs[0], "-x") == 0))
|
||||
{
|
||||
otOperationalDatasetTlvs dataset;
|
||||
|
||||
@@ -683,7 +683,7 @@ otError Dataset::ProcessMgmtSetCommand(uint8_t aArgsLength, char *aArgs[])
|
||||
SuccessOrExit(error = Interpreter::ParseLong(aArgs[index], value));
|
||||
dataset.mChannelMask = static_cast<uint32_t>(value);
|
||||
}
|
||||
else if (strcmp(aArgs[index], "binary") == 0)
|
||||
else if (strcmp(aArgs[index], "-x") == 0)
|
||||
{
|
||||
VerifyOrExit(++index < aArgsLength, error = OT_ERROR_INVALID_ARGS);
|
||||
length = static_cast<int>((strlen(aArgs[index]) + 1) / 2);
|
||||
@@ -770,7 +770,7 @@ otError Dataset::ProcessMgmtGetCommand(uint8_t aArgsLength, char *aArgs[])
|
||||
{
|
||||
datasetComponents.mIsChannelPresent = true;
|
||||
}
|
||||
else if (strcmp(aArgs[index], "binary") == 0)
|
||||
else if (strcmp(aArgs[index], "-x") == 0)
|
||||
{
|
||||
VerifyOrExit(++index < aArgsLength, error = OT_ERROR_INVALID_ARGS);
|
||||
value = static_cast<long>(strlen(aArgs[index]) + 1) / 2;
|
||||
|
||||
@@ -193,25 +193,25 @@ set spawn_id $spawn_2
|
||||
send "dataset mgmtgetcommand active \
|
||||
activetimestamp pendingtimestamp masterkey networkname extpanid \
|
||||
localprefix delaytimer panid channel \
|
||||
binary 000102030405060708090a0b0e0f0c333435 \
|
||||
-x 000102030405060708090a0b0e0f0c333435 \
|
||||
address $addr\n"
|
||||
expect "Done"
|
||||
send "dataset mgmtgetcommand pending \
|
||||
activetimestamp pendingtimestamp masterkey networkname extpanid \
|
||||
localprefix delaytimer panid channel \
|
||||
binary 000102030405060708090a0b0e0f0c333435 \
|
||||
-x 000102030405060708090a0b0e0f0c333435 \
|
||||
address $addr\n"
|
||||
expect "Done"
|
||||
|
||||
set spawn_id $spawn_1
|
||||
send "dataset active binary\n"
|
||||
expect "dataset active binary"
|
||||
send "dataset active -x\n"
|
||||
expect "dataset active -x"
|
||||
expect -re {([0-9a-f]+)}
|
||||
set binary $expect_out(1,string)
|
||||
expect "Done"
|
||||
send "dataset set pending $binary\n"
|
||||
expect "Done"
|
||||
send "dataset pending binary\n"
|
||||
send "dataset pending -x\n"
|
||||
expect $binary
|
||||
expect "Done"
|
||||
send "dataset set active $binary\n"
|
||||
|
||||
@@ -1243,7 +1243,7 @@ class Node:
|
||||
cmd += 'networkname %s ' % self._escape_escapable(network_name)
|
||||
|
||||
if binary is not None:
|
||||
cmd += 'binary %s ' % binary
|
||||
cmd += '-x %s ' % binary
|
||||
|
||||
self.send_command(cmd)
|
||||
self._expect('Done')
|
||||
@@ -1524,7 +1524,7 @@ class Node:
|
||||
self._expect('coaps response', timeout=timeout)
|
||||
|
||||
def commissioner_mgmtset(self, tlvs_binary):
|
||||
cmd = 'commissioner mgmtset binary %s' % tlvs_binary
|
||||
cmd = 'commissioner mgmtset -x %s' % tlvs_binary
|
||||
self.send_command(cmd)
|
||||
self._expect('Done')
|
||||
|
||||
|
||||
@@ -2373,7 +2373,7 @@ class OpenThreadTHCI(object):
|
||||
|
||||
if len(TLVs) != 0:
|
||||
tlvs = ''.join('%02x' % tlv for tlv in TLVs)
|
||||
cmd += ' binary '
|
||||
cmd += ' -x '
|
||||
cmd += tlvs
|
||||
|
||||
print(cmd)
|
||||
@@ -2453,7 +2453,7 @@ class OpenThreadTHCI(object):
|
||||
if (sPSKc is not None or listSecurityPolicy is not None or xCommissioningSessionId is not None or
|
||||
xTmfPort is not None or xSteeringData is not None or xBorderRouterLocator is not None or
|
||||
BogusTLV is not None):
|
||||
cmd += ' binary '
|
||||
cmd += ' -x '
|
||||
|
||||
if sPSKc is not None:
|
||||
cmd += '0410'
|
||||
@@ -2558,7 +2558,7 @@ class OpenThreadTHCI(object):
|
||||
|
||||
if len(TLVs) != 0:
|
||||
tlvs = ''.join('%02x' % tlv for tlv in TLVs)
|
||||
cmd += ' binary '
|
||||
cmd += ' -x '
|
||||
cmd += tlvs
|
||||
|
||||
print(cmd)
|
||||
@@ -2628,7 +2628,7 @@ class OpenThreadTHCI(object):
|
||||
cmd += self.__escapeEscapable(str(sNetworkName))
|
||||
|
||||
if xCommissionerSessionId is not None:
|
||||
cmd += ' binary '
|
||||
cmd += ' -x '
|
||||
cmd += '0b02'
|
||||
sessionid = str(hex(xCommissionerSessionId))[2:]
|
||||
|
||||
@@ -2658,7 +2658,7 @@ class OpenThreadTHCI(object):
|
||||
|
||||
if len(TLVs) != 0:
|
||||
tlvs = ''.join('%02x' % tlv for tlv in TLVs)
|
||||
cmd += ' binary '
|
||||
cmd += ' -x '
|
||||
cmd += tlvs
|
||||
|
||||
print(cmd)
|
||||
@@ -2709,7 +2709,7 @@ class OpenThreadTHCI(object):
|
||||
cmd += str(hex(xBorderRouterLocator))
|
||||
|
||||
if xChannelTlv is not None:
|
||||
cmd += ' binary '
|
||||
cmd += ' -x '
|
||||
cmd += '000300' + '%04x' % xChannelTlv
|
||||
|
||||
print(cmd)
|
||||
|
||||
Reference in New Issue
Block a user