jgarff / rpi_ws281x

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

Raspberry Pi Zero 2 W - Hardware revision is not supported #503

Closed codac closed 1 year ago

codac commented 1 year ago

Running your library with a Raspberry Pi Zero 2 W results in: RuntimeError: ws2811_init failed with code -3 (Hardware revision is not supported).

Hardware: BCM2835 Revision: 902120 Model: Raspberry Pi Zero 2 W Rev 1.0

Could you please add support for this Pi Revision?

akumpf commented 1 year ago

I think this may be related to issue https://github.com/jgarff/rpi_ws281x/issues/502.

Essentially, if the warranty bit gets flipped, then the library can't find the board. This shouldn't happen, but the code that checks for the board version isn't masking off the warranty bit. It's just 2 lines of code, and it's already being applied for 32-bit boards, but for 64 bit boards it was somehow left out.

codac commented 1 year ago

Yeah might be, could you please add that bit of code?

DaddyW123 commented 1 year ago

I just tried this library on a Mango Pi MQ-Quad, which is supposed to be an alternative to the Pi Zero 2 and runs at 64 bit. I got the same error as above. Hopefully it's just a 64 bit error as mentioned, and as soon as the two lines of code are included it will work on this board as well?

Gadgetoid commented 1 year ago

I just tried this library on a Mango Pi MQ-Quad

This library will never run on anything that isn't an official Raspberry Pi board, it's literally right there in the name.

Revision 0x902120 has been added.