Cannot Get Serial Info Invalid Argument Ttyusb0

Posted onby
  1. John Deere Serial Info
  2. Ruger Single Six Serial Info

Cannot set baud rate on USB serial port for Ubuntu 12.04. When I try setting the baud rate with stty I get: $ sudo stty -F /dev/ttyUSB0 115200 stty: /dev/ttyUSB0: unable to perform all requested operations. $ sudo setserial /dev/ttyUSB0 -a Cannot get serial info: Invalid argument $ sudo setserial /dev/ttyS0 -a /dev/ttyS0, Line 0, UART.

Active3 years, 9 months ago

Recently I have been trying to learn how to program Arduino in Code::Blocks. I used the AVR project wizard to create my project. The program compiles flawlessly into a .hex file that I want to upload using avrdude. I've already looked for about an hour for a solution, but none of them that I find actually work. I am running on Ubuntu, if that is important. Here is what I get in the command line:

I am running avrdude in the directory that the .hex file is located. I looked in the Arduino IDE and the programmer is AVR ISP, the chip is ATmega168, and the port used is /dev/ttyUSB0/. I've already tried the arduino programmer option in avrdude. This is the Duemilanove board that I am using and it has an FTDI chip on it.

I am quite puzzled by this and any help would be appreciated. Thanks.

RicardoCannot Get Serial Info Invalid Argument Ttyusb0
4,44714 gold badges38 silver badges77 bronze badges

3 Answers


I think the problem is that your port is /dev/ttyUSB0 and not /dev/ttyUSB0/


This message means your operating system can't open the (virtual) serial port /dev/ttyUSB0. There are a few things to check:

  • Is the Arduino connected to your computer?
  • Do a ls /dev/ttyUSB*. Sometimes, when you disconnect and reconnect the Arduino, it gets a different name, like ttyUSB1.
8,94011 gold badges57 silver badges123 bronze badges

After a bit more trouble shooting, I found that avrdude needed the baud rate. I found this by looking at the terminal that the Arduino IDE uses while it was uploading. The baud rate needs to be set with -b 19200.


Not the answer you're looking for? Browse other questions tagged arduinoserialavrdude or ask your own question.

Viewed 491 times

I am wanted to write a module which should read/write into a Virtual serial port created by a USB serial driver viz /dev/ttyUSB0. How to achieve this? please provide some pointers.

John Deere Serial Info

11k8 gold badges49 silver badges82 bronze badges
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.

Ruger Single Six Serial Info

Browse other questions tagged linuxmoduleserial-portkernel or ask your own question.