Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It’s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board.
Unfortunately the serial port communication driver (RXTX) which comes with the arduino download is not 64 bit compatible. I will describe here how I successfully compiled & installed the driver to get the Arduino IDE running on a 64 bit openSUSE installation. Most of the instructions should be pretty straight forward to be replicated on an other rpm based distribution. For ubuntu/debain based distributions, you can find the instructions provided by Tero Karvinen useful.
Packages Required for Arduino IDE
The following packages are required to run the Arduino IDE:
Linux USB Serial Converter Driver
Besides the above software, you will also need a compatible kernel. This means version 2.6.x or at least 2.4.30. For example, it needs USB serial support with the FTDI driver. After connecting an Arduino board to your computer via an AB USB cable, it should load the ftdi modules automatically. Ensure ftdi_sio and usbserial modules are loaded by executing:
lsmod | grep ftdi
It should return output similar to whats shown below:
ftdi_sio 54280 0 usbserial 52688 1 ftdi_sio usbcore 156456 6 ftdi_sio,usbserial,usbhid,ohci_hcd,ehci_hcd
If not, as root, run:
If there are no errors from the above command, then the module is loaded successfully.
The Arduino IDE is java based and RXTX  is a native java library providing serial and parallel communication for the Java Development Toolkit. The RXTX lib uses lock files by default. So Before you use lock files you need to do one of two things:
- Be the root or uucp user on your machine whenever you use rxtx
- Or add the specific user that needs to use rxtx to the group uucp. (preferred)
Add your user account to the uucp group by going to yast2 > Security and Users > User Management. Once you have added yourself to the group, you will need to restart your session to make it affective. Once you are in the new session, verify that your account belongs to the uucp group by executing “groups” on the shell. It should give return you a list of groups your account belongs to.
Packages required for building rxtx-java
- gnu make
- jdk > 1.3 or java-1_5_0-sun-devel
- checkinstall (optional)
After installing the necessary libraries, you can download and start building the library with the following commands:
Once the libraries are built, you can install them by following either one of the following two methods:
- Build an RPM package with the help of checkinstall
- Copy the libs to the arduino libs folder.
If you are opting for the checkinstall method, I suggest to name the package rxtx-java. You can then install the package using normal rpm commands. Once you have done that, you need to determine the path to the libraries. Execute the following to obtain the Path to the rxtx libraries:
rpm -ql librxtx-java | grep RXTXcomm.jar /usr/java/jdk1.5.0_06/jre/lib/ext/RXTXcomm.jar
We will now remember to add the path (‘/usr/java/jdk1.5.0_06/jre/’) to the arduino bootstrap script.
To install the libraries the second way, you can copy the compiled RXTXcomm.jar and librxtxSerial.so files to the arduino lib directory. The libs are built and placed into “x86_64-unknown-linux-gnu/.libs/” folder while the jar file should be in the same folder you are in.
Setting up the Arduino IDE
Download and untar the Arduino IDE from Arduino Software page
wget http://www.arduino.cc/files/arduino-0010-linux.tgz && \ tar -xvzf arduino-0010-linux.tgz
In the arduino/tools directory, make symlinks:
ln -s /opt/cross/bin/avr-gcc avr-gcc && \ ln -s /opt/cross/bin/avr-g++ avr-g++ && \ ln -s /opt/cross/bin/avr-objcopy avr-objcopy && \ ln -s /opt/cross/bin/avr-objdump avr-objdump && \ ln -s /opt/cross/bin/avr-size avr-size
Copy the compiled RxTx-java libray into the arduino-0010/lib folder. Before doing so rename the existing libraries.
mv librxtxSerial.so librxtxSerial.so.DISABLED
mv RXTXcomm.jar RXTXcomm.jar.DISABLED
Now copy the freshly compiled rxtx libraries into this folder
cp ../../rxtx-2.1-7r2/x86_64-unknown-linux-gnu/.libs/librxtxSerial.so .
cp ../../rxtx-2.1-7r2/RXTXcomm.jar .
Once you have copied the library and jar file, you are ready to execute the arduino bootstrap script to launch the Arduino IDE.
./arduino Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7
The Arduino IDE
- serproxy: http://www.lspace.nildram.co.uk/freeware.html
- ser2net: http://ser2net.sourceforge.net
- Java Comm Serial API How-To for Linux: http://wass.homelinux.net/howtos/Comm_How-To.shtml