Skip to content

Add API to read Thread EUI-64 #7158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2018
Merged

Add API to read Thread EUI-64 #7158

merged 1 commit into from
Jun 11, 2018

Conversation

kjbracey
Copy link
Contributor

@kjbracey kjbracey commented Jun 7, 2018

Description

Previously get_mac_address on a ThreadInterface returned the EUI-64
reported by the radio driver. This was required for commissioning, but
was inconsistent with other interfaces, and the API concept.

5.9.0 inadvertently changed this so that get_mac_address returned the
actual MAC address used by the radio, which is a hash result of the
EUI-64 for Thread.

The original "return the EUI-64" form was somewhat faulty, as
get_mac_address would not return the EUI-64 set by set_device_eui64() or
another mechanism before connect() was called.

Rather than revert to old behaviour, add a new API to get the device
EUI-64 to ThreadInterface, alongside the existing set API.

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

New API, but required to get commissioning working properly in 5.9 due to an inadvertent (but desirable) behaviour change.

Previously get_mac_address on a ThreadInterface returned the EUI-64
reported by the radio driver. This was required for commissioning, but
was inconsistent with other interfaces, and the API concept.

5.9.0 inadvertently changed this so that get_mac_address returned the
actual MAC address used by the radio, which is a hash result of the
EUI-64 for Thread.

The original "return the EUI-64" form was somewhat faulty, as
get_mac_address would not return the EUI-64 set by set_device_eui64() or
another mechanism before connect() was called.

Rather than revert to old behaviour, add a new API to get the device
EUI-64 to ThreadInterface, alongside the existing set API.
Copy link
Contributor

@JuhPuur JuhPuur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested to work with mesh-minimal.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 8, 2018

/morph build

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 8, 2018

Build will be restarted once rc3 completes (failed and have to be now restarted)

@mbed-ci
Copy link

mbed-ci commented Jun 8, 2018

Build : ABORTED

Build number : 2285
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7158/

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 9, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jun 9, 2018

Build : SUCCESS

Build number : 2301
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7158/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jun 9, 2018

@mbed-ci
Copy link

mbed-ci commented Jun 10, 2018

@cmonr
Copy link
Contributor

cmonr commented Jun 11, 2018

Pinging @ChiefBureaucraticOfficer. New API change = 5.10.0-rc1 release, but this is apparently needed for 5.9 release??

@cmonr
Copy link
Contributor

cmonr commented Jun 11, 2018

Marking this as 5.10.0-rc1 since this is an API change.

@cmonr cmonr merged commit 093a606 into ARMmbed:master Jun 11, 2018
@kjbracey kjbracey deleted the thread-eui64 branch June 12, 2018 08:21
@JuhPuur
Copy link
Contributor

JuhPuur commented Jun 15, 2018

This is an API change, but it's a fix that restores functionality that was inadvertently removed in 5.9 and which is very much needed.
@cmonr I don't think we can wait on a API fix until 5.10.

@cmonr
Copy link
Contributor

cmonr commented Jun 15, 2018

Interesting.

So if I understand correctly,

  1. The original behavior was functionally correct, but did not comform to the API model.
  2. The 5.9 update broke this so that the get_mac_address returns the mac address instead of the
    EUI-64.
  3. This change corrects the function call, but now breaks comissioning.
    Q. How/why was this not caught in 5.9 OOB?
  4. Instead of reverting the function to return the EUI-64 (which I agree with), this PR adds a new function call to read the EUI-64, maintaining the correct behavior with get_mac_address.

Assuming the above is all correct, I agree that this should go in ASAP.

@ARMmbed/mbed-os-maintainers @ChiefBureaucraticOfficer Thoughts?

@ghost
Copy link

ghost commented Jun 15, 2018

I am ok with the changes as proposed. @bulislaw, do you have any thoughts on this one?

@adbridge
Copy link
Contributor

In this particular instance I think we can be a bit flexible and allow this to go into a patch. However what is worrying me is we seem to be seeing an increasing number of items like this cropping up which should not be happening. This really needs to be the rare exception....

@bulislaw
Copy link
Member

Works for me as well. But like @adbridge said we should be more careful about fixes to the APIs.

@kjbracey
Copy link
Contributor Author

This was caught in OOB, but not in time to make it to 5.9.0. It was a known issue.

@kjbracey
Copy link
Contributor Author

kjbracey commented Jun 18, 2018

Actually, it didn't make it onto the mbed OS 5.9.0 known issues list, just the mbed mesh minimal example: ARMmbed/mbed-os-example-mesh-minimal#188 & ARMmbed/mbed-os-example-mesh-minimal#191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants