jgarff / rpi_ws281x

Userspace Raspberry Pi PWM library for WS281X LEDs
BSD 2-Clause "Simplified" License
1.78k stars 622 forks source link

Hardware revision is not supported for Raspbery pi 3 with hardware revision a32082 #519

Closed kingofleaves closed 1 year ago

kingofleaves commented 1 year ago

HI, I have a similar problem as issue #364 , with my Raspberry Pi 3B. Here is the revision code output:

pi@raspberrypi:~ $ cat /proc/device-tree/model 
Raspberry Pi 3 Model B Rev 1.2
pi@raspberrypi:~ $ cat /proc/cpuinfo | grep Revision
Revision    : a32082

And here is the error message from which it tells me Hardware Revision not supported:

pi@raspberrypi:~/rpi-ws281x-python/examples $ python3 strandtest.py 
Traceback (most recent call last):
  File "/home/pi/rpi-ws281x-python/examples/strandtest.py", line 97, in <module>
    strip.begin()
  File "/usr/local/lib/python3.9/dist-packages/rpi_ws281x/rpi_ws281x.py", line 131, 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)
Segmentation fault

Can anyone help with this? Thanks!

Gadgetoid commented 1 year ago

It's added here - https://github.com/jgarff/rpi_ws281x/blob/1f47b59ed603223d1376d36c788c89af67ae2fdc/rpihw.c#L512 - but I need to release a new version of the Python bindings. A WIP due to some other changes coming along for the ride.

Gadgetoid commented 1 year ago

If you have time, please try the pre-release version here: https://test.pypi.org/project/rpi-ws281x/5.0.0/

Edit: (Note) you will need to sudo python3 -m pip install -i https://test.pypi.org/simple/ rpi-ws281x==5.0.0 if you're running the examples as root.

Gadgetoid commented 1 year ago

v5.0.0 bindings now released to regular pypi.