Skip to content
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

Write custom EUI64 to NV3 storage if available #565

Merged
merged 6 commits into from
Jun 16, 2023

Conversation

puddly
Copy link
Contributor

@puddly puddly commented Jun 12, 2023

From the Gecko SDK 4.3.0 release notes:

Zigbeed now includes an implementation of emberGetRestoredEui64() which loads the CREATOR_STACK_RESTORED_EUI64 token
from the host_token.nvm file.

This finally bypasses the dreaded i_understand_i_can_update_eui64_only_once_and_i_still_want_to_do_it limitation, allowing for a coordinator's IEEE address to be overwritten without any issues.


TODO:

  • Test with RCP firmware with zigbeed: works with the latest Gecko SDK release (v4.3.0).
  • Does it actually work? Is this IEEE address actually used in all tables and during network management?
  • Investigate if this works with NCP firmware (probably requires the NV3 component to be compiled into the firmware)

@MattWestb

This comment was marked as off-topic.

@agners
Copy link
Contributor

agners commented Jun 13, 2023

From the Gecko SDK 4.3.0 release notes:

Zigbeed now includes an implementation of emberGetRestoredEui64() which loads the CREATOR_STACK_RESTORED_EUI64 token
from the host_token.nvm file.

Isn't that referring to the Multiprotcool/Multi-PAN setup only (as in with zigbeed?

This finally bypasses the dreaded i_understand_i_can_update_eui64_only_once_and_i_still_want_to_do_it limitation, allowing for a coordinator's IEEE address to be overwritten without any issues.

So how does that work/relate with regular NCP controllers using the EmberZNet stack running on the micro-controller?

@puddly
Copy link
Contributor Author

puddly commented Jun 13, 2023

@agners The most recent commit implements it for NCP firmware. Corresponding PR for the firmware builder: NabuCasa/silabs-firmware-builder#22

I've yet to actually test these in a real network beyond ensuring the IEEE persists through backup and restore.

@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b487136) 99.76% compared to head (02da6c5) 99.76%.

Additional details and impacted files
@@           Coverage Diff            @@
##              dev     #565    +/-   ##
========================================
  Coverage   99.76%   99.76%            
========================================
  Files          62       62            
  Lines        4602     4713   +111     
========================================
+ Hits         4591     4702   +111     
  Misses         11       11            
Impacted Files Coverage Δ
bellows/ezsp/v10/commands.py 100.00% <ø> (ø)
bellows/ezsp/v9/commands.py 100.00% <ø> (ø)
bellows/ezsp/__init__.py 99.29% <100.00%> (+0.09%) ⬆️
bellows/types/basic.py 100.00% <100.00%> (ø)
bellows/types/named.py 100.00% <100.00%> (ø)
bellows/types/struct.py 100.00% <100.00%> (ø)
bellows/zigbee/application.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@puddly
Copy link
Contributor Author

puddly commented Jun 16, 2023

I migrated my home network to an old SkyConnect that has already had its EUI64 replaced with an incorrect value. Everything works fine so far with the NV3 token storage after flashing 7.3.0.0 NCP with the extra component.

@dmulcahey
Copy link
Contributor

Nice!!

@puddly puddly merged commit 178004a into zigpy:dev Jun 16, 2023
@MattWestb
Copy link
Contributor

@puddly If you is having one SWD probe you can writing one empty file to the "userdata" or erasing the flash pages with command and the token of the burned is going away and can being burned agen.

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

Successfully merging this pull request may close these issues.

4 participants