Skip to content

ws2811_init fails with error code -3 on RPi 3B+ with ArchLinuxARM aarch64 #350

@nils-van-zuijlen

Description

@nils-van-zuijlen

I am using the python library at rpi-ws281x/rpi-ws281x-python and I recently switched from raspbian to ArchLinuxARM aarch64 on my RPi.

After the upgrade, when I tried to run my code, I got

Traceback (most recent call last):
  File "LedPanel.py", line 129, in <module>
    panel = LEDPanel(0,1)
  File "LedPanel.py", line 22, in __init__
    self._strip.begin()
  File "/usr/lib/python3.7/site-packages/rpi_ws281x/rpi_ws281x.py", line 124, in begin
    raise RuntimeError('ws2811_init failed with code {0} ({1})'.format(resp, str_resp))
RuntimeError: ws2811_init failed with code -3 (Hardware revision is not supported)

As I wanted to know what happened, I traced the calls back to the C library in which ws2811_init was the function called and the error code was thrown at line 886.

Apparently, the return value of rpi_hw_detect was wrong. I later found that it was trying to read /proc/device-tree/system/linux,revision from my system (code at line 343 of rpihw.c) and that that file does not exist on my Pi.

How may I get it to work ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions