Setup Arduino on CentOS 7

Posted: October 2, 2014 in Arduino, FX Pipeline

Setup Arduino on CentOS 7

arduino centos 02_com arduino centos 04_com arduino centos 06_com

Here I will Show you how you can start your Arduino on Linux CentOS 7.

First you need following:

1. Arduino device

2. USB Cable for Arduino

3. Arduino IDE – Free download from :

The RXTX that comes with Arduino was modified to support devices of the form /dev/ttyACM*, which are used by the Arduino Uno and Mega 2560 boards (which use an ATmega8U2 instead of an FTDI chip for USB-serial communication)
The RXTX library requires that you specify the serial ports.
Arduino’s (and other USB-serial devices) end up as /dev/ttyUSB# or /dev/ttyACM#.

when you start Arduino IDE first time you may see this error when upload code to device:

error message is: Serial port COM1 not found. Did you select the right one from the Tools > Serial Port menu?

And when you go to select the Serial Port, the option Tools > Serial Port is greyed out

So lets Fix this Error and start your Ardunio on CentOS 7

Plug your arduino, then from terminal:

# dmesg | tail
you will see something like (for arduino < UNO):
[rsharma@localhost ~]$ dmesg | tail
[ 1373.684427] wlo1: associate with 48:f8:b3:23:7c:b1 (try 1/3)
[ 1373.688116] wlo1: RX AssocResp from 48:f8:b3:23:7c:b1 (capab=0x411 status=0 aid=3)
[ 1373.691558] wlo1: associated
[ 1373.691583] IPv6: ADDRCONF(NETDEV_CHANGE): wlo1: link becomes ready
[ 2221.667753] usb 2-1.1: new full-speed USB device number 8 using ehci-pci
[ 2221.756669] usb 2-1.1: New USB device found, idVendor=2341, idProduct=0043
[ 2221.756682] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 2221.756688] usb 2-1.1: Manufacturer: Arduino (
[ 2221.756693] usb 2-1.1: SerialNumber: 95237323934351606171
[ 2221.757248] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
[rsharma@localhost ~]$
# lsusb
the output will be similar to this:
[rsharma@localhost ~]$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 138a:003c Validity Sensors, Inc. VFS471 Fingerprint Reader
Bus 002 Device 004: ID 04f2:b230 Chicony Electronics Co., Ltd Integrated HP HD Webcam
look for arduino or FTDI(if prior arduino UNO) write the two 4 digit ID: they are like 093a:2510
093a is the vendor ID
2510 is the product ID
# cd /etc/udev/rules.d/
# gedit 99-arduino.rules

// Add following lines in arduino rules file

for UNO
SUBSYSTEMS==”usb”, ATTRS{idProduct}==”XXXX”, ATTRS{idVendor}==”YYYY”, SYMLINK+=”ttyACM%n”
the others:
SUBSYSTEMS==”usb”, ATTRS{idProduct}==”XXXX”, ATTRS{idVendor}==”YYYY”, SYMLINK+=”ttyUSB%n”
# udevadm control –reload
reboot the system


// Add user in Groups

# usermod -a -G uucp rsharma

# usermod -a -G lock rsharma

# usermod -a -G dialup rsharma

# ls -ld /run/lock

# cp /usr/lib/tmpfiles.d/legacy.conf /etc/tmpfiles.d/

# gedit /etc/tmpfiles.d/legacy.conf

change “d /run/lock 0775 root root – ” = to>>  “d /run/lock 0775 root lock – ”

# chmod o+rwx /run/lock

# ls -ld /var/lock

# chmod o+rwx /var/lock

Now Unplug and plug the Arduino device and Restart arduion IDE.

and you can see now Tools > Serial Port menu is activated.

just take a Quick test with your Device

// Copy this code in your IDE and upload to Micro controller

void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);

// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
delay(1000);              // wait for a second
digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
delay(1000);              // wait for a second


  1. CfrancCyrille says:

    Hello, very useful note 🙂
    In my case i add the line :

    KERNEL==”ttyACM[0-9]*”, MODE=”0666″

    to my arduino.rules file. And it’s work for the moment…

    Another remark, th command line :
    # usermod -a -G dialup rsharma
    does not work for me (the group does not exist), i use :
    # usermod -a -G dialout rsharma

    Good job, thanks.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s