2

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?

closed as too broad by Chris Stratton, Enric Blanco, Greenonline, gre_gor, Code Gorilla Jul 3 '17 at 7:28

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What is the serial port of your arduino? – frarugi87 May 12 '16 at 7:51
  • My Serial port is /dev/ttyUSB0 . I am using Linux Mint . – Abhay Bh May 12 '16 at 7: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 8: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 9:48
  • @frarugi87, when I type 'ls /dev/ttyUSB0' , it shows me a message -> /dev/ttyUSB0 – Abhay Bh May 12 '16 at 10:17
1

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.

  • 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 7:27
-1

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

sudo chown root:YOURUSERNAME /dev/ttyUSB0
  • 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 2 '17 at 2:59
  • @ChrisStratton - Please, kindly refer to the Review Queue. – Greenonline Jul 2 '17 at 5: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 2 '17 at 5:19

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