mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[meshcop] use IEEE EUI-64 rather than Joiner ID on user input (#2311)
This commit is contained in:
+17
-17
@@ -136,7 +136,6 @@ const struct Command Interpreter::sCommands[] =
|
||||
{ "extaddr", &Interpreter::ProcessExtAddress },
|
||||
{ "extpanid", &Interpreter::ProcessExtPanId },
|
||||
{ "factoryreset", &Interpreter::ProcessFactoryReset },
|
||||
{ "hashmacaddr", &Interpreter::ProcessHashMacAddress },
|
||||
{ "ifconfig", &Interpreter::ProcessIfconfig },
|
||||
#ifdef OTDLL
|
||||
{ "instance", &Interpreter::ProcessInstance },
|
||||
@@ -148,6 +147,7 @@ const struct Command Interpreter::sCommands[] =
|
||||
#endif
|
||||
#if OPENTHREAD_ENABLE_JOINER
|
||||
{ "joiner", &Interpreter::ProcessJoiner },
|
||||
{ "joinerid", &Interpreter::ProcessJoinerId },
|
||||
#endif
|
||||
#if OPENTHREAD_FTD
|
||||
{ "joinerport", &Interpreter::ProcessJoinerPort },
|
||||
@@ -984,22 +984,6 @@ void Interpreter::ProcessFactoryReset(int argc, char *argv[])
|
||||
OT_UNUSED_VARIABLE(argv);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessHashMacAddress(int argc, char *argv[])
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
otExtAddress hashMacAddress;
|
||||
|
||||
VerifyOrExit(argc == 0, error = OT_ERROR_PARSE);
|
||||
|
||||
otLinkGetJoinerId(mInstance, &hashMacAddress);
|
||||
OutputBytes(hashMacAddress.m8, OT_EXT_ADDRESS_SIZE);
|
||||
mServer->OutputFormat("\r\n");
|
||||
|
||||
exit:
|
||||
OT_UNUSED_VARIABLE(argv);
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessIfconfig(int argc, char *argv[])
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
@@ -2984,6 +2968,22 @@ exit:
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessJoinerId(int argc, char *argv[])
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
otExtAddress joinerId;
|
||||
|
||||
VerifyOrExit(argc == 0, error = OT_ERROR_PARSE);
|
||||
|
||||
otJoinerGetId(mInstance, &joinerId);
|
||||
OutputBytes(joinerId.m8, sizeof(joinerId));
|
||||
mServer->OutputFormat("\r\n");
|
||||
|
||||
exit:
|
||||
OT_UNUSED_VARIABLE(argv);
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_ENABLE_JOINER
|
||||
|
||||
void OTCALL Interpreter::s_HandleJoinerCallback(otError aError, void *aContext)
|
||||
|
||||
Reference in New Issue
Block a user