Ubuntu – Arduino serial port COM1 problem

14.04arduinojavaserial port

I bought an Arduino Uno and installed Arduino IDE 1.6.5. But when I want to upload a sketch to the Arduino board I get this error:

avrdude: ser_open(): can't open device "COM1": No such file or directory
ioctl("TIOCMGET"): Inappropriate ioctl for device

I'm using Ubuntu 14.04 (Trusty Tahr) LTS.

    hakan@hakan-pc:~$ ls -l /dev/ttyUSB0
ls: /dev/ttyUSB0'e erişilemedi: Böyle bir dosya ya da dizin yok(In English: No such a file like this)

 hakan@hakan-pc:~$ ls -l /dev/ttyS0
crw-rw-rw- 1 root dialout 4, 64 Tem  8 22:40 /dev/ttyS0

While the Arduino is plugged into the computer, dmesg | tail shows:

    hakan@hakan-pc:~$ dmesg | tail
[   21.784795] sound hdaudioC1D3: hda-codec: out of range cmd 3:5:707:ffffffff
[   21.784969] sound hdaudioC1D3: hda-codec: out of range cmd 3:5:707:ffffffbf
[   21.786110] sound hdaudioC1D0: hda-codec: out of range cmd 0:5:707:ffffffff
[   21.792705] sound hdaudioC1D0: hda-codec: out of range cmd 0:5:707:ffffffff
[   26.849759] sound hdaudioC1D0: hda-codec: out of range cmd 0:5:707:ffffffbf
[   27.515096] init: Failed to spawn nvidia-persistenced main process: unable to execute: No such file or directory
[   43.647261] audit: type=1400 audit(1436384452.263:72): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=2246 comm="apparmor_parser"
[   43.647270] audit: type=1400 audit(1436384452.263:73): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=2246 comm="apparmor_parser"
[   43.647654] audit: type=1400 audit(1436384452.267:74): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=2246 comm="apparmor_parser"
[   87.513268] systemd-hostnamed[2572]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!

How can I solve this problem?

Best Answer

  1. Connect your Arduino hardware.Open Arduino IDE.

  2. Go to "Tool".

  3. Go to "Port".

  4. Select the port to which Arduino is connected.(If no other external drive is connected except Arduino,there will be only one port)

    This will tell Arduino IDE the port to which your hardware is connected. After that,you will be able to upload your sketch successfully