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

Operation not permitted: '/dev/gpiochip0' #73

Open
Charlespoole opened this issue Jul 10, 2024 · 14 comments
Open

Operation not permitted: '/dev/gpiochip0' #73

Charlespoole opened this issue Jul 10, 2024 · 14 comments

Comments

@Charlespoole
Copy link

I'm unable to flash my on-board zigbee module on Homeassistant Yellow board. The error showed "Operation not permitted: '/dev/gpiochip0', Here is the log:
`2024-07-10 17:30:01.659 core-silabs-flasher universal_silabs_flasher.flash INFO Extracted GBL metadata: NabuCasaMetadata(metadata_version=1, sdk_version='4.3.1', ezsp_version='7.3.1.0', ot_rcp_version=None, cpc_version=None, fw_type=<FirmwareImageType.NCP_UART_HW: 'ncp-uart-hw'>, baudrate=115200)
2024-07-10 17:30:01.660 core-silabs-flasher universal_silabs_flasher.flasher INFO Triggering yellow bootloader
Traceback (most recent call last):
File "/usr/local/bin/universal-silabs-flasher", line 8, in
sys.exit(main())

File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)

File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)

File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))

File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)

File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)

File "/usr/local/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.11/site-packages/universal_silabs_flasher/flash.py", line 40, in inner
return asyncio.run(f(*args, **kwargs))
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
File "/usr/local/lib/python3.11/site-packages/universal_silabs_flasher/flash.py", line 341, in flash
await flasher.probe_app_type()
File "/usr/local/lib/python3.11/site-packages/universal_silabs_flasher/flasher.py", line 173, in probe_app_type
await self.enter_bootloader_reset(self._reset_target)
File "/usr/local/lib/python3.11/site-packages/universal_silabs_flasher/flasher.py", line 78, in enter_bootloader_reset
await send_gpio_pattern(
File "/usr/local/lib/python3.11/site-packages/universal_silabs_flasher/gpio.py", line 125, in send_gpio_pattern
await asyncio.get_running_loop().run_in_executor(
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.11/site-packages/universal_silabs_flasher/gpio.py", line 29, in _send_gpio_pattern
chip = gpiod.chip(chip, gpiod.chip.OPEN_BY_PATH)
File "/usr/local/lib/python3.11/site-packages/gpiod/libgpiodcxx/init.py", line 105, in init
self.open(device, how)
File "/usr/local/lib/python3.11/site-packages/gpiod/libgpiodcxx/init.py", line 132, in open
chip_struct = func(device)
File "/usr/local/lib/python3.11/site-packages/gpiod/libgpiod/init.py", line 105, in gpiod_chip_open
fd = os_open(path, O_RDWR | O_CLOEXEC)
PermissionError: [Errno 1] Operation not permitted: '/dev/gpiochip0'`
Any clue why this is happening? End of the rope here, if you guys cannot help, might have to return my board for factory repair.

@puddly
Copy link
Collaborator

puddly commented Jul 10, 2024

I don't think this is a hardware issue.

What other addons do you have? Integrations?

@Charlespoole
Copy link
Author

Charlespoole commented Jul 10, 2024

I don't think this is a hardware issue.

What other addons do you have? Integrations?

image Here is my addons, no integration that could possibly use zigbee devices is installed. One notably thing is that I tried the multi-protocol addon offered by HA, but is unhappy with the buggy experience and decided to flash back to zigbee-only firmware. That's when this error occured.

@puddly
Copy link
Collaborator

puddly commented Jul 10, 2024

The issue is that something has exclusive access to the GPIO chip on the Yellow. It's either some other addon or integration.

Have you tried rebooting? That may clear it.

@Charlespoole
Copy link
Author

The issue is that something has exclusive access to the GPIO chip on the Yellow. It's either some other addon or integration.

Have you tried rebooting? That may clear it.

I have tried rebooting, no luck. Maybe it's something access the GPIO chip, how can i findout which process is using it?

@puddly
Copy link
Collaborator

puddly commented Jul 10, 2024

Just to confirm, you're using the Silicon Labs Flasher Add-on? I didn't notice it in your list of addons.

@Charlespoole
Copy link
Author

Charlespoole commented Jul 10, 2024

Just to confirm, you're using the Silicon Labs Flasher Add-on? I didn't notice it in your list of addons.

I also used the offical silabs-flasher addon, no luck there. So I installed the homeassistant/aarch64-addon-silabs-flasher docker using portainer, to enable cmd functions inside the docker container, for a more fine-grained cmd functions.

@puddly
Copy link
Collaborator

puddly commented Jul 10, 2024

That is likely the problem. Install it from the normal Home Assistant addon repository.

@puddly
Copy link
Collaborator

puddly commented Jul 10, 2024

I also used the offical silabs-flasher addon, no luck there.

Can you post a traceback of what happens when you try installing from the normal addon? Make sure to enable verbose mode:

image

@Charlespoole
Copy link
Author

Charlespoole commented Jul 10, 2024

That is likely the problem. Install it from the normal Home Assistant addon repository.

Hi, same mind buddy! I literally just did that! Here is the log:

System: Home Assistant OS 12.4  (aarch64 / yellow)
 Home Assistant Core: 2024.7.2
 Home Assistant Supervisor: 2024.06.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service banner successfully started
s6-rc: info: service universal-silabs-flasher: starting
[22:36:12] INFO: Detected Home Assistant Yellow
[22:36:12] INFO: Starting universal-silabs-flasher with /dev/ttyAMA1 (bootloader baudrate 460800)
2024-07-10 22:36:14.483 core-silabs-flasher asyncio DEBUG Using selector: EpollSelector
2024-07-10 22:36:14.487 core-silabs-flasher universal_silabs_flasher.flash INFO Extracted GBL metadata: NabuCasaMetadata(metadata_version=1, sdk_version='4.3.1', ezsp_version='7.3.1.0', ot_rcp_version=None, cpc_version=None, fw_type=<FirmwareImageType.NCP_UART_HW: 'ncp-uart-hw'>, baudrate=115200)
2024-07-10 22:36:14.488 core-silabs-flasher universal_silabs_flasher.flash DEBUG Probing app type ApplicationType.EZSP first
2024-07-10 22:36:14.488 core-silabs-flasher universal_silabs_flasher.flash DEBUG Probing with 115200 baudrate first
2024-07-10 22:36:14.488 core-silabs-flasher universal_silabs_flasher.flasher INFO Triggering yellow bootloader
2024-07-10 22:36:14.796 core-silabs-flasher universal_silabs_flasher.flasher INFO Probing ApplicationType.GECKO_BOOTLOADER at 460800 baud
2024-07-10 22:36:14.797 core-silabs-flasher zigpy.serial DEBUG Opening a serial connection to '/dev/ttyAMA1' (460800 baudrate)
2024-07-10 22:36:14.800 core-silabs-flasher universal_silabs_flasher.common DEBUG Connection made: SerialTransport(<_UnixSelectorEventLoop running=True closed=False debug=False>, <universal_silabs_flasher.gecko_bootloader.GeckoBootloaderProtocol object at 0x7fb54b8390>, Serial<id=0x7fb5476770, open=True>(port='/dev/ttyAMA1', baudrate=460800, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))
2024-07-10 22:36:14.802 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\n'
2024-07-10 22:36:14.803 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'3'
2024-07-10 22:36:16.806 core-silabs-flasher universal_silabs_flasher.flasher INFO Probing ApplicationType.EZSP at 115200 baud
2024-07-10 22:36:16.809 core-silabs-flasher zigpy.serial DEBUG Opening a serial connection to '/dev/ttyAMA1' (115200 baudrate)
2024-07-10 22:36:16.811 core-silabs-flasher bellows.ezsp DEBUG Resetting EZSP
2024-07-10 22:36:16.811 core-silabs-flasher bellows.uart DEBUG Resetting ASH
2024-07-10 22:36:16.812 core-silabs-flasher bellows.uart DEBUG Sending: b'1ac038bc7e'
2024-07-10 22:36:21.819 core-silabs-flasher universal_silabs_flasher.flasher INFO Probing ApplicationType.CPC at 460800 baud
2024-07-10 22:36:21.819 core-silabs-flasher zigpy.serial DEBUG Opening a serial connection to '/dev/ttyAMA1' (460800 baudrate)
2024-07-10 22:36:21.821 core-silabs-flasher bellows.uart DEBUG Connection lost: None
2024-07-10 22:36:21.821 core-silabs-flasher bellows.uart DEBUG Closed serial connection
2024-07-10 22:36:21.822 core-silabs-flasher universal_silabs_flasher.common DEBUG Connection made: SerialTransport(<_UnixSelectorEventLoop running=True closed=False debug=False>, <universal_silabs_flasher.cpc.CPCProtocol object at 0x7fb54c8f10>, Serial<id=0x7fb54768f0, open=True>(port='/dev/ttyAMA1', baudrate=460800, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))
2024-07-10 22:36:21.823 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:21.825 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:22.828 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 1 of 4)
2024-07-10 22:36:22.929 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:22.931 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:23.934 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 2 of 4)
2024-07-10 22:36:24.035 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:24.036 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:25.039 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 3 of 4)
2024-07-10 22:36:25.140 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:25.142 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:26.144 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 4 of 4)
2024-07-10 22:36:26.146 core-silabs-flasher universal_silabs_flasher.flasher INFO Probing ApplicationType.CPC at 115200 baud
2024-07-10 22:36:26.146 core-silabs-flasher zigpy.serial DEBUG Opening a serial connection to '/dev/ttyAMA1' (115200 baudrate)
2024-07-10 22:36:26.148 core-silabs-flasher universal_silabs_flasher.common DEBUG Connection made: SerialTransport(<_UnixSelectorEventLoop running=True closed=False debug=False>, <universal_silabs_flasher.cpc.CPCProtocol object at 0x7fb54b97d0>, Serial<id=0x7fb54768f0, open=True>(port='/dev/ttyAMA1', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))
2024-07-10 22:36:26.149 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:26.150 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:27.152 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 1 of 4)
2024-07-10 22:36:27.253 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:27.254 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:28.256 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 2 of 4)
2024-07-10 22:36:28.357 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:28.359 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:29.362 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 3 of 4)
2024-07-10 22:36:29.463 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:29.465 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:30.467 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 4 of 4)
2024-07-10 22:36:30.468 core-silabs-flasher universal_silabs_flasher.flasher INFO Probing ApplicationType.CPC at 230400 baud
2024-07-10 22:36:30.469 core-silabs-flasher zigpy.serial DEBUG Opening a serial connection to '/dev/ttyAMA1' (230400 baudrate)
2024-07-10 22:36:30.471 core-silabs-flasher universal_silabs_flasher.common DEBUG Connection made: SerialTransport(<_UnixSelectorEventLoop running=True closed=False debug=False>, <universal_silabs_flasher.cpc.CPCProtocol object at 0x7fb54b9890>, Serial<id=0x7fb54768f0, open=True>(port='/dev/ttyAMA1', baudrate=230400, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))
2024-07-10 22:36:30.472 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:30.474 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:31.476 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 1 of 4)
2024-07-10 22:36:31.577 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:31.578 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:32.580 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 2 of 4)
2024-07-10 22:36:32.682 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:32.683 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:33.686 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 3 of 4)
2024-07-10 22:36:33.787 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Sending frame CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b'')))
2024-07-10 22:36:33.789 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'\x14\x00\n\x00\xc4U\xd3\x02\x00\x04\x00\x03\x00\x00\x00\xdb\x12'
2024-07-10 22:36:34.791 core-silabs-flasher universal_silabs_flasher.cpc DEBUG Failed to send CPCTransportFrame(endpoint=<EndpointId.SYSTEM: 0>, control=196, payload=UnnumberedFrame(command_id=<UnnumberedFrameCommandId.PROP_VALUE_GET: 2>, command_seq=0, payload=PropertyCommand(property_id=<PropertyId.SECONDARY_CPC_VERSION: 3>, value=b''))), trying again in 0.10s (attempt 4 of 4)
2024-07-10 22:36:34.792 core-silabs-flasher universal_silabs_flasher.flasher INFO Probing ApplicationType.SPINEL at 460800 baud
2024-07-10 22:36:34.793 core-silabs-flasher zigpy.serial DEBUG Opening a serial connection to '/dev/ttyAMA1' (460800 baudrate)
2024-07-10 22:36:34.795 core-silabs-flasher universal_silabs_flasher.common DEBUG Connection made: SerialTransport(<_UnixSelectorEventLoop running=True closed=False debug=False>, <universal_silabs_flasher.spinel.SpinelProtocol object at 0x7fb54b9750>, Serial<id=0x7fb54768f0, open=True>(port='/dev/ttyAMA1', baudrate=460800, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))
2024-07-10 22:36:34.797 core-silabs-flasher universal_silabs_flasher.spinel DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02')
2024-07-10 22:36:34.799 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'~\x83\x02\x02\xe65~'
2024-07-10 22:36:35.801 core-silabs-flasher universal_silabs_flasher.spinel DEBUG Failed to send SpinelFrame(header=SpinelHeader(network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02'), trying again in 0.10s (attempt 1 of 4)
2024-07-10 22:36:35.903 core-silabs-flasher universal_silabs_flasher.spinel DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02')
2024-07-10 22:36:35.904 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'~\x83\x02\x02\xe65~'
2024-07-10 22:36:36.906 core-silabs-flasher universal_silabs_flasher.spinel DEBUG Failed to send SpinelFrame(header=SpinelHeader(network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02'), trying again in 0.10s (attempt 2 of 4)
2024-07-10 22:36:37.010 core-silabs-flasher universal_silabs_flasher.spinel DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02')
2024-07-10 22:36:37.011 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'~\x83\x02\x02\xe65~'
2024-07-10 22:36:38.013 core-silabs-flasher universal_silabs_flasher.spinel DEBUG Failed to send SpinelFrame(header=SpinelHeader(network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02'), trying again in 0.10s (attempt 3 of 4)
2024-07-10 22:36:38.114 core-silabs-flasher universal_silabs_flasher.spinel DEBUG Sending frame SpinelFrame(header=SpinelHeader(transaction_id=3, network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02')
2024-07-10 22:36:38.115 core-silabs-flasher universal_silabs_flasher.common DEBUG Sending data b'~\x83\x02\x02\xe65~'
2024-07-10 22:36:39.118 core-silabs-flasher universal_silabs_flasher.spinel DEBUG Failed to send SpinelFrame(header=SpinelHeader(network_link_id=0, flag=2), command_id=<CommandID.PROP_VALUE_GET: 2>, data=b'\x02'), trying again in 0.10s (attempt 4 of 4)
Error: Failed to probe running application type
[22:36:39] INFO: universal-silabs-flasher-up script exited with code 1
s6-rc: warning: unable to start service universal-silabs-flasher: command exited 1
s6-rc: info: service banner: stopping
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service banner successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

@puddly
Copy link
Collaborator

puddly commented Jul 10, 2024

Probing ApplicationType.GECKO_BOOTLOADER at 460800 baud doesn't look right. Did you change the baudrate? I would switch it back to 115200.

@Charlespoole
Copy link
Author

Probing ApplicationType.GECKO_BOOTLOADER at 460800 baud doesn't look right. Did you change the baudrate? I would switch it back to 115200.
Tried every baudrate listed, no luck.

@puddly
Copy link
Collaborator

puddly commented Jul 10, 2024

Let's get everything back to the defaults by uninstalling the addon and the container from Portainer.

Do you have ZHA or Z2M running? If so, they would prevent firmware flashing from succeeding. Disable them first. Afterwards, install the addon, enable verbose logging, pick /dev/ttyAMA1, and run it with the default config.

@Charlespoole
Copy link
Author

Let's get everything back to the defaults by uninstalling the addon and the container from Portainer.

Do you have ZHA or Z2M running? If so, they would prevent firmware flashing from succeeding. Disable them first. Afterwards, install the addon, enable verbose logging, pick /dev/ttyAMA1, and run it with the default config.

That did not work for me. I might have to factory reset the device this weekend. I will update the situation in this issue.

@Charlespoole
Copy link
Author

Let's get everything back to the defaults by uninstalling the addon and the container from Portainer.
Do you have ZHA or Z2M running? If so, they would prevent firmware flashing from succeeding. Disable them first. Afterwards, install the addon, enable verbose logging, pick /dev/ttyAMA1, and run it with the default config.

That did not work for me. I might have to factory reset the device this weekend. I will update the situation in this issue.

Turns out factory resetting the device is not enough. I have to reinstall the entire OS to solve this problem.

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

2 participants