Unable to initialize ws281x library.

  • Hello, I am trying to compile hyperion on orangepi lite with Armbian, according to
    https://github.com/hyperion-pr…b/master/CompileHowto.txt for ws2812b LEDs 3pin (in hyperion config "type" : "ws281x", "colorOrder" : "grb").


    I tried these cmakes:

    Code
    cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_X11=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
    cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=ON ..
    cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=ON -DENABLE_WS281XPWM=ON ..


    but none of them worked after, I mean compilation finished successful, but when I run sudo /usr/bin/hyperiond /home/pi/hyperion.config.json it raises Unable to initialize ws281x library. When I added -DENABLE_WS281XPWM=ON it raises:
    whiteAlgorithm ::
    Unable to initialize ws281x library.
    terminate called after throwing an instance of 'int'


    Any idea please?

  • @penfold42 thank you. So any advice please which cmake command should I use to compile hyperion? And after that, how to define ws2812b with spi in hyperion config?


    I assume, used gpio pins stay the same as on rpi (one gnd, one for data).


    P.S. when I used all three cmake commands as I described at the top, compilation finished but I was unable to make it working even if I paste spidev0.0 to config file. It raised "Unable to initialize ws281x" error.

  • Hi again, I recompiled hyperion with the cmake from CompileHowto.txt and set ws2812spi, connectied gpio to orange pi MOSI.
    Communication with LEDs is working but:
    - i see that generated colors from v4l2 grabber are delayed (and not smooth, looks like as cpu speed issue)
    - when there is no signal (I mean black screen on usb video grabber), some leds stay white
    - initial "rainbow swirl fast" effect just flashes for a while and after that hyperion goes to v4l2 grabber processing.
    - when I stop hyperiond, first LED stays white or green
    - but remote static color/effect change is working properly



    Why this happens? When I run it or RPi with pwm, everything works properly.


    /I tried to post it to the https://hyperion-project.org/t…ion-device-type.82/page-3 but it is Locked/

  • so with level shifter is behaviour the same.
    - when I start hyperiond via cmd line , it slows down on orangepi after line "INFO: Proto server created and started on port 19445" when starting v4l2 grabber. I found out on rpi this step is very quick. It looks like it is really slowed down on opi, but no idea why (even when color changes on LEDs, it has visible "steps/chopping" when generating colors from grabber)
    It has definitely something to do with usb grabber (slower response with v4l2).

  • CPU usage is quite interesting, Via "top":
    - With usb grabber directly in v4l2-grabber in json hyperiond: Total CPU 18% (hyperiond 73%)
    - Without usb grabber hyperiond (without v4l2-grabber): Total CPU 0.3% (hyperiond 3.6%)
    - With usb grabber via hyperion-v4l2, (hyperiond runs too without v4l2-grabber in json): Total CPU 20.9% (hyperiond 23%, hyperion-v4l2 71%) - colors in this scenario works nice.


    It means, when hyperiond and hyperion-v4l2 runs in the separate cores, then it works on opi. But when v4l2-grabber runs via hyperiond in one core, performance is worse.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!