Error upgrading firmware SONOFF Zigbee 3

AFTER having tested the Sonoff zigbee 3 with some devices with ZHA, I updated the Sonoff Zigbee 3 in ubuntu, following Flashing the firmware via cc2538-bsl | Zigbee2MQTT

The firmware was old (2019) and I had issues with a Vimar Switch that was reported off when it was on…

After the flash everything seemed ok as following log
THEN I reinstalled the usb in the Raspi 4. and tried to delete and reinstall ZHA service…
It seemed to work (screenshot) … .at first BUT then…
The zigbee network does not work again :frowning: :grimacing: … (screenshot, error logs)

HOW can I recover ?

Thanks in advance
Giuliano

giuliano@hotbird13:~/cc2538-bsl$ ./cc2538-bsl.py -p /dev/ttyUSB0 -evw --bootloader-sonoff-usb CC1352P2_CC2652P_launchpad_coordinator_20220219.hex
sonoff
Opening port /dev/ttyUSB0, baud 500000
Reading data from CC1352P2_CC2652P_launchpad_coordinator_20220219.hex
Your firmware looks like an Intel Hex file
Connecting to target...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: 00:12:4B:00:26:B8:06:EC
    Performing mass erase
Erasing all main bank flash sectors
    Erase done
Writing 360448 bytes starting at address 0x00000000
Write 104 bytes at 0x00057F988
    Write done                                
Verifying by comparing CRC32 calculations.
    Verified (match: 0xddfc152d)



image

Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:173 
Integration: Zigbee Home Automation (documentation, issues) 
First occurred: 10:23:07 PM (6 occurrences) 
Last logged: 10:27:40 PM 
Couldn't start ZNP = Texas Instruments Z-Stack ZNP protocol: CC253x, CC26x2, CC13x2 coordinator 
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/api.py", line 847, in request
    response = await response_future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 173, 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 152, in startup
    return await self._startup(
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 318, in _startup
    await self.permit(time_s=0)
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 517, in permit
    response = await self._znp.request_callback_rsp(
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/api.py", line 886, in request_callback_rsp
    await self.request(request, **response_params)
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/api.py", line 847, in request
    response = await response_future
  File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 129, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

Update
after a reset of raspberry, the ZHA showed no error.
The download of the device (sonoff) device, showed updated firmware.

BUT when i put the Vimar switch in pairing mode (pressing 5 secs the push button),
and start the discovery in HA,
Nothing is discovered in HA.
The log says

[0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_rsp: [<Status.SUCCESS: 0>]
[0x0000:zdo] No handler for ZDO request:ZDOCmd.Mgmt_Permit_Joining_rsp([<Status.SUCCESS: 0>])
[0x1CFA](On_Off_Switch_v1.0): last_seen is 13614.092367649078 seconds ago and ping attempts have been exhausted, marking the device unavailable
[0x1CFA](On_Off_Switch_v1.0): Update device availability -  device available: False - new availability: False - changed: False
[0x1CFA](On_Off_Switch_v1.0): last_seen is 13693.092934846878 seconds ago and ping attempts have been exhausted, marking the device unavailable
[0x1CFA](On_Off_Switch_v1.0): Update device availability -  device available: False - new availability: False - changed: False

With the old firmware it was discovered at once…

What could be the problem now ?

BR
Giuliano

UPDATE 2
I flashed the zigbee device with bluetooth firmware and then again with zigbee firmware.
Than it was paired.

In some way it seems that the end device keept memory of the coordinator it was linked to. Even if I pressed for 5 secs requiring a new pairing.

Is it an expected behavior ?

BR
Giuliano

All end-devices will stay at their coordinator, until factory reset. The normal pairing mode is normally not enough. Different from device to device