Arduino setup for Fedora 14
Arduino IDE package is provided with Fedora 14 Release!
Install arduino package from Fedora project package repository
It's easy for us to install with "yum install".
sudo yum install arduino
Ok, we can verify the package is installed.
yum list installed arduino
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Installed Packages
arduino.noarch 0021-1.fc14 @fedora
Change group membership for the communication with Arduino
We must get the rights of lock an arduino board and communicate with it on Fedora 14. To get the rights, we must belong to lock and dialout group. The lock group is used for lock(= prevent others to use) arduino board device, and the dialout group is used for write a sketch to an arduino board.
sudo usermod -a -G lock,dialout `whoami`
id `whoami`
uid=500(user) gid=500(user) groups=500(user),0(root),54(lock),18(dialout)
Connect Arduino to USB port
Latest released Arduino Uno boards have specific vendor code(2341) and product code(0001). If we have the one, we can verify with lsusb command.
lsusb -v -d 2341:0001
Bus 004 Device 002: ID 2341:0001
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x2341
idProduct 0x0001
bcdDevice 0.00
iManufacturer 1 Arduino (www.arduino.cc)
iProduct 2 Arduino Uno
iSerial 220 64938323131351813002
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 62
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 0
CDC Header:
bcdCDC 10.01
CDC ACM:
bmCapabilities 0x06
sends break
line coding and serial state
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 255
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
If we have another old board with FTDI USB-Serial chip, try vendor code of FTDI(0403).
lsusb -d 0403:
Bus 004 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
tomcat[429]%lsusb -v -d 0403:
Bus 004 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0x6001 FT232 USB-Serial (UART) IC
bcdDevice 6.00
iManufacturer 1 FTDI
iProduct 2 FT232R USB UART
iSerial 3 A600agh5
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 90mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2 FT232R USB UART
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
Another important thing is which device represents arduino board. The driver of an Arduino Uno board is cdc_acm, so we can search device name from dmesg command output. The following example shows that the device of connected Arduino Uno board is /dev/ttyACM0.
dmesg | grep cdc_acm
[ 925.679475] cdc_acm 4-1:1.0: ttyACM0: USB ACM device
[ 925.688324] usbcore: registered new interface driver cdc_acm
[ 925.688342] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
Old arduino boards with FTDI USB-Serial chip is accessed via /dev/ttyUSBN. Following example shows that an arduino board is attached to /dev/ttyUSB0.
%dmesg | grep ttyUSB
[ 7220.754338] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0
Run arduino
Select Desktop menu "Applications - Programming - Arduino", or just type arduino from command line.
If we can see the arduino IDE, do not forget to set board type("Tools - Board") and device("Tools - Serial Port").
Note: rxtx package bug in Fedora 14
In rxtx-2.2-0.1.20100211, rxtx checks the writable permission of /var/lock,
but from Fedora 14, lock directory has been moved to /var/lock/lockdev.
Due to this bug, we may see an error message when we run arduino on terminal emulator.
That error makes us not to set board type and device.
check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
This bug is already fixed, and the upcoming rxtx package will be released soon is released on update repository.
The updated package will be newer than rxtx-2.2-0.3.20100211.fc14.
Bug 650849 - Arduino can't create lock files for accessing the serial port
We can check the version of rxtx package with yum list installed command.
yum list installed rxtx
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Installed Packages
rxtx.i686 2.2-0.1.20100211.fc13 @fedora
If we have an old copy of rxtx and installed, try to update library with yum check-update
and yum update rxtx
.
Following information is a little old, most of us have already not required.
If we cannot wait for the release of the fixed package, we can install from
Koji Web.
sudo yum update --nogpgcheck "http://kojipkgs.fedoraproject.org/packages/rxtx/
2.2/0.3.20100211.fc14/`arch`/rxtx-2.2-0.3.20100211.fc14.`arch`.rpm"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Update Process
rxtx-2.2-0.3.20100211.fc14.i686.rpm | 144 kB 00:00
Examining /var/tmp/yum-root-aH1mPE/rxtx-2.2-0.3.20100211.fc14.i686.rpm: rxtx-2.2
-0.3.20100211.fc14.i686
Marking /var/tmp/yum-root-aH1mPE/rxtx-2.2-0.3.20100211.fc14.i686.rpm as an update to rxtx-2.2-0.1.20100211.fc13.i686
Resolving Dependencies
--> Running transaction check
---> Package rxtx.i686 0:2.2-0.3.20100211.fc14 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package
Arch Version Repository Size
================================================================================
Updating:
rxtx i686 2.2-0.3.20100211.fc14 /rxtx-2.2-0.3.20100211.fc14.i686 315 k
Transaction Summary
================================================================================
Upgrade 1 Package(s)
Total size: 315 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : rxtx-2.2-0.3.20100211.fc14.i686 1/2
Cleanup : rxtx-2.2-0.1.20100211.fc13.i686 2/2
Updated:
rxtx.i686 0:2.2-0.3.20100211.fc14
Complete!
Note: arduino 0021 package and arduino Uno, avrdude
We found another information with arduino Uno on fedora 14.
Can't upload to Arduino UNO from Fedora 14
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1292104213