3

When I try to upload my program on the Arduino Uno Chinese clone, It says

 -> avrdude: ser_open(): can't open device "/dev/ttyUSB0": No such file or directory
ioctl("TIOCMGET"): Inappropriate ioctl for device
  • My Arduino Programmer: ArduinoISP
  • My Arduino Software version: 1.6.8
  • My OS: Linux Mint

Can you help me fix this error?

Greenonline
  • 2,844
  • 7
  • 31
  • 46
Abhay Bh
  • 69
  • 1
  • 2
  • 7
  • What is the serial port of your arduino? – frarugi87 May 12 '16 at 07:51
  • My Serial port is /dev/ttyUSB0 . I am using Linux Mint . – Abhay Bh May 12 '16 at 07:53
  • if you do `ls /dev/ttyUSB0` does it show something? If so, are you a member of the `dialout` group_ – frarugi87 May 12 '16 at 08:53
  • Run from a terminal: `test -w /dev/ttyUSB0 || echo Error` - if it tells you `Error` you don't have permission to access the device. If it tells you nothing then your permissions are fine. – Majenko May 12 '16 at 09:48
  • @frarugi87, when I type 'ls /dev/ttyUSB0' , it shows me a message -> /dev/ttyUSB0 – Abhay Bh May 12 '16 at 10:17
  • @Majenko , I typed your command, it shows nothing. It executes well. – Abhay Bh May 12 '16 at 10:18
  • You may have done this, but... Did you install the Linux serial port driver for the serial-port-chip on the Arduino Uno? Also, might you have more than one USB device emulating a serial port plugged into your computer? That is, do you see /dev/ttyUSB0, /dev/ttyUSB1, ... ect? – st2000 May 12 '16 at 12:29
  • "Arduino UNO chinese clone"... Also consider the possibility of your Arduino containing a counterfeit serial-port-chip (FTDI chip). There are versions of the FTDI Windows Driver that will reset counterfeit FTDI chip USB ID's to an unusable value. And other versions of the Driver that will inject extra characters (I think "COUNTERFEIT") into the serial stream. – st2000 May 12 '16 at 12:35
  • @frarugi87 Hi, I encountered the same problem and I did your command and received `No such file or directory ` answer from the terminal. However I was formerly able to run programs, even "blink". – Revolucion for Monica Sep 28 '16 at 07:33
  • @Marine1 look at the dev folder, and see if you have a ttyUSB peripheral.. – frarugi87 Sep 28 '16 at 17:27

2 Answers2

2

This could be any number of different problems. Here are several common causes:

  1. You have multiple USB serial port devices connected to your computer. Try using the command ls -l /dev/ttyUSB* to check if your computer thinks there are more than one terminal USB device. Disconnect all of them, then only connect the Arduino Uno. Then repeat the check.

  2. You do not have permissions. This is tricky to check as Linux offers a flexible but complicated root, group and user permission paradigm. You should NOT make a habit of this, but, for a quick check, you can try running the Arduino application as root and check if you can upload a sketch to the Arduino Uno.

  3. You have a counterfeit FTDI chip on your Arduino Uno that has been rendered useless by certain versions of the Windows FTDI Driver. The USB IDs can get reset to useless values. I believe the current FTDI Windows Driver no longer does this.

  4. You did not install the Linux FTDI driver. A driver is a program to abstract the hardware from the application. In this way, different hardware can be treated the same by the application, simplifying the application. However, the wrong driver/hardware combination may not work as expected.

Greenonline
  • 2,844
  • 7
  • 31
  • 46
st2000
  • 6,811
  • 2
  • 10
  • 19
  • 2
    FTDI drivers are not a separately installed item on most Linux distributions in the way they are with Windows. Generally they would only need to be manually added to a very odd Linux such as might be found on an embedded or special purpose system or a custom build from scratch - the code has been part of the kernel source effectively forever and will be built and shipped as an automatically loading module in any ordinary full-featured Linux. – Chris Stratton Sep 23 '16 at 15:10
  • Don't run arduino IDE as root to test if permissions is at fault here. Run this command instead: `sudo chown root:YOURUSERNAME /dev/ttyUSB0` to give yourself access to the tty device – ndemou Oct 20 '16 at 07:27
0

I had the same problem and solved with the suggestion of ndemou:

sudo chown root:YOURUSERNAME /dev/ttyUSB0
Greenonline
  • 2,844
  • 7
  • 31
  • 46
  • 1
    This is a bad idea, in particular on a typical dynamically configured linux with udev or similar managing /dev nodes you will have to do it every time you connect the device. Add your user to the appropriate group instead, which is a lasting fix. – Chris Stratton Oct 27 '16 at 23:00
  • @Greenonline - please don't make trivial edits of **bad** answers. – Chris Stratton Jul 02 '17 at 02:59
  • @ChrisStratton - Please, kindly refer to the [Review Queue](https://arduino.stackexchange.com/review/suggested-edits/26648). – Greenonline Jul 02 '17 at 05:10
  • That means absolutely nothing. This is a fundamentally bad answer, and that fact cannot be changed by format editing. Additionally, even if this were a good answer, your edit would be pointless. Such pointless edits waste everyone's time. Kindly desist. – Chris Stratton Jul 02 '17 at 05:19