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

X86/64 Hyperion Server On Windows 10 With Ubuntu Bash (WSL)

Discussion in 'Software Support' started by zapoc, 28 April 2017.

Tags:
  1. zapoc

    zapoc New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi2
    Hello, I try to run hyperion on Windows from the ubuntu bash.
    I use Windows 10 insider preview 16179, in order to have access to port com.

    When I launch the Hyprion service, my led flash with the colors I indicated in the arduino sketch. This shows that the com port initializes, but I do not observe a bootsequence of hyperion (Rainbow) and the KnightRider effect does not work.

    I think Hyperion can not communicate with the arduino despite the port com reacting.

    I'm sure it's enough for it to work but I have no idea

    PS: My hyperion config json work well with my hyperion server under linux mint. The only thing I changed is the port com /dev/ttyUSB0 under Linux mint and /dev/ttyS3 under windows because my arduino is connected to port com3
     
  2. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Is there anything interesting in the Hyperion debug output ?

    Run hyperiond with --debug
     
  3. zapoc

    zapoc New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi2
    Hi penfold42

    The debug argument does not work :

    PHP:
    zapoc@DESKTOP-KVERED3:~$ hyperiond --debug
    Hyperion Ambilight Deamon 
    (60)
            
    Version   V1.03.2 (brindosch-99d9396/d3713a8-1469452981
            Build Time
    Jul 25 2016 06:54:05
    terminate called after throwing an instance of 
    'vlofgren::Parameter::ParameterRejected'
      
    what():  Bad parameter: --debug
    Abandon 
    (core dumped)
    I tried to get the log of hyperion via ssh but the ssh server of the preview insider is bugged ...
     
  4. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    My bad - that's a Hyperion.ng things

    Try running from the command line without the debug - the old Hyperion might print something
     
  5. zapoc

    zapoc New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi2
    Yop

    PHP:
    zapoc@DESKTOP-KVERED3:~$ sudo hyperiond /etc/hyperion/hyperion.config.json
    Hyperion Ambilight Deamon 
    (38)
            
    Version   V1.03.2 (brindosch-99d9396/d3713a8-1469452981
            Build Time
    Jul 25 2016 06:54:05
    INFO
    Selected configuration file: /etc/hyperion/hyperion.config.json
    HYPERION INFO
    ColorTransform 'default' => [087]
    HYPERION INFOColorCorrection 'default' => [087]
    HYPERION INFOColorAdjustment 'default' => [087]
    LEDDEVICE INFOconfiguration:
    {
            
    "colorOrder" "rgb",
            
    "delayAfterConnect" 0,
            
    "name" "PCConf",
            
    "output" "/dev/ttyS3",
            
    "rate" 115200,
            
    "type" "adalight"
    }

    Opening UART: /dev/ttyS3
    INFO
    Creating linear smoothing
    HYPERION 
    (CSINFOCreated linear-smoothing(interval_ms=40;settlingTime_ms=200;updateDelay=1
    EFFECTENGINE INFO
    27 effects loaded from directory /usr/share/hyperion/effects
    EFFECTENGINE INFO
    Initializing Python interpreter
    INFO
    Hyperion started and initialised
    INFO
    Boot sequence 'Rainbow swirl fast' EFFECTENGINE INFOrun effect Rainbow swirl fast on channel 0
    BLACKBORDER INFO
    threshold set to 0.03 (8)
    BLACKBORDER INFOmode:default
    started
    KODICHECK ERROR
    Kodi Connection error (0)
    INFOKodi checker created and started
    INFO
    Json server created and started on port 19444
    INFO
    Proto server created and started on port 19445
    FRAMEBUFFERGRABBER ERROR
    Could not get screen information
    BLACKBORDER INFO
    threshold set to 0.03 (8)
    BLACKBORDER INFOmode:default
    INFOFramebuffer grabber created and started
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format0 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format264 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format0 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format0 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format0 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format0 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format264 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format0 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format264 bits per pixel
    EFFECTENGINE INFO
    effect finished
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format0 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format264 bits per pixel
    FRAMEBUFFERGRABBER ERROR
    Unknown pixel format264 bits per pixel
     
  6. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    It doesn't complain about any serial port related stuff - I recall some discussion on the WSL GitHub page that implied it was a bit flakey.

    The logs reminded me of something else - it's unlikely that the display capture will work from within WSL. An external framegrabber was played with for windows a few months ago.

    Before we go into full on debugging with strace, what are you planning to do with Hyperion ?
     
  7. zapoc

    zapoc New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi2
    I was trying to free myself from a raspberry to use hyperion with windows. This is not practical and this still requires extra cables.

    Currently I use prismatik when I play on my windows computer but it is is less efficient than Hyperion.

    For the grabber I will use Hyperion Screencap for windows, as I do when I play on my TV here: http://zapoc.net/all/ambilight-sur-la-sortie-hdmi-du-pc-avec-hyperion/
     
  8. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Cool - you've solved the grabber issue.

    Can you disable the framegrabber inside Linux and run hyperiond under strace ?

    I want to see if Linux thinks the serial calls succeed.

    Something like:
    Strace -o /tmp/strace.txt hyperiond youconfiggile
     
  9. zapoc

    zapoc New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi2
  10. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    interesting.... your strace output doesnt show _any_ attempted writes to the serial port.

    This is the relevant bits from yours:
    Code:
    write(1, "Opening UART: /dev/ttyS3\n", 25) = 25
    open("/dev/ttyS3", O_RDWR|O_NOCTTY|O_NONBLOCK) = 6
    ioctl(6, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(6, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(6, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(6, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(6, TCFLSH, TCOFLUSH)  = 0
    ioctl(6, TCSBRK, 1)  = 0
    ioctl(6, TCFLSH, TCOFLUSH)  = 0
    
    Heres mine on a pi
    Code:
    write(1, "Opening UART: /dev/ttyUSB0\n", 27) = 27
    open("/dev/ttyUSB0", O_RDWR|O_NOCTTY|O_NONBLOCK) = 6
    ioctl(6, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(6, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(6, SNDCTL_TMR_START or SNDRV_TIMER_IOCTL_TREAD or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(6, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(6, TCFLSH, 0x1)                   = 0
    write(6, "Ada\0-x\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 144) = 144
    ioctl(6, TCSBRK, 0x1)                   = 0
    ioctl(6, TCFLSH, 0x1)                   = 0
    write(6, "Ada\0-x\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 144) = 144
    ioctl(6, TCSBRK, 0x1)                   = 0
    ioctl(6, TCFLSH, 0x1)                   = 0
    write(6, "Ada\0-x\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 144) = 144
    ioctl(6, TCSBRK, 0x1)                   = 0
    
     
  11. zapoc

    zapoc New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi2
    Ok, you have an idea?
     
  12. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Nope

    It's weird - I expect to see the write statements even if they didn't work.

    Here's the three lines that do the work every update:
    _rs232Port.flushOutput();
    _rs232Port.write(data, size);
    _rs232Port.flush();

    I can see what I think are the 2 flushes in the output in both of ours but I don't see the write.

    We migrated the serial subsystem to qtserial in Hyperion.ng - you could try that but you'll need to build from source.
     
  13. zapoc

    zapoc New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi2
    Hello,

    I compile this morning hyperion.ng. It seems that the json configuration files are different.

    I get one this error:

    Code:
    [hyperiond MAIN] <INFO> Selected configuration file: /etc/hyperion/hyperion.config.json
    [root].general: missing member
    [hyperiond MAIN] <ERROR> Hyperion Daemon aborted:
      ERROR: Json validation failed
    [hyperiond MAIN] <ERROR> Hyperion aborted:
      Hyperion::getInstance used without call of Hyperion::initInstance before
     
  14. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Yep - give it a new config file path and point you browser at http://<host>:8099

    That's one of the reasons for calling it .ng - we needed to break a lot of backward compatibility.
     
  15. John

    John New Member

    Messages:
    2
    Hardware:
    RPi2, 32/64bit, +Arduino
    Hello,

    Been following this as I am the same as zapoc. I just don't want to use a Raspberry PI or even a separate Linux system as I am running a Windows HTPC. Both versions of Hyperion run fine on Windows 10 Linux Subsystem (WSL). The issue is the handshake of the Arduino from Hyperion in WSL.

    My Arduino is connected to COM4 in Windows 10, so WSL it shows as /dev/ttyS4. The other issue is that the permissions for that device and other devices are set to root only. So, you have to change the permissions in order to use that device effectively.

    ls -la /dev/ttyS2 /dev/ttyS3 /dev/ttyS4
    crw-r----- 1 root root 4, 66 Jul 3 21:03 /dev/ttyS2 > COM2
    crw-r----- 1 root root 4, 67 Jul 3 21:03 /dev/ttyS3 > COM3
    crw-rw-rw- 1 root root 4, 68 Jul 3 21:03 /dev/ttyS4 > COM4

    Permission change back when exit BashOnWindows.

    Here is the device settings of the Arduino.
    stty -F /dev/ttyS4 -a
    speed 115200 baud; rows 0; columns 0; line = 0;
    intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = <undef>; eol = <undef>; eol2 = <undef>; swtch = <undef>;
    start = <undef>; stop = <undef>; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 0; time = 0;
    -parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
    -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
    -opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
    -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

    Then using basic cu with debugging turn on, I am able to connect to the Arduino in WSL.

    cu -l /dev/ttyS4 --debug all
    cu: fconn_open: Opening port /dev/ttyS4 (default speed)
    cu: fsserial_open: Baud rate is 115200
    cu: fconn_set: Changing setting to 0, 0, 2
    Connected.

    Here is a link to GitHub for Microsoft BashOnWindows discussing COM Port access: https://github.com/Microsoft/BashOnWindows/issues/1929
    Another link from MSDN about Serial Support on WSL: https://blogs.msdn.microsoft.com/wsl/2017/04/14/serial-support-on-the-windows-subsystem-for-linux/
     
    • Like Like x 1
  16. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
  17. John

    John New Member

    Messages:
    2
    Hardware:
    RPi2, 32/64bit, +Arduino
    @penfold42 Appears to be now working based on my copy of Windows 10 Home Insider Preview Evaluation Copy Build 16237.rs_prelease.170701-0549 that got pushed today.

    I can startup Hyperion and use external frame grabber "Hyperion Screen Capture". Kodi seems flaky when running the capture software or even both are running. Probably due hardware sources, not sure and more in depth look is needed.
     
  18. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Thanks for sharing - I thought I replied to this a few days ago - I tried the DTR one line fix, no difference on the previous build.

    Will try this latest windows build with a few different USB serial devices
     
  19. drc85

    drc85 New Member

    Messages:
    21
    very nice now i know its possible :D

    im a linux newbie lol alway get a error when i try to start it on windows ubuntu bash...
    when installing it it also gave me a error about ini.d wich also causes the problem with the start...

    Starting hyperiond... /etc/init.d/hyperion: line 37: /var/run/hyperiond.pid: Permission denied
    Ok

    i google alot i dont know how to get it to work... how didu guys got hyperion running on windows in the bash??
     
    Last edited: 7 January 2018
  20. penfold42

    penfold42 Moderator Developer

    Messages:
    742
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    USB serial devices appear to work now with later WSL builds