Results 1 to 9 of 9

Thread: Could not open serial device /dev/ttyUSB0!

  1. #1
    Join Date
    May 2015
    Beans
    5

    Could not open serial device /dev/ttyUSB0!

    I am using ubundu 12.04, try to do Serial communication between arduino micro board and PC .I have checked that I'm a member of dialout group. so the error is like this : ]
    [ WARN] [1431454109.213692440]: Service call for exploration service failed
    [ WARN] [1431454113.213491338]: Service call for exploration service failed
    [ WARN] [1431454117.213380953]: Service call for exploration service failed
    [ WARN] [1431454121.213427291]: Service call for exploration service failed
    ^CRos shutdown, proceeding to close the gui.
    acsc_nuc@localhost:~/catkin_ws/src/flight/src$ rosrun flight flight
    serialInit: Could not open serial device /dev/ttyUSB0!
    Problem starting com port!
    [ WARN] [1431454141.480160012]: Service call for exploration service failed
    [ WARN] [1431454145.479981666]: Service call for exploration service failed
    [ WARN] [1431454149.479896392]: Service call for exploration service failed
    service failed Help ,thanks.
    Last edited by FU_NA; May 12th, 2015 at 11:27 AM.

  2. #2
    Join Date
    Jun 2006
    Location
    Nux Jam
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Could not open serial device /dev/ttyUSB0!

    how have you made the installation ?
    http://forum.arduino.cc/index.php?topic=259351.0

  3. #3
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,047
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Could not open serial device /dev/ttyUSB0!

    You can install setserial and get some information about your serial port:

    Code:
    sudo apt-get install setserial
    Then you can query the serial port to see what settings it is set to.

    tgalati4@Mint17 ~ $ setserial -a /dev/ttyS0
    /dev/ttyS0, Line 0, UART: unknown, Port: 0x03f8, IRQ: 4
    Baud_base: 115200, close_delay: 50, divisor: 0
    closing_wait: 3000
    Flags: spd_normal skip_test
    It helps to have the Arduino IDE serial settings match what your hardware serial port is set to.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  4. #4
    Join Date
    May 2015
    Beans
    5

    Re: Could not open serial device /dev/ttyUSB0!

    Quote Originally Posted by tgalati4 View Post
    You can install setserial and get some information about your serial port:

    Code:
    sudo apt-get install setserial
    Then you can query the serial port to see what settings it is set to.



    It helps to have the Arduino IDE serial settings match what your hardware serial port is set to.
    I can run the code when using arduino IDE ,which means that my serial port is connected.
    However, when I try to run some files at terminal, it gives me this problem .

  5. #5
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,047
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Could not open serial device /dev/ttyUSB0!

    Post your interrupts:

    Code:
    cat /proc/interrupts
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  6. #6
    Join Date
    May 2015
    Beans
    5

    Re: Could not open serial device /dev/ttyUSB0!

    Quote Originally Posted by tgalati4 View Post
    Post your interrupts:

    Code:
    cat /proc/interrupts
    Have a look at the attached image.
    Attached Images Attached Images
    Last edited by FU_NA; May 13th, 2015 at 07:45 AM.

  7. #7
    Join Date
    May 2015
    Beans
    5

    Re: Could not open serial device /dev/ttyUSB0!

    Quote Originally Posted by tgalati4 View Post
    Post your interrupts:

    Code:
    cat /proc/interrupts
    By the way, I realize that the serial port at arduino IDE is called "/dev/ttyACM0",which is different from the name given at the terminal "/dev/ttyUSB0!".

  8. #8
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    9,407

    Re: Could not open serial device /dev/ttyUSB0!

    Well, first you got to be sure about the name of the device. There are two ways to get it:
    $ dmesg
    Plug it in
    $ dmesg
    See what USB related message you get.

    You can also check the /dev directory:
    $ ls /dev/tty*


    USB serial devices are usually /dev/ttyUSBx, but some devices such as those by Moxa, may have different names.

  9. #9
    Join Date
    May 2015
    Beans
    5

    Re: Could not open serial device /dev/ttyUSB0!

    Quote Originally Posted by HermanAB View Post
    Well, first you got to be sure about the name of the device. There are two ways to get it: $ dmesg Plug it in $ dmesg See what USB related message you get. You can also check the /dev directory: $ ls /dev/tty* USB serial devices are usually /dev/ttyUSBx, but some devices such as those by Moxa, may have different names.
    So does it mean that my device is ls /dev/ttyACM0???
    Attached Images Attached Images

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •