zigpy / zigpy-znp

TI CC2531, CC13x2, CC26x2 radio support for Zigpy and ZHA
GNU General Public License v3.0
150 stars 40 forks source link

timeout error when read CC2652 Sonoff dongle #221

Open kyc1338 opened 1 year ago

kyc1338 commented 1 year ago

I tried to save the firmware of the Sonoff zigbee dongle P and used this command "python -m zigpy_znp.tools.nvram_read COM8 -o nvram_backup.json" in two different PC and a MacBook but have the same error below :

Traceback (most recent call last): File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\zigpy_znp\api.py", line 673, in _skip_bootloader result = await responses.get() ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\asyncio\queues.py", line 158, in get await getter asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\zigpy_znp\tools\nvram_read.py", line 99, in asyncio.run(main(sys.argv[1:])) # pragma: no cover ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\zigpy_znp\tools\nvram_read.py", line 90, in main await znp.connect() File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\zigpy_znp\api.py", line 715, in connect self.capabilities = (await self._skip_bootloader()).Capabilities ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\zigpy_znp\api.py", line 672, in _skip_bootloader async with async_timeout.timeout(CONNECT_PROBE_TIMEOUT): File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\async_timeout__init.py", line 129, in aexit self._do_exit(exc_type) File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\async_timeout\init__.py", line 212, in _do_exit raise asyncio.TimeoutError TimeoutError

Please advise any solution to this issue.

Hedda commented 1 year ago

I am guessing that this now works with a newer release of zigpy-znp as previous releases was not fully updated for Python 3.11

Regardless, suggest that you try using zigpy-cli instead -> https://github.com/zigpy/zigpy-cli

See zigpy-cli README.md file -> https://github.com/zigpy/zigpy-cli/blob/dev/README.md#network-commands