1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Error while reading data from host

Discussion in 'Software Support' started by bastianum, 20 October 2018.

  1. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    Hi together,

    I have a Pi 3 running Raspian Stretch Lite and a WS2812B LED stripe.
    I connected everything as supposed to and tested it with an external library (Strandtest.py), i guess you guys know that here. Everything works fine there.

    I then installed Hypercon, set my settings regarding the LEDs and my device and uploaded it to the Pi via SSH.

    When I then try to manually select a color in the color wheel and send it over, i get this error message:

    ssh out: hyperion-remote -c 1100ff
    ssh in: hyperion-remote:
    ssh in: version : V1.03.4 (brindosch-c750c41/dc6a602-1522918225
    ssh in: build time: Apr 5 2018 01:57:05
    ssh in: Connected to localhost:19444
    ssh in: Set color to 17 0 255
    ssh out: Error while reading data from host
    It seems as if the connection is established and works, however I have no clue what the last line means.

    Do you guys have any idea?

    Thanks in advance,

    Bastian

    Edit: No LED lights up anytime here, just when I stop it the LEDS flash up for a milisecond.
     
  2. Akriss

    Akriss Active Member

    Messages:
    355
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    I (and others Here) have found that WS2812B leds are better driven with an Arduino with this sketch. (Arduino nano clone is my choice).

    I'm not sure, however it seems that resent raspberry os's have made it a bit harder to do WS2812B bit bang timing.

    reference read: https://github.com/FastLED/FastLED/wiki/Interrupt-problems.

    Hope its of help.
     
    • Like Like x 1
  3. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    Thanks for the reply. I actually am able to get the leds working with another script, it just wont work with Hyperion. That's why I am curious, I honestly have no clue what 'Error while reading data from host' means. You think that it might work with an older Raspian image?
     
  4. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    UPDATE: I tried to manually set a color with 'hyperion-remote -c ffffff', that gives me the same error. Connection works, it needs to be a issue directly on the Hyperion process under linux..
     
  5. Akriss

    Akriss Active Member

    Messages:
    355
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    On your setup what pins are the WS2812B attached to on the pi? And the contents of hyperion.config.json?

    It's been a wile since I used the Pi's gpios to drive leds directly. Going to see if I can reproduce the issue.
     
    • Like Like x 1
  6. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    I attached an image of my setup. I used this guide: https://dordnung.de/raspberrypi-ledstrip/ws2812
    And as I said, it works perfectly with the library mentioned in the guide - however Hyperion does not work and I have no clue why.
    Thanks in advance for you help, appreciate that a lot.
     

    Attached Files:

  7. Akriss

    Akriss Active Member

    Messages:
    355
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    I've just completed a test run with success. Here's what I did.
    On a Rpi3 flashed a fresh 2018-10-09-raspbian-stretch-lite to SD card (eneabled SSH and set WIFI for headless)
    Added spidev.bufsiz=32768 to the end of /boot/cmdline.txt.
    Added core_freq=250 to /boot/config.txt
    grabbed a fresh Hypercon and installed on the Pi.
    Addached test string of 27 led's data go's to pin 10, Ground to a ground pin, Positive to a 5v positive pin
    Set my hyperion.config.json Led's to "WS281x-SPI"

    My testing is working as intended.

    I think you have may have missed a step, perhaps?

    Still, what's in your hyperion.config.json and what pins are you using?

    Edit: pin 10 is a error. it should read Gpio 10 pin 19
     
    Last edited: 23 October 2018
    • Like Like x 1
  8. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    I am using PINs 6 and 12 - my 5v LED channel is connected to an external power adapter.
    I'll upload my json.config in a minute.

    Could you maybe post me the exact hardware wise setup as an image or something so I can rebuild and test that? Seems as if our setups are different.
     
  9. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    Config attached.
     

    Attached Files:

  10. Akriss

    Akriss Active Member

    Messages:
    355
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    I have used the pins as in this photo:
    upload_2018-10-23_16-30-20.jpeg
    With the exception I did not use the "SD" pin. And I use "WS281x-SPI" as device type.

    Hope it helps.
     

    Attached Files:

    • Like Like x 1
  11. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    I'll try that, thanks a lot. I'll let you know if it worked.
    Did you connect the leds to the pi directly?
     
  12. Akriss

    Akriss Active Member

    Messages:
    355
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Yes. However my test Pi is powered from the GPIO's and not the usb. In production setup that would spell disaster as the led can draw a lot of amps and kill the Pi.

    It would be wise to remove the 5v positive pin and connect the led's directly to to 5v positive power supply.
     
    • Like Like x 1
  13. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    Yeah that's what I thought. I am kinda new to this whole pi thing honestly tho, to avoid breaking things up: How exactly do I connect the 5V external power adapter, the LED stripe and the pi together? I know that's a totally noob question but I do not want to break the pi.
    Thanks in advance!
     
  14. Akriss

    Akriss Active Member

    Messages:
    355
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    This is a good example:
    upload_2018-10-23_17-26-48.png

    Just ignore the CI (turquoise) wire.
     
    • Like Like x 1
  15. Akriss

    Akriss Active Member

    Messages:
    355
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    upload_2018-10-23_17-41-0.png

    Usb power edit edit
     
    • Like Like x 1
  16. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    Thanks man that literary works flawless!
    You saved my day. Let me know if I can help you with any other things, I definitely owe you something.
    One last thing tho: Why should I power it with the power adapter and the Micro USB as you mentioned in your 2nd post? Does that has any advantages compared to power both with the external?
     
    • Like Like x 1
  17. Akriss

    Akriss Active Member

    Messages:
    355
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    I usually have my Rpi's doing other stuff along with Hyperion. So when I'm not using the leds I can power down the led (lots of watts) power supply and the Rpi can still run off of the wall wart (little watts).
     
    • Like Like x 1
  18. Dave Bode

    Dave Bode New Member

    Messages:
    6
    Hardware:
    RPi3
    Are you still using the level shifter?
     
  19. bastianum

    bastianum New Member

    Messages:
    11
    Hardware:
    RPi3
    Hi Dave,

    no I don't. The Pi is powered over the pins as shown in the image Akriss posted.

    Bastian