mirror of
https://github.com/espressif/openthread.git
synced 2026-07-17 17:44:08 +00:00
Add API to set the IEEE 802.15.4 Extended Address. (#289)
This commit is contained in:
+18
-5
@@ -386,11 +386,24 @@ exit:
|
||||
|
||||
void Interpreter::ProcessExtAddress(int argc, char *argv[])
|
||||
{
|
||||
OutputBytes(otGetExtendedAddress(), OT_EXT_ADDRESS_SIZE);
|
||||
sServer->OutputFormat("\r\n");
|
||||
AppendResult(kThreadError_None);
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
ThreadError error = kThreadError_None;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
OutputBytes(otGetExtendedAddress(), OT_EXT_ADDRESS_SIZE);
|
||||
sServer->OutputFormat("\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
otExtAddress extAddress;
|
||||
|
||||
VerifyOrExit(Hex2Bin(argv[0], extAddress.m8, sizeof(otExtAddress)) >= 0, error = kThreadError_Parse);
|
||||
|
||||
otSetExtendedAddress(&extAddress);
|
||||
}
|
||||
|
||||
exit:
|
||||
AppendResult(error);
|
||||
}
|
||||
|
||||
void Interpreter::ProcessExtPanId(int argc, char *argv[])
|
||||
|
||||
Reference in New Issue
Block a user