core: cc2652rb stick throw errors

The problem

Got this error since update from 2021.10.6 on raspberrypi (os 6.5) with Zigbe-Stick: slae.sh cc2652rb stick

It seems the stick is not starting anymore. Maybe an python-bug caused by the upgrade of the os? I don’t know.

What version of Home Assistant Core has the issue?

2021.12.1

What was the last working version of Home Assistant Core?

2021.10.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

slae.sh cc2652rb stick

Link to integration documentation on our website

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: components/zha/core/gateway.py:152
First occurred: 21:38:19 (1 occurrences)
Last logged: 21:38:19

Error setting up entry slae.sh cc2652rb stick - s - /dev/serial/by-id/usb-Silicon_Labs_slae.sh_cc2652rb_stick_-_slaesh_s_iot_stuff_00_12_4B_00_23_93_35_53-if00-port0, s/n: 00_12_4B_00_23_93_35_53 - Silicon Labs - 10C4:EA60 for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 102, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 152, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.9/site-packages/zigpy/application.py", line 69, in new
    await app.startup(auto_form)
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 175, in startup
    return await self._startup(
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 238, in _startup
    await self._write_stack_settings(reset_if_changed=True)
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 1024, in _write_stack_settings
    await self._znp.nvram.osal_write(nvid, value)
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/nvram.py", line 141, in osal_write
    await self.znp.request(
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/api.py", line 835, in request
    raise InvalidCommandResponse(
zigpy_znp.exceptions.InvalidCommandResponse: Expected SRSP response SYS.OSALNVWriteExt.Rsp(Status=<Status.SUCCESS: 0>), got SYS.OSALNVWriteExt.Rsp(Status=<Status.NV_OPER_FAILED: 10>)

Additional information

Worked before. What I’ve done?

Upgrade os, upgrade HA.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (8 by maintainers)

Most upvoted comments

I’ve never encountered NV_OPER_FAILED for a write command so something very strange happened with your stick that’s preventing NVRAM writes from succeeding for that particular entry.

This exact same startup sequence is used in the version of zigpy-znp included in the previous release of Home Assistant so in theory, it’ll still be “broken” if you downgrade.

Here are some detailed installation instructions for getting a Python environment setup if you don’t have one already (https://github.com/zigpy/zigpy-znp/blob/dev/TOOLS.md). My only suggestion here is to take a network backup, re-flash the firmware and erase NVRAM, and restore the backup:

  # Install dependencies
$ pip install git+https://github.com/JelmerT/cc2538-bsl intelhex zigpy-znp
$ STICK=/dev/serial/by-id/usb-Silicon_Labs_slae.sh_cc2652rb_stick_-_slaesh_s_iot_stuff_00_12_4B_00_23_93_35_53-if00-port0

  # Take backups of the NVRAM and network data
$ python -m zigpy_znp.tools.nvram_read -v -o /config/slaesh_nvram.json $STICK
$ python -m zigpy_znp.tools.network_backup -v -o /config/slaesh_network.json $STICK

  # Download and flash new firmware
$ wget -c https://github.com/Koenkk/Z-Stack-firmware/raw/master/coordinator/Z-Stack_3.x.0/bin/CC2652RB_coordinator_20210708.zip
$ unzip CC2652RB_coordinator_*.zip
$ cc2538-bsl.py -evw -p $STICK CC2652RB_coordinator_*.hex

  # Restore backup
$ python -m zigpy_znp.tools.network_restore -i /config/slaesh_network.json $STICK

Could you attach the /config/slaesh_nvram.json file to a comment or send it to me via email?