Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Flashing sometimes results in 0xFF...FF MAC adresses #116

Open
danbim opened this issue Apr 25, 2012 · 1 comment
Open

Flashing sometimes results in 0xFF...FF MAC adresses #116

danbim opened this issue Apr 25, 2012 · 1 comment
Labels
Milestone

Comments

@danbim
Copy link
Member

danbim commented Apr 25, 2012

Looking at the code there could be a more clever way to validate (and potentially repair) a flash operation:

  1. Read current MAC address and remember it
  2. Flash image
  3. Read MAC address and compare with the one remembered
  4. In case the current and remembered don't match restore the old by only writing the old MAC address

While this won't guarantee failure-freedom it would certainly result in less occasions on which the MAC address of the node is damaged.

@danbim
Copy link
Member Author

danbim commented Apr 27, 2012

Current code:

byte[] deviceFlashHeader = readDeviceFlashHeader(chipType.getHeaderStart(), chipType.getHeaderLength());
if (MacAddress.HIGHEST_MAC_ADDRESS.equals(new MacAddress(deviceFlashHeader))) {
    throw new FlashProgramFailedException("Device MAC address (0xFF...FF) seems broken!");
}
binaryImage.insertHeader(deviceFlashHeader);

It reads the current MAC address from the device and checks if its not equal to 0xFF...FF.

danbim added a commit that referenced this issue Apr 27, 2012
…). The commit doesn't prevent the error from occurring but warns the user so that he can react accordingly.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant