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

BUG Unable to open RS232 device (IO Exception (2): No such file or directory, file

Discussion in 'Bug Reports' started by caveman, 29 September 2017.

  1. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Error in log.
    ----
    Unable to open RS232 device (IO Exception (2): No such file or directory, file /home/sascha/hyperion/dependencies/build/serial/src/impl/unix.cc, line 100.)
    ----

    Hardware;
    RPi-3
    Arduino UNO
    LEDs WS2812B

    Essentially using this setup from 'The Mad Scientist' from YouTube regarding any configuration questions.


    OSMC installed and running.
    OSMC Wifi configured and connected. Verified on network configuration also.
    KODI running.

    Appears to connect based on network configuration. I had also tested with an incorrect IP as well and it indicated a failure as expected so does not appear to be a connection issue.
    Also tested different USB ports on the RPi. No difference.

    Get Log indicates error listed.
    No error if I just [Send Config]. Does not appear to do anything or end any operation/function. Unsure if it does indicate a complete of the action.

    PDF of HyperCon configuration attached.

    FYI - LEDs do work. Tested direct from Arduino example sketches.
     

    Attached Files:

  2. Akriss

    Akriss Member

    Messages:
    144
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino
    If the Arduino UNO is not seen on /dev/ttyUSB0, try and change it to /dev/ttyACM0.

    Hope it helps.
     
  3. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    No. That didn't work.
    The log still indicates an error for /dev/ttyUSB0
    The configuration jcon file indicates the change /dev/ttyACM0.

    Looks like HyperCon is not identifying the correct configuration file even though it was identified using [Local Config Path]. Unless I am reading the error incorrectly.
    Or does this error indicate a problem at the USB port on the RPi?
    I have changed ports also to test that as well.

    Current error;
    ----
    Opening UART: /dev/ttyUSB0
    Unable to open RS232 device (IO Exception (2): No such file or directory, file /home/sascha/hyperion/dependencies/build/serial/src/impl/unix.cc, line 100.)
    ----

    Current loaded configuration on SSH panel;
    ----
    "device" :
    {
    "name" : "MyHyperionConfig",
    "type" : "adalight",
    "output" : "/dev/ttyACM0",
    "rate" : 500000,
    "delayAfterConnect" : 0,
    "colorOrder" : "rgb"
    },
    ----
     
  4. Akriss

    Akriss Member

    Messages:
    144
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino
    Is your OSMC updated? if not do the below from a ssh login.
    sudo apt-get update
    sudo apt-get dist-upgrade

    I ask because I ran a test install on a tester Rpi 3, installed OSMC and Hypercon all went well. Granted I did not actually use any leds on the Rpi. However all tests went well After updating OSMC.
     
  5. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    No luck.
    OSMC was May 2016 and is now August 2017.

    Going to try updating HyperCon now to see if that helps since the original configuration was from last year.
     
  6. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Looks like I have the latest version of HyperCon V1.03.1 from 11.06.2016.
    Still get the error.
     
  7. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Rebooted RPi3.
    Reconfigured HyperCon.
    Saved config.
    Connect to SSH.
    Message in Get Log.

    ----
    KODICHECK ERROR: Kodi Connection error (0)
    ----

    And
    ----
    PROTOCONNECTION INFO: No connection to Hyperion: 127.0.0.1:19447
    ----

    I still don't know if anything is being uploaded.
    Is there a completion statement in HyperCon logging?
     
  8. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Restarted everything and now back to the /dev/ttyUSB0 message.
    Not sure where this is coming from. The latest config is for /dev/ttyACM0.
     
  9. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Updated operations seems to resolve the USB error and configuration upload, but LEDs are not functioning.

    - Open Hypercon
    - Validate Device settings
    - Save settings and Config again
    - Open SSH tab
    - Connect
    - Show Traffic - shows connected
    - Stop Hypercon
    - GetLog shows no error but is stopped
    - Set local config file
    - Send Config
    - <no message regarding completion. assuming uploaded>
    - Start Hypercon
    - Get Log (indicates the most recent config settings being displayed)
    - LEDs are not displaying
     
  10. Akriss

    Akriss Member

    Messages:
    144
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino
    I did another test on a Working Rpi3 setup, with led's and a Arduino Nano (Nano is on ttyUSB0). I had no problems.

    That said, this is what I did:
    Got a fresh Osmc image (http://download.osmc.tv/installers/diskimages/OSMC_TGT_rbp2_20170803.img.gz) and flashed the SD. Then I did the basic OSMC setup. And within OSMC interface I preformed a manual update, It took a wile to update.
    After the update I ran HyperCon and installed Hyperion. It rebooted. Then I uploaded my (known working) config and rebooted.

    Everything worked as expected. I saw boot effects, I was able to control LED's via the App.

    So I'm not sure, Sorry.
    However, I would recheck the wiring, re-flash your UNO with (https://github.com/hyperion-project...assets/firmware/arduino/adalight/adalight.ino) And Edit it to your needs.
     
    • Like Like x 1
  11. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Still no luck with Hyperion. Does not seem to like the USB ports on the RPi3.

    LEDs work fine straight from UNO running test scripts. UNO and LEDs are not the failure.
    Starting everything up the LEDs run the initial startup sequence and light up as expected.
    Seems to be some type of block between HyperCon and RPi3 USB since that is the error stated.

    Built from scratch.
    New OSMC image.
    Configured HyperCon based on new IP connection.
    Installed Hyperion - No reboot occurred for me.
    Connect HyperCon
    Stop Hyperion
    Set Local Config Path
    Send Config
    Start Hyperion
    Get log

    Still shows USB error.

    -----
    ssh in: Oct 01 18:35:41 osmc systemd[1]: Stopping Hyperion Systemd service...
    ssh in: Oct 01 18:35:41 osmc hyperiond[637]: INFO: Application closed with code 0
    ssh in: Oct 01 18:35:41 osmc hyperiond[637]: V4L2GRABBER INFO: stopped
    ssh in: Oct 01 18:35:41 osmc hyperiond[637]: EFFECTENGINE INFO: Cleaning up Python interpreter
    ssh in: Oct 01 18:35:41 osmc systemd[1]: Stopped Hyperion Systemd service.
    ssh in: Oct 01 18:35:42 osmc systemd[1]: Starting Hyperion Systemd service...
    ssh in: Oct 01 18:35:42 osmc systemd[1]: Started Hyperion Systemd service.
    ssh in: Oct 01 18:35:42 osmc hyperiond[660]: Hyperion Ambilight Deamon (660)
    ssh in: Oct 01 18:35:42 osmc hyperiond[660]: Version : V1.03.3 (brindosch-2fbbcff/2f01dfa-1495880388
    ssh in: Oct 01 18:35:42 osmc hyperiond[660]: Build Time: Jun 3 2017 02:06:37
    ssh in: Oct 01 18:35:42 osmc hyperiond[660]: INFO: Selected configuration file: /etc/hyperion/hyperion.config.json
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: HYPERION INFO: ColorTransform 'default' => [0; 127]
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: HYPERION INFO: ColorCorrection 'default' => [0; 127]
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: HYPERION INFO: ColorAdjustment 'default' => [0; 127]
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: LEDDEVICE INFO: configuration:
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: {
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: "colorOrder" : "rgb",
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: "delayAfterConnect" : 0,
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: "name" : "MyHyperionConfig",
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: "output" : "/dev/ttyUSB0",
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: "rate" : 500000,
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: "type" : "adalight"
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: }
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: Opening UART: /dev/ttyUSB0
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: Unable to open RS232 device (IO Exception (2): No such file or directory, file /home/sascha/hyperion/dependencies/build/serial/src/impl/unix.cc, line 100.)
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: HYPERION INFO: Json forward to 127.0.0.1:19446
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: HYPERION INFO: Proto forward to 127.0.0.1:19447
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: INFO: Creating linear smoothing
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: EFFECTENGINE INFO: 27 effects loaded from directory /usr/share/hyperion/effects
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: EFFECTENGINE INFO: Initializing Python interpreter
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: INFO: Hyperion started and initialised
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: INFO: Kodi checker created and started
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: INFO: Json server created and started on port 19444
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: PROTOCONNECTION INFO: Connecting to Hyperion: 127.0.0.1:19447
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: INFO: Proto server created and started on port 19445
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: V4L2GRABBER INFO: width=720 height=480
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: V4L2GRABBER INFO: pixel format=YUYV
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: BLACKBORDER INFO: mode:default
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: V4L2GRABBER INFO: signal threshold set to: {0,0,0}
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: V4L2GRABBER INFO: started
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: INFO: V4L2 grabber created and started
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: Opening UART: /dev/ttyUSB0
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: Unable to open RS232 device (IO Exception (2): No such file or directory, file /home/sascha/hyperion/dependencies/build/serial/src/impl/unix.cc, line 100.)
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: Device blocked for 3000 ms
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: KODICHECK ERROR: Kodi Connection error (0)
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: BORDER SWITCH REQUIRED!!
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0
    -----
     
  12. Akriss

    Akriss Member

    Messages:
    144
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino
    What sketch are you uploading to the Uno, and what is the "serialRate" in the sketch set at?
    From the log above I see your config is set for "("rate" : 500000,)"

    The "serialRate" in the sketch should match the "rate" in the "hyperion.config.json" file.

    If they do match try a lower rate. start at 115200, and work up if it works, till it doesn't
     
  13. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    OK. Yes. The rate is correct in the sketch and in HyperCon. I will test other rates just to validate, but not sure what rate value has to do with the USB port not being identified. This seems like a separate issue related to the IO of the RPi3.
     
  14. Akriss

    Akriss Member

    Messages:
    144
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino
    Can you log in to OSMC via SSH and run this command ( dmesg | grep "tty" ) once with the Uno Not attached, and once with the Uno attached?

    Preferable in this order Boot Rpi With Out Uno. Log in SSH and run command. Then plug in the Uno and run command.

    And please post the results of both.
     
  15. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Changing rate did not seem to do anything.
    The LEDs still initialize on startup of Hyperion, but do not do anything when movie is playing.

    Command based on RPi3 only.
    ----
    osmc@osmc:~$ dmesg | grep "tty"
    [ 0.000274] console [tty0] enabled
    [ 1.333148] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
    ----

    Command based on RPi3 and UNO.
    ----
    osmc@osmc:~$ dmesg | grep "tty"
    [ 0.000274] console [tty0] enabled
    [ 1.333148] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
    [ 308.557234] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
    ----

    Noticing the 'ttyACMO' I changed my sketch and reloaded it on the UNO.
    I then reloaded my configuration for Hyperion and received the same results.
    The LEDs initialize for 3 seconds and then turn off and do not identify anything on the screen afterwards.

    I've tried 2 OSMC configurations on the same RPi3 with all the previous configuration information.

    I see a lot of issues for the errors identified, but do not see any solution related to my case.
    ----
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: KODICHECK ERROR: Kodi Connection error (0)
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: BORDER SWITCH REQUIRED!!
    ssh in: Oct 01 18:35:43 osmc hyperiond[660]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0
    ----
     
  16. Akriss

    Akriss Member

    Messages:
    144
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino
    Your Uno is on ttyAMA0.
    Not ttyUSB0 or ttyACM0.
     
  17. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Sorry. Yes. I tested ttyAMA0.
    The result was as stated previously. Only the LED initialization occurred. Playing a movie shows no result.
     
  18. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Shut everything down and restarted.
    Now I no longer see the KODI connection error. Now KODI is connected.

    ----
    KODICHECK ERROR: Kodi Connection error (0)
    KODICHECK INFO: Kodi Connected
    KODICHECK INFO: switching to MENU mode
    BORDER SWITCH REQUIRED!!
    CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0
    ----
     
  19. caveman

    caveman New Member

    Messages:
    18
    Hardware:
    RPi3, +Arduino
    Completely rebuilt.
    New OSMC.
    Configured video drive connection.
    Installed latest Hyperion.
    Sent my config with HyperCon connection. Shows no errors like the most recent report.
    Just the initialization of the LEDs.
    Then nothing no matter the video source.
    I performed a manual reboot as it does not reboot after install of Hyperion.

    Don't know what I am missing.

    ----
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: Hyperion Ambilight Deamon (844)
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: Version : V1.03.3 (brindosch-2fbbcff/2f01dfa-1495880388
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: Build Time: Jun 3 2017 02:06:37
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: INFO: Selected configuration file: /etc/hyperion/hyperion.config.json
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: HYPERION INFO: ColorTransform 'default' => [0; 127]
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: HYPERION INFO: ColorCorrection 'default' => [0; 127]
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: HYPERION INFO: ColorAdjustment 'default' => [0; 127]
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: LEDDEVICE INFO: configuration:
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: {
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: "colorOrder" : "rgb",
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: "delayAfterConnect" : 0,
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: "name" : "MyHyperionConfig",
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: "output" : "/dev/ttyAMA0",
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: "rate" : 115200,
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: "type" : "adalight"
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: }
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: Opening UART: /dev/ttyAMA0
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: HYPERION INFO: Json forward to 127.0.0.1:19446
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: HYPERION INFO: Proto forward to 127.0.0.1:19447
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: INFO: Creating linear smoothing
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: EFFECTENGINE INFO: 27 effects loaded from directory /usr/share/hyperion/effects
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: EFFECTENGINE INFO: Initializing Python interpreter
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: INFO: Hyperion started and initialised
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: INFO: Kodi checker created and started
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: INFO: Json server created and started on port 19444
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: PROTOCONNECTION INFO: Connecting to Hyperion: 127.0.0.1:19447
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: INFO: Proto server created and started on port 19445
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: V4L2GRABBER INFO: width=720 height=480
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: V4L2GRABBER INFO: pixel format=YUYV
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: BLACKBORDER INFO: mode:default
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: V4L2GRABBER INFO: signal threshold set to: {0,0,0}
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: V4L2GRABBER INFO: started
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: INFO: V4L2 grabber created and started
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: KODICHECK INFO: Kodi Connected
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: KODICHECK INFO: switching to VIDEO mode
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: BORDER SWITCH REQUIRED!!
    ssh in: Oct 13 19:33:42 osmc hyperiond[844]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0
    ----
     
  20. penfold42

    penfold42 Moderator Developer

    Messages:
    643
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    You don't want /dev/ttyAMA0 - this is the onboard serial port on the gpio headers.

    /dev/ttyACM0 looks to be your USB device from your dmesg.
    I notice you're using 115200 in Hyperion - this is good. Has the arduino sketch been configured to also use 115200 ?

    I've seen some doubt or confusion over which config is launched by hypercon.
    Personally I'd be hand editing the config on the Pi and launching hyperiond directly from a terminal