diff --git a/include/openthread.h b/include/openthread.h index 886a19870..5e7941806 100644 --- a/include/openthread.h +++ b/include/openthread.h @@ -502,6 +502,15 @@ const uint8_t *otGetExtendedPanId(otInstance *aInstance); */ void otSetExtendedPanId(otInstance *aInstance, const uint8_t *aExtendedPanId); +/** + * Get the factory-assigned IEEE EUI-64. + * + * @param[in] aInstance A pointer to the OpenThread instance. + * @param[out] aEui64 A pointer to where the factory-assigned IEEE EUI-64 is placed. + * + */ +void otGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui64); + /** * This function returns a pointer to the Leader's RLOC. * diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index a82ad491a..be3673741 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -52,7 +52,6 @@ #include #include #include -#include #include #include @@ -556,7 +555,7 @@ void Interpreter::ProcessEui64(int argc, char *argv[]) VerifyOrExit(argc == 0, error = kThreadError_Parse); - otPlatRadioGetIeeeEui64(mInstance, extAddress.m8); + otGetFactoryAssignedIeeeEui64(mInstance, &extAddress); OutputBytes(extAddress.m8, OT_EXT_ADDRESS_SIZE); sServer->OutputFormat("\r\n"); diff --git a/src/core/openthread.cpp b/src/core/openthread.cpp index 1f762a769..7c1441423 100644 --- a/src/core/openthread.cpp +++ b/src/core/openthread.cpp @@ -175,6 +175,11 @@ void otSetExtendedPanId(otInstance *, const uint8_t *aExtendedPanId) sThreadNetif->GetMle().SetMeshLocalPrefix(mlPrefix); } +void otGetFactoryAssignedIeeeEui64(otInstance *aInstance, otExtAddress *aEui64) +{ + otPlatRadioGetIeeeEui64(aInstance, aEui64->m8); +} + ThreadError otGetLeaderRloc(otInstance *, otIp6Address *aAddress) { ThreadError error;