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

Home Assistant wont start with 7.X.X firmware (ERROR_OUT_MEMORY, and RESET_ASSERT) #31

Closed
xatr0z opened this issue Nov 27, 2022 · 4 comments

Comments

@xatr0z
Copy link

xatr0z commented Nov 27, 2022

I'm not entirely sure if I have to report this here, at zigpy or home assistant, so sorry in advance if this is the wrong place. :)

I tried upgrading my Itead Zigbee stick (model without antenna/case) with the unsigned images.
ncp-uart-sw_v6.10.3_115200.gbl worked fine in HA, but didnt solve the bugs with aqara devices i am having. Therefore i tried ncp-uart-sw_7.0.2.0_115200.gbl and later ncp-uart-sw_7.1.1.0_115200.gbl . Flashing both went OK and device went back to normal mode. But I wasnt able to get it working in HA:

  • [bellows.ezsp.protocol] Couldn't set EzspConfigId.CONFIG_MULTICAST_TABLE_SIZE=16 configuration value: EzspStatus.ERROR_OUT_OF_MEMORY
    • fixed that by forcing it to 12 (setting it to 16 had no effect) with: CONFIG_ADDRESS_TABLE_SIZE: 12
  • after that the next error appears: Couldn't set EzspConfigId.CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE=2 configuration value: EzspStatus.ERROR_OUT_OF_MEMORY
    • tried setting to 2 and 1, but would only start with 0: CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE: 0
  • Kept hitting different issues after that. So I tried different configs posted online:
    • From issue at itead
        CONFIG_APS_UNICAST_MESSAGE_COUNT: 32
        CONFIG_PACKET_BUFFER_COUNT:       250
        CONFIG_NEIGHBOR_TABLE_SIZE:       26
        CONFIG_SOURCE_ROUTE_TABLE_SIZE:   200
        CONFIG_ADDRESS_TABLE_SIZE:        14
      
    • Different variations ie
        CONFIG_APS_UNICAST_MESSAGE_COUNT: 32
        CONFIG_PACKET_BUFFER_COUNT:       250
        CONFIG_NEIGHBOR_TABLE_SIZE:       26
        CONFIG_SOURCE_ROUTE_TABLE_SIZE:   16
        CONFIG_ADDRESS_TABLE_SIZE:        12
        CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE: 0
        CONFIG_MULTICAST_TABLE_SIZE:      12
      
    • As advised by puddly:
       CONFIG_ADDRESS_TABLE_SIZE:              16  # FW:  32, ZHA:  16
       CONFIG_MULTICAST_TABLE_SIZE:             8  # FW:   8, ZHA:  16
       CONFIG_PACKET_BUFFER_COUNT:            250  # FW: 250, ZHA: 255
       CONFIG_SOURCE_ROUTE_TABLE_SIZE:         16  # FW: 200, ZHA:  16
       CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE:  2  # FW:   0, ZHA:   2
      
    • Based on values in the readme here:
        CONFIG_CTUNE_VALUE:   128
        CONFIG_ADDRESS_TABLE_SIZE:  32
      

...but none worked. I ended up with an unresponsive coordinator (RESET_ASSERT which i assume is some sort of crash):

2022-11-27 14:45:06.349 DEBUG (bellows.thread_0) [bellows.uart] Error code: RESET_ASSERT, Version: 2, frame: b'c2020682af7e'
2022-11-27 14:45:06.350 INFO (MainThread) [bellows.ezsp] NCP entered failed state. No application handler registered, ignoring...
2022-11-27 14:45:10.230 DEBUG (bellows.thread_0) [bellows.uart] Closed serial connection

Full error logs: bellows_zigpy_logs___after_ezsp_config.txt

This were the bellows defaults: bellows_defaults.txt

PS:
Eventually I tried to go back to 6.10.3 and encountered the same issue as #28 . The outlined steps (using onboard buttons) helped to be able to revert the firmware to ncp-uart-sw_v6.10.3_115200.gbl

@xsp1989
Copy link
Owner

xsp1989 commented Dec 20, 2022

This problem may be related to NVM cache, you can try to use nvm3_initfile.gbl file to reinitialize NVM.

@MattWestb
Copy link
Contributor

MattWestb commented Dec 20, 2022

May i requesting (not for my but for our users in the future) then making new EZSP firmware patching the 2 above configuration parameters (or using more standard settings the your chip have enough ram and CPU) so not getting problems with the coordinators.

One link for more information that can being good then some parameters cant being set in the GUI in SS5 NabuCasa/silabs-firmware#1 (comment).

@xatr0z
Copy link
Author

xatr0z commented Dec 20, 2022

This problem may be related to NVM cache, you can try to use nvm3_initfile.gbl file to reinitialize NVM.

Thanks for the reply, I already tried the nvm3_initfile but it didnt help

@TheJulianJES
Copy link

TheJulianJES commented Jan 3, 2023

Set CONFIG_SUPPORTED_NETWORKS to 2 for the 7.x images from this repo.
Bellows wants to set this to 1 (lowering limits should always work). However, the firmware simply crashes.

If you want to go back to 6.x firmware, you need the init file.

(Both 7.x with the config and going back to 6.x with the init file worked for me)

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

No branches or pull requests

4 participants