본문 바로가기
카테고리 없음

Ubuntu Arduino Serial Port

by scinamexad1984 2020. 11. 5.


Quick tutorial shows you how to the latest Arduino IDE, so far its version 1.6.6, in all current Ubuntu releases. The open-source Arduino IDE has reached the 1.6.6 release recently with lots of changes. Mar 23, 2012  Linux ArchLinux 3.2.8-1-ARCH #1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012 x8664 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux. SOLVEDHow to find Arduino Serial Port. Is there a question there? Your dmesg seems to show an arduino at /dev/ttyACM0, so put that in the arduino config file under serial port and you should be fine.

Active4 months ago

I am running Debian 7 (Linux Crunchbang) and wanted to use The Arduino IDE to program my Arduino UNO. To do that I installed the package arduino. When I started the Arduino I was asked to add my user to the dialout group. So I did with sudo usermod -a -G dialout <my-username>.

However when I start the Arduino IDE using arduino in the commandline the IDE opens but I am not able to load my program to the Arduino. The error message is 'Serial port COM1 not found. Did you select the right one from the Tools > Serial Port menu?' And when I went to select the Serial Port, the option 'Tools > Serial Port' is greyed out.

I thought it is because I did not grant read and write permissions on my usb port (ttyACM0). So I did sudo chmod a+rw /dev/ttyACM0 but the option is still greyed out.

Braiam
3,6559 gold badges36 silver badges66 bronze badges
MoonlitMoonlit
2,10410 gold badges43 silver badges78 bronze badges

16 Answers

chdmod works for my under debian (proxmox):

For installing arduino IDE:

Add the user to dialout group:

Restart Linux.

Try with the File > Examples > 01.Basic > Blink, change the 2 delays to delay(60) and click the upload button for testing on arduino, led must blink faster. ;)

Braiam
3,6559 gold badges36 silver badges66 bronze badges
user3104260user3104260

sudo arduino is the only way I get the Arduino IDE working (serial port and upload) on ubuntu 12.04 (64)Indeed the serial port to use is /dev/ttyACM0 in my case too.The other two (ttyS4 and ttyS0) gave an error when trying to upload to Uno.Have fun

user3878345user3878345

Close all instances of the arduino IDEopen ~/.arduino/preferences.txt and look for the line:

and change it to your port:

Ubuntu 14.04 Arduino Serial Port

you may have to log out for it to take effect

chaggychaggy

Try Disconnecting the usb and plugging it back in. Its only grayed out because the ide cannot find any com ports that the uno has been plugged into.

another solution is to try all the com ports and see which one works.

finally if all fails try restarting your computer.

Ubuntu arduino can
user2375589user2375589

open $arduinoHome/arduino in text editor and modify last string:

to

(set property gnu.io.rxtx.SerialPorts to /dev/ttyACMN,where ttyACMN is name of serial port which you use)

it may temporary fix bug in rxtx library. helped me to upload sketch with arduino1.0.5 IDE.

Ubuntu Arduino Com Port

Maybe would helpful for someone.

SildSild
8532 gold badges10 silver badges19 bronze badges

In my case I solved this issue by uninstalling the version of Arduino that I installed via apt-get and instead installed via the official website.

With the latest version of Arduino I didn't have the problem described on Ubuntu 18.04.

Philip KirkbridePhilip Kirkbride
9,03127 gold badges90 silver badges159 bronze badges

In my case this turned out to be a bad USB hub.

The 'lsusb' command can be used to display all recognized devices. If the unit is not plugged in the option to set the speed will be disabled.

The lsusb command should output something like the string 'Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)' if your device is recognized. Mine was an RFDuino

Ubuntu Usb Serial Port

JayJay
11.2k3 gold badges32 silver badges60 bronze badges

install rx-tx lib for java run this command in terminal

output port

help regconize usb device

Rakibul HasanRakibul Hasan

So I did with sudo usermod -a -G dialout <my-username>.

You need to log out after you add yourself to a group so those changes are applied. Just log out and log in again and the menu should be available.

Ubuntu Ardiuno Serial Port Ttyacm0 Not Found

BraiamBraiam
3,6559 gold badges36 silver badges66 bronze badges

Same comment as Philip Kirkbride. It wasn't a permission issue, but using the Arduino IDE downloaded from their website solved my problem.Thanks!Michael

Michael OpdenackerMichael Opdenacker

The following steps install the IDE and remove the error java.lang.NullPointerException thrown while loading gnu.io.RXTXCommDriver which usually comes with arduino installed with apt-get command in Ubuntu.

Install the IDE

for removing java error in IDE

This also shows the Serial Port which was grayed out due to the error.

Zoe
16.1k12 gold badges67 silver badges98 bronze badges
Sheetal guptaSheetal gupta

For a Windows solution I've found that disabling and re-enabling the Arduino in Device Manager, then restarting the Arduino IDE does the trick without fail (no unplugging necessary). Why this error occurs in the first place is beyond me. Perhaps the corresponding method for Linux will fix your problem.

Slightly related (not really), I had an issue with an AVR board a while back which was fixed by setting the device to a new COM port in the driver settings. Again, however you linux bunnies do it, I'm sure it'll be cookies and cream.

Cheers brother,

Eddie SpaghettiEddie Spaghetti

I encountered the same issue. My solution was to install and use java7:

Select the number referring to the java-7 path.

Tones29Tones29

You probably don't have the correct permissions. Try adding yourself to these groups.

Then restart your system and check if you got added to the groups.

Good Luck!

Numbers SanNumbers San

Try to run as an administrator...Run terminal, type sudo arduino, type your root password, and... :)

JunsaJunsa

I found this question while trying to troubleshoot the same 'grayed out' port menu problem, except on a windows machine.

For anyone who finds this question in the same situation, I fixed it by right clicking and choosing 'Run as Administrator'.

funrollfunroll
26.4k7 gold badges45 silver badges54 bronze badges

protected by CommunityMay 5 '15 at 8:57

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

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

Install the Arduino Software (IDE) on Linux

This document explains how to install the Arduino Software (IDE) on Linux machines.

On this page... (hide)

  • Quick Start

Quick Start

The Linux build of the Arduino Software (IDE) is now a package that doesn't require any specific procedure for the various distributions availabe of Linux. The only relevant information is the 32 or 64 bit version of the OS.

Download the Arduino Software (IDE)

Get the latest version from the download page. You can choose between the 32, 64 and ARM versions. It is very important that you choose the right version for your Linux distro. Clicking on the chosen version brings you to the donation page and then you can either open or save the file. Please save it on your computer.


Extract the package

The file is compressed and you have to extract it in a suitable folder, remembering that it will be executed from there.


Run the install script

Open the arduino-1.6.x folder just created by the extraction process and spot the install.sh file. Right click on it and choose Run in Terminal from the contextual menu. The installation process will quickly end and you should find a new icon on your desktop.

If you don’t find the option to run the script from the contextual menu, you have to open a Terminal window and move into the arduino-1.6.x folder. Type the command ./install.sh and wait for the process to finish. You should find a new icon on your desktop.


Proceed with board-specific instructions

When the Arduino Software (IDE) is properly installed you can go back to the Getting Started Home and choose your board from the list on the right of the page.

Please Read...

It might happen that when you upload a sketch - after you have selected your board and the serial port -, you get an error Error opening serial port ... If you get this error, you need to set serial port permission.

Open Terminal and type:

ls -l /dev/ttyACM*

you will get something like:

crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyACM0

The '0' at the end of ACM might be a different number, or multiple entries might be returned. The data we need is 'dialout' (is the group owner of the file).

Now we just need to add our user to the group:

sudo usermod -a -G dialout <username>

where <username> is your Linux user name. You will need to log out and log in again for this change to take effect.

This is the procedure to access the serial port from the Arduino Software (IDE) if you get an error

After this procedure, you should be able to proceed normally and upload the sketch to your board or use the Serial Monitor.


Last revision 2016/08/10 by SM



The text of the Arduino getting started guide is licensed under aCreative Commons Attribution-ShareAlike 3.0 License. Code samples in the guide are released into the public domain.