<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fernandez de Quilon &#187; rxtx</title>
	<atom:link href="http://www.jefferyfernandez.id.au/tag/rxtx/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jefferyfernandez.id.au</link>
	<description>between flat screens and grey matter</description>
	<lastBuildDate>Thu, 04 Aug 2011 23:01:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3-aortic-dissection</generator>
		<item>
		<title>Arduino IDE on 64bit openSUSE</title>
		<link>http://www.jefferyfernandez.id.au/2008/04/21/arduino-ide-on-64bit-opensuse/</link>
		<comments>http://www.jefferyfernandez.id.au/2008/04/21/arduino-ide-on-64bit-opensuse/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 23:34:12 +0000</pubDate>
		<dc:creator>Jeffery</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openSuSe]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[ftdi]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[rxtx]]></category>
		<category><![CDATA[ser2net]]></category>
		<category><![CDATA[usbserial]]></category>

		<guid isPermaLink="false">http://www.jefferyfernandez.id.au/?p=69</guid>
		<description><![CDATA[Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It&#8217;s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software &#8230; <a href="http://www.jefferyfernandez.id.au/2008/04/21/arduino-ide-on-64bit-opensuse/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="Arduino" href="http://www.arduino.cc/" target="_blank"><img class="align-left alignleft" style="float: left;" title="Arduino Board" src="http://www.jefferyfernandez.id.au/wp-content/uploads/2008/02/arduino.jpg" alt="Arduino Board" width="200" height="139" />Arduino</a> is a tool for making computers that can sense and control more of the physical world than your desktop computer. It&#8217;s an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board.</p>
<p>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 &amp; 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 <a title="Arduino IDE on 64 bit Ubuntu Gutsy" href="http://myy.helia.fi/~karte/arduino_editor_on_64_bit_ubuntu_gutsy.html" target="_blank">instructions provided by Tero Karvinen</a> useful.</p>
<h3>Packages Required for Arduino IDE</h3>
<p>The following packages are required to run the Arduino IDE:</p>
<ul>
<li> java-1_5_0-sun</li>
<li> cross-avr-gcc</li>
<li> cross-avr-binutils</li>
<li> avr-libc</li>
</ul>
<h3>Linux USB Serial Converter Driver</h3>
<p>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 <a title="Future Technology Devices International" href="http://ftdi-usb-sio.sourceforge.net/" target="_blank">FTDI</a> driver. After connecting an Arduino board to your computer via an <a title="Types of USB Connectors" href="http://en.wikipedia.org/wiki/Universal_Serial_Bus#Types_of_USB_connectors" target="_blank">AB USB cable</a>, it should load the ftdi modules automatically. Ensure <em>ftdi_sio</em> and <em>usbserial</em> modules are loaded by executing:</p>
<pre class="usercommand">lsmod | grep ftdi</pre>
<p>It should return output similar to whats shown below:</p>
<pre class="shelloutput">ftdi_sio               54280  0
usbserial              52688  1 ftdi_sio
usbcore               156456  6 ftdi_sio,usbserial,usbhid,ohci_hcd,ehci_hcd</pre>
<p>If not, as root, run:</p>
<pre class="rootcommand">modprobe ftdi_sio</pre>
<p>If there are no errors from the above command, then the module is loaded successfully.</p>
<h3>System Requirements</h3>
<p>The Arduino IDE is java based and RXTX [2] 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:</p>
<ol>
<li>Be the <strong>root</strong> or <strong>uucp</strong> user on your machine whenever you use rxtx</li>
<li>Or add the specific user that needs to use rxtx to the group uucp. (preferred)</li>
</ol>
<p>Add your user account to the <strong>uucp</strong> group by going to <strong>yast2</strong> &gt; <strong>Security and Users</strong> &gt; <strong>User Management</strong>. 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 &#8220;groups&#8221; on the shell. It should give return you a list of groups your account belongs to.</p>
<h3><span id="more-69"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-5896900602713932";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
//2007-10-07: general
google_ad_channel = "5562041263";
//-->
</script><br />
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>Packages required for building rxtx-java</h3>
<ul>
<li>autoconf</li>
<li>automake</li>
<li>libtool</li>
<li>gnu make</li>
<li>gcc</li>
<li>jdk &gt; 1.3 or java-1_5_0-sun-devel</li>
<li>checkinstall (optional)</li>
</ul>
<p>After installing the necessary libraries, you can download and start building the library with the following commands:</p>
<pre class="usercommand">wget http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7r2.zip</pre>
<pre class="usercommand">unzip rxtx-2.1-7r2.zip</pre>
<pre class="usercommand">cd rxtx-2.1-7r2</pre>
<pre class="usercommand">export JAVA_HOME=/usr/lib64/jvm/java-1.5.0-sun/</pre>
<pre class="usercommand">./configure</pre>
<pre class="usercommand">make</pre>
<p>Once the libraries are built, you can install them by following either one of the following two methods:</p>
<ol>
<li>Build an RPM package with the help of <a title="Checkinstall to the rescue" href="http://www.jefferyfernandez.id.au/2006/05/19/checkinstall-to-the-rescue/" target="_blank">checkinstall<br />
</a>(preferred)</li>
<li>Copy the libs to the arduino libs folder.</li>
</ol>
<p>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:</p>
<pre>rpm -ql librxtx-java | grep RXTXcomm.jar
/usr/java/jdk1.5.0_06/jre/lib/ext/RXTXcomm.jar</pre>
<p>We will now remember to add the path (&#8216;/usr/java/jdk1.5.0_06/jre/&#8217;) to the arduino bootstrap script.</p>
<p>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 &#8220;x86_64-unknown-linux-gnu/.libs/&#8221; folder while the jar file should be in the same folder you are in.</p>
<h3>Setting up the Arduino IDE</h3>
<p>Download and untar the Arduino IDE from <a title="Arduino IDE" href="http://www.arduino.cc/en/Main/Software" target="_blank">Arduino Software page</a></p>
<pre class="usercommand">wget http://www.arduino.cc/files/arduino-0010-linux.tgz &amp;&amp; \
tar -xvzf arduino-0010-linux.tgz</pre>
<p>In the arduino/tools directory, make symlinks:</p>
<pre class="usercommand">cd arduino-0010/hardware/tools</pre>
<pre class="usercommand"> ln -s /opt/cross/bin/avr-gcc avr-gcc &amp;&amp; \
ln -s /opt/cross/bin/avr-g++ avr-g++ &amp;&amp; \
ln -s /opt/cross/bin/avr-objcopy avr-objcopy &amp;&amp; \
ln -s /opt/cross/bin/avr-objdump avr-objdump &amp;&amp; \
ln -s /opt/cross/bin/avr-size avr-size</pre>
<p>Copy the compiled RxTx-java libray into the arduino-0010/lib folder. Before doing so rename the existing libraries.</p>
<pre class="usercommand">cd ../../lib/</pre>
<pre class="usercommand">mv librxtxSerial.so librxtxSerial.so.DISABLED</pre>
<pre class="usercommand">mv RXTXcomm.jar RXTXcomm.jar.DISABLED</pre>
<p>Now copy the freshly compiled rxtx libraries into this folder</p>
<pre class="usercommand">cp ../../rxtx-2.1-7r2/x86_64-unknown-linux-gnu/.libs/librxtxSerial.so .</pre>
<pre class="usercommand">cp ../../rxtx-2.1-7r2/RXTXcomm.jar .</pre>
<p>Once you have copied the library and jar file, you are ready to execute the arduino bootstrap script to launch the Arduino IDE.</p>
<pre class="usercommand">./arduino
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7</pre>
<h3>The Arduino IDE</h3>
<p><img class="align-center" title="Arduino IDE" src="http://www.jefferyfernandez.id.au/wp-content/uploads/2008/02/arduino_ide.png" alt="Arduino IDE" width="500" height="600" /></p>
<h4>Resources</h4>
<ol>
<li><a title="Arduino" href="http://www.arduino.cc" target="_blank">http://www.arduino.cc</a></li>
<li><a title="RXTX" href="http://www.rxtx.org" target="_blank">http://www.rxtx.org</a></li>
<li><a title="Future Technology Devices International" href="http://ftdi-usb-sio.sourceforge.net/" target="_blank">http://ftdi-usb-sio.sourceforge.net/</a></li>
<li><a title="Future Technology Devices International" href="http://www.ftdichip.com/Drivers/3rdPartyDrivers.htm" target="_blank">http://www.ftdichip.com/Drivers/3rdPartyDrivers.htm</a></li>
<li>serproxy: <a title="Serial Proxy" href="http://www.lspace.nildram.co.uk/freeware.html" target="_blank">http://www.lspace.nildram.co.uk/freeware.html</a></li>
<li>ser2net: <a title="ser2net" href="http://ser2net.sourceforge.net" target="_blank">http://ser2net.sourceforge.net</a></li>
<li>Java Comm Serial API How-To for Linux: <a title="Java Comm Serial API How-To for Linux" href="http://wass.homelinux.net/howtos/Comm_How-To.shtml" target="_blank">http://wass.homelinux.net/howtos/Comm_How-To.shtml</a></li>
</ol>
<div style="float:left;margin:0px 0px 0px 0px;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.jefferyfernandez.id.au/2008/04/21/arduino-ide-on-64bit-opensuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

