Support for Raspberry Pi 5 ws2812-pio (/dev/leds0)

  • I’m a new Hyperion user on a Raspberry Pi 5 (LibreELEC) with an SK6812 RGBW strip.

    On the Pi 5 the provided ws281x driver doesn’t work (This came by on this forum too). Hyperion gives:

    Code
    Device disabled, device 'ws281x' signals error:
    Failed to open. Hardware revision is not supported

    That makes sense—the Pi 5 removed the old DMA/PWM path that the ws281x backend relied on. What does work, is the newer ws2812-pio overlay.

    I enabled the kernel overlay:

    Code
    dtoverlay=ws2812-pio,gpio=18,num_leds=210,rgbw

    The kernel creates this device:

    Code
    /dev/leds0

    I can write RGBW data to it manually and the LEDs work fine:

    Code
    for i in $(seq 210); do printf "\xFF\xFF\xFF\xFF"; done | dd of=/dev/leds0 bs=4

    So the kernel side is working.

    What happens in Hyperion

    I had an idea, and set the LED device to “file” and point it at /dev/leds0, Hyperion does send data and the LEDs turns on. But I cannot define WLED and remote control doesn't work (Tyring to change colour) It looks like using the generic file output for continuous LED updates isn’t a good solution.

    Request

    Would it be possible to add proper support in Hyperion for the Pi 5 PIO LED device (/dev/leds0)?

    A dedicated backend would avoid the issues seen when using the “file” device and would let Raspberry Pi 5 + SK6812 users drive LED strips normally again.


    Environment details:

    • Raspberry Pi

    • Kernel: Linux kodi 6.12.56

    • LibreELEC

    • SK6812 RGBW

    • GPIO 18

    • Device: /dev/leds0

    If you need any additional logs or testing, I can provide them.

  • Thanks Ambient_theater77 !


    Indeed have a levelshifter, and reading up on SPI, I moved the data cable to GPIO10. (my strip doesn't have a CLK like you linked here, only 5V, data, GND)

    Added 'dtparam=spi=on' to config.txt (this enabled /dev/spidev0.0 /dev/spidev0.1 after boot)

    I tried just now but I can't get the strip to light up yet.

    Config as attached.


    Any insights would be appreciated!

    • New
    • Official Post

    But I cannot define WLED and remote control doesn't work (Tyring to change colour) It looks like using the generic file output for continuous LED updates isn’t a good solution

    While you explore other options,

    I do not full get why WLED and remote-control interplay with the file output?

    If you want running WLED next to file output, create an additional command instance,


    If both run into errors share those and we explore the root cause…

  • Thanks for the insights Lord-Grey . I'm new to this. My situation is now (with GND connected):


    1. Connect data cable to GPIO18 (GPIO_GEN1), and I can manipulate colors with /dev/leds0:

    Code
    for i in $(seq 210); do printf "\xFF\xFF\xFF\xFF"; done | dd of=/dev/leds0 bs=4

    this is where my idea came from to manipulate /dev/leds0 as a file. But I think you can ignore my comment, as I wasn't aware there exists a SK6812spi.


    2. I wasn't aware of SPI. So using the comment of Ambient_theater77, I researched a bit and understand that I connect data cable to GPIO10 SPI_MOSI and enable SPI in config. I point it at /dev/spidev0.0 and setup SK6812spi in Hyperion.NG. In this situation, I don't know how to test. At least the LED strip doesn't light up when I use remote control. I feel like I'm very close. (logs attached)



    Thank you for this fantastic project!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!