<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://rxtx.qbang.org/wiki/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Rxtx - User contributions [en]</title>
		<link>http://rxtx.qbang.org/wiki/index.php/Special:Contributions/Pardsbane</link>
		<description>From Rxtx</description>
		<language>en</language>
		<generator>MediaWiki 1.15.4</generator>
		<lastBuildDate>Tue, 09 Jun 2026 12:33:23 GMT</lastBuildDate>
		<item>
			<title>Trouble shooting</title>
			<link>http://rxtx.qbang.org/wiki/index.php/Trouble_shooting</link>
			<description>&lt;p&gt;Pardsbane:&amp;#32;fixed broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Below are issues that you might experience and possible solutions. If you don't find an answer to your problem, then there is always the [[mailing-list]].&lt;br /&gt;
&lt;br /&gt;
== Issues and Answers ==&lt;br /&gt;
&lt;br /&gt;
==== I Can Not Open the Port. ====&lt;br /&gt;
&lt;br /&gt;
If you're not able to open the port (read the errors carefully) then you &lt;br /&gt;
may not have permission to use the device.  &lt;br /&gt;
&lt;br /&gt;
In particular, Red Hat Linux ships with the following permissions on the /dev/ttyS* device files:&lt;br /&gt;
&lt;br /&gt;
        crw-rw----  1 root uucp /dev/ttyS*&lt;br /&gt;
&lt;br /&gt;
Which means that generally, users do not have read or write access to the serial device.&lt;br /&gt;
&lt;br /&gt;
You could increase the device files' access permissions. Log in as root, then run:&lt;br /&gt;
&lt;br /&gt;
        chmod o+rw /dev/ttyS*&lt;br /&gt;
&lt;br /&gt;
Now everyone can read and write the serial devices:&lt;br /&gt;
&lt;br /&gt;
        crw-rw-rw-  1 root uucp /dev/ttyS*&lt;br /&gt;
&lt;br /&gt;
However, this is probably not the ideal situation. At the next reboot, the &lt;br /&gt;
permissions may have been reset. You may want to have only some users access the device.&lt;br /&gt;
&lt;br /&gt;
Another way of proceeding is to add the user that wants to access /dev/ttyS* to the&lt;br /&gt;
&amp;quot;uucp&amp;quot; group as (as can be seen above) group &amp;quot;uucp&amp;quot; has read/write access to the file.              &lt;br /&gt;
&lt;br /&gt;
This is done with the command &amp;quot;usermod&amp;quot; or by directly editing &amp;quot;/etc/group&amp;quot; with &amp;quot;vigr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
        usermod -aG uucp &amp;lt;user-that-wants-access&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be sure to check the file &amp;quot;CommAPI&amp;quot; for common mistakes.&lt;br /&gt;
&lt;br /&gt;
Also make sure that the user can create lock files.&lt;br /&gt;
See [[Trouble_shooting#How_can_I_use_Lock_Files_with_rxtx.3F|Lockfiles]].&lt;br /&gt;
Take note, particularly if you are trying to get 2.1-7r2(final) working on Mac Os X!&lt;br /&gt;
&lt;br /&gt;
==== java.lang.NoClassDefFoundError: gnu/io/CommPort ====&lt;br /&gt;
&lt;br /&gt;
	RXTXcomm.jar is probably not in your classpath or not located in&lt;br /&gt;
	the proper directory.&lt;br /&gt;
&lt;br /&gt;
	for example, lets not include RXTXcomm.jar&lt;br /&gt;
&lt;br /&gt;
	export CLASSPATH=../java/lib/classes.zip&lt;br /&gt;
	$ java BlackBoxException in thread &amp;quot;main&amp;quot;&lt;br /&gt;
	java.lang.NoClassDefFoundError: gnu/io/CommPort&lt;br /&gt;
&lt;br /&gt;
==== The Compiler Cannot Find Java Include Files ====&lt;br /&gt;
&lt;br /&gt;
	Check to top of the Makefile to make sure we agree on the location of&lt;br /&gt;
	the include files that came with the jdk.  Specifically:&lt;br /&gt;
&lt;br /&gt;
	JAVAINCLUDE =  -I /usr/local/java/include/&lt;br /&gt;
	JAVANATINC =  -I /usr/local/java/include/genunix&lt;br /&gt;
	also check the classpath&lt;br /&gt;
	CLASSPATH = ...&lt;br /&gt;
&lt;br /&gt;
==== Configure says 'unterminated sed command' and stops ==== &lt;br /&gt;
&lt;br /&gt;
	Unterminated sed command errors usually result from `find` producing &lt;br /&gt;
	unexpected results.   If you are unsure remove all comm.jar and &lt;br /&gt;
	configure to place in in the correct place. &lt;br /&gt;
&lt;br /&gt;
==== Java Can Not Find libstdc++-libc6.0-1.so.2 ====&lt;br /&gt;
&lt;br /&gt;
	jdk-1.2 on redhat systems may note that Java complains about not being&lt;br /&gt;
	able to find libstdc++-libc6.0-1.so.2.  A symbolic link can be used to &lt;br /&gt;
	get around this feature.&lt;br /&gt;
&lt;br /&gt;
	ln -s /usr/lib/libstdc++ /usr/lib/libstdc++-libc6.0-1.so.2&lt;br /&gt;
	ls -l /usr/lib/libstdc++-libc6.0-1.so.2&lt;br /&gt;
 	/usr/lib/libstdc++-libc6.0-1.so.2 -&amp;gt; libstdc++.so.2.8.0&lt;br /&gt;
&lt;br /&gt;
==== BlackBox Can Not Handle all the ports! ====&lt;br /&gt;
&lt;br /&gt;
	BlackBox has a hard coded limit in BlackBox.java that prevents it from &lt;br /&gt;
	running if you don't specify a port.  We are considering alternative &lt;br /&gt;
	ways of handling the large number of port names in Unix.  The line in &lt;br /&gt;
	question&lt;br /&gt;
&lt;br /&gt;
	is:&lt;br /&gt;
&lt;br /&gt;
		portDisp = new SerialPortDisplay[50];&lt;br /&gt;
		&lt;br /&gt;
	just change 50 to say 256.&lt;br /&gt;
&lt;br /&gt;
==== Illegal use of nonvirtal function call! ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	Exception in thread &amp;quot;main&amp;quot; java.lang.VerifyError: (class: &lt;br /&gt;
	gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) &lt;br /&gt;
	Illegal use of nonvirtual function call&lt;br /&gt;
		at gnu.io.RXTXCommDriver.getCommPort(Compiled Code)&lt;br /&gt;
		at gnu.io.CommPortIdentifier.open(Compiled Code)&lt;br /&gt;
		at SerialPortDisplay.openBBPort(Compiled Code)&lt;br /&gt;
		at SerialPortDisplay.&amp;lt;init&amp;gt;(Compiled Code)&lt;br /&gt;
		at BlackBox.addPort(Compiled Code)&lt;br /&gt;
		at BlackBox.main(Compiled Code)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	&amp;quot;1.1 compilers sometimes generate code that won't verify under 1.2.&lt;br /&gt;
&lt;br /&gt;
	If you don't have the sources for the offending class to recompile with&lt;br /&gt;
	a 1.2 javac, the only solution I know of is to launch the VM with the&lt;br /&gt;
	-noverify option.&lt;br /&gt;
&lt;br /&gt;
	Louis&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	In other words start with a fresh build directory, rebuild, and &lt;br /&gt;
	reinstall to avoid the problem.&lt;br /&gt;
&lt;br /&gt;
==== My libc5 Linux system is generating SIGSEGV ====&lt;br /&gt;
&lt;br /&gt;
	Older Linux Systems (libc5) should upgrade to a glibc system with &lt;br /&gt;
	libpthread-0.7 or newer.  We have run into many problems with older &lt;br /&gt;
	libraries.  SIGSEGV was the most common symptom.  Reported by  Peter &lt;br /&gt;
	Bennett &amp;lt;bencom at bencom.co.nz&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== AM_PROG_LIBTOOL not found in library ====&lt;br /&gt;
&lt;br /&gt;
	cd. &amp;amp;&amp;amp; aclocal&lt;br /&gt;
	aclocal:configure.in: 23: macro 'AM_PROG_LIBTOOL' not found in library&lt;br /&gt;
	make:***[aclocal.m4]Error 1&lt;br /&gt;
&lt;br /&gt;
	If you're positive things are setup right you may try the autogen.sh &lt;br /&gt;
	script to try regenerating the scripts with your tools.&lt;br /&gt;
&lt;br /&gt;
==== Problems with RMISecurityManager() ====&lt;br /&gt;
&lt;br /&gt;
	Please see the file RMISecurityManager.html &lt;br /&gt;
&lt;br /&gt;
==== Which Wires Should be Connected ====&lt;br /&gt;
&lt;br /&gt;
	With the DB25 use 2 (TX), 3 (RX) and 7 (GD) to connect to the device.&lt;br /&gt;
	With the DB9  use 2 (RX), 3 (TX) and 5 (GD) to connect to the device.&lt;br /&gt;
&lt;br /&gt;
	You will need to hook up more than that for hardware flow control.&lt;br /&gt;
&lt;br /&gt;
==== Which Device Should be Used? ====&lt;br /&gt;
&lt;br /&gt;
* Linux serial ports should use &amp;lt;tt&amp;gt;/dev/ttyS*&amp;lt;/tt&amp;gt;., specialx, cyclades and isdn4 linux have been reported to work. As many as 64 ports have worked at one time.&lt;br /&gt;
* FreeBSD uses &amp;lt;tt&amp;gt;cuaa*&amp;lt;/tt&amp;gt;&lt;br /&gt;
* netbsd uses &amp;lt;tt&amp;gt;tty0*&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Irix  uses &amp;lt;tt&amp;gt;ttyd* ttym* ttyf*&amp;lt;/tt&amp;gt;&lt;br /&gt;
* HP-UX uses &amp;lt;tt&amp;gt;tty0p* tty1p*&amp;lt;/tt&amp;gt;&lt;br /&gt;
* BeOS uses &amp;lt;tt&amp;gt;/dev/ports/serial*&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Win32 uses &amp;lt;tt&amp;gt;COM*&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== It Did Not Work! ====&lt;br /&gt;
&lt;br /&gt;
	There are sure to be bugs.  The goal is to make the install as painless&lt;br /&gt;
	as possible.  Send back comments if something could be easier.&lt;br /&gt;
&lt;br /&gt;
	If you run into a problem building the rxtx package please include the&lt;br /&gt;
	output generated by the following script.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        ---------------clip-----------------&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
which java&lt;br /&gt;
java -version&lt;br /&gt;
uname -a&lt;br /&gt;
autoconf --version&lt;br /&gt;
automake --version&lt;br /&gt;
libtool --version&lt;br /&gt;
make --version&lt;br /&gt;
        ---------------clip-----------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	Here's what's on my system for comparison.  Older make is known to cause&lt;br /&gt;
	problems.&lt;br /&gt;
&lt;br /&gt;
		java 1.4&lt;br /&gt;
		autoconf-2.53&lt;br /&gt;
		automake-1.6.3&lt;br /&gt;
		libtool-1.4.2&lt;br /&gt;
		gnu make-3.79.1  &lt;br /&gt;
&lt;br /&gt;
	mail any bugs to taj@www.linux.org.uk.&lt;br /&gt;
&lt;br /&gt;
==== Which jdk should be used? ====&lt;br /&gt;
&lt;br /&gt;
	This is dated.&lt;br /&gt;
&lt;br /&gt;
	Ideally any jdk would be fine.  Here is a list of jdk's tried on&lt;br /&gt;
	RedHat 6.0/kernel 2.2.17pre13 with various versions of glibc.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                 Sun            IBM           Blackdown&lt;br /&gt;
                 2.1.2_006      1.3.0         1.1.8v1&lt;br /&gt;
                 green  native  green native  green native&lt;br /&gt;
                 ------------------------------------------&lt;br /&gt;
glibc-2.1.1-6   | OK   | *1   | *2   | *2   | OK   | *3   |&lt;br /&gt;
                -------------------------------------------&lt;br /&gt;
glibc-2.1.2-11  | OK   | *1   | OK   | OK   | OK   | OK   |&lt;br /&gt;
                -------------------------------------------&lt;br /&gt;
glibc-2.1.2-17  | OK   | *1   | OK   | OK   | OK   | OK   |&lt;br /&gt;
                -------------------------------------------&lt;br /&gt;
glibc-2.1.3-15  | OK   | *1   | OK   | OK   | OK   | OK   |&lt;br /&gt;
                -------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
1) BlackBox (a demo application shipped with CommAPI locks after multiple open()/close()&lt;br /&gt;
&lt;br /&gt;
2) java wont start &amp;quot;Unable to load /usr/local/java/jre/bin/libhpi.so: symbol&lt;br /&gt;
sem_wait, version GLIBC_2.1 not defined in file libpthread.so.0 with link time&lt;br /&gt;
reference Could not create the Java virtual machine.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
3) java wont start &amp;quot;error in loading shared libraries:&lt;br /&gt;
/usr/local/java/bin/../lib/i686/native_threads/libjava.so: symbol sem_init,&lt;br /&gt;
version GLIBC_2.1 not defined in file libpthread.so.0 with link time reference&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conclusion?  Avoid Sun's native threads unless you can figure out whats going wrong. (this is dated)&lt;br /&gt;
 &lt;br /&gt;
==== How does rxtx detect ports?  Can I override it? ====&lt;br /&gt;
&lt;br /&gt;
rxtx tries to detect ports on by scanning /dev for files matching any&lt;br /&gt;
of a set of known-good prefixes, such as 'ttyS', 'ttym', and so on.&lt;br /&gt;
Any ones that exist, are supposed to be good for the current operating&lt;br /&gt;
system, and that can be read and written are offered back from&lt;br /&gt;
CommPortIdentifier.getPortIdentifiers(), and only these can be used as&lt;br /&gt;
ports.&lt;br /&gt;
&lt;br /&gt;
If you wish, you can set the system properties gnu.io.rxtx.SerialPorts&lt;br /&gt;
and gnu.io.rxtx.ParallelPorts.  If either of these is set, then no&lt;br /&gt;
scanning will be carried out and only the specified ports will be&lt;br /&gt;
available.  You can use this to make one platform look like another,&lt;br /&gt;
to restrict Java access to ports, or possibly for other reasons.  For&lt;br /&gt;
example&lt;br /&gt;
&lt;br /&gt;
	java -Dgnu.io.rxtx.SerialPorts=/dev/cua/a:/dev/cua/b com.foo.MyApp&lt;br /&gt;
&lt;br /&gt;
will look kind of like Solaris, if you have created the appropriate&lt;br /&gt;
device nodes.&lt;br /&gt;
&lt;br /&gt;
A note on Linux port enumeration.  We have set most ports aside.  Once the&lt;br /&gt;
number of possible devices started getting into the thousands, checking them&lt;br /&gt;
all made little sense.  Look in RXTXCommDriver.java and search for Linux.&lt;br /&gt;
&lt;br /&gt;
You will see that only /dev/ttyS* is searched but the possible addition ports&lt;br /&gt;
that can be used are listed under it.  Just copy the few you need.&lt;br /&gt;
&lt;br /&gt;
A brief note on '''How to add new enumeration to existing list of ports in Linux?'''&lt;br /&gt;
&lt;br /&gt;
The RXTXcomm.jar file contains all the required classes that work with javax.comm API. &lt;br /&gt;
One of them is RXTXCommDriver.class. RXTXCommDriver.java is available in ftp://ftp.qbang.org/pub/rxtx/rxtx-2.0-7pre2/src/&lt;br /&gt;
Download the RXTXCommDriver.java. In this code, you will find &lt;br /&gt;
&lt;br /&gt;
	if (osName.equals (&amp;quot;Linux&amp;quot;))&lt;br /&gt;
	  {&lt;br /&gt;
	    String[]Temp =&lt;br /&gt;
	    {&lt;br /&gt;
	      &amp;quot;ttyS&amp;quot;,		// linux Serial Ports&lt;br /&gt;
		&amp;quot;ttySA&amp;quot;		// for the IPAQs&lt;br /&gt;
	    };&lt;br /&gt;
	    CandidatePortPrefixes = Temp;&lt;br /&gt;
&lt;br /&gt;
Replace this code with &lt;br /&gt;
&lt;br /&gt;
	if (osName.equals (&amp;quot;Linux&amp;quot;))&lt;br /&gt;
	  {&lt;br /&gt;
	    String[]Temp =&lt;br /&gt;
	    {&lt;br /&gt;
	      &amp;quot;ttyS&amp;quot;, &amp;quot;ttyUSB&amp;quot;,		// linux Serial Ports&lt;br /&gt;
		&amp;quot;ttySA&amp;quot;		// for the IPAQs&lt;br /&gt;
	    };&lt;br /&gt;
	    CandidatePortPrefixes = Temp;&lt;br /&gt;
	  } &lt;br /&gt;
&lt;br /&gt;
Compile the RXTXCommDriver.java and add the resulting RXTXCommDriver.class file to RXTXcomm.jar in&lt;br /&gt;
/usr/java/jdk1.5.0_07/jre/lib/ext/RXTXcomm.jar&lt;br /&gt;
&lt;br /&gt;
P.S. : RXTXcomm.jar has two sub directories. gnu-&amp;gt;io-&amp;gt;RXTXCommDriver.class. Make sure the new compiled file goes into the right place. One way is to extract all files from RXTXcomm.jar. Replace the RXTXCommDriver.class with the new file. Create a new RXTXcomm.jar file using the following command&lt;br /&gt;
&lt;br /&gt;
#jar cvf RXTXcomm.jar gnu META-INF &lt;br /&gt;
&lt;br /&gt;
Replace this new updated jar file with the old one. Then USB to Serial Converters should work great.&lt;br /&gt;
&lt;br /&gt;
==== How can I use Lock Files with rxtx? ====&lt;br /&gt;
&lt;br /&gt;
RXTX uses lock files by default. Lock files are used to prevent more than one program accessing a port at a&lt;br /&gt;
time. Lock files may require a bit of sysadmin to work properly.&lt;br /&gt;
&lt;br /&gt;
If you do not want to use lockfiles in RXTX, run 'configure' with option '--disable-lockfiles'.&lt;br /&gt;
It is however strongly recommended that you do use lock files to prevent RXTX from stomping on&lt;br /&gt;
other programs that might use the serial ports concurrently.&lt;br /&gt;
&lt;br /&gt;
(Don't know if the following is still current. Trent?)&lt;br /&gt;
&lt;br /&gt;
RXTX has support for lock files on Linux only.  It may work on other&lt;br /&gt;
platforms but read the source before blindly trying it. &lt;br /&gt;
&lt;br /&gt;
The lock file code does not support kermit style lock files or lock files in&lt;br /&gt;
'/var/spool'. It is sure to fail if you're using subdirectories in '/dev' or do not&lt;br /&gt;
have '/dev'.&lt;br /&gt;
&lt;br /&gt;
Before you use lock files you need to do one of two things:&lt;br /&gt;
&lt;br /&gt;
# Be user 'root' or user 'uucp' on your machine whenever you use RXTX .. or ..&lt;br /&gt;
# Add the specific user that needs to use RXTX to the group 'uucp' (preferred)&lt;br /&gt;
&lt;br /&gt;
(On Red Hat, use group 'lock' in addition to 'uucp', see further below.)&lt;br /&gt;
&lt;br /&gt;
To add a user to the 'uucp' group edit '/etc/group' as 'root' (using 'vigr' or your&lt;br /&gt;
preferred editor) and change the following:&lt;br /&gt;
&lt;br /&gt;
   uucp::14:uucp&lt;br /&gt;
&lt;br /&gt;
to something like:&lt;br /&gt;
&lt;br /&gt;
   uucp::14:uucp,jarvi&lt;br /&gt;
&lt;br /&gt;
It may be simpler to just run&lt;br /&gt;
&lt;br /&gt;
   usermod -aG uucp jarvi&lt;br /&gt;
&lt;br /&gt;
which does exactly the same.&lt;br /&gt;
&lt;br /&gt;
In this case 'jarvi' is the login name for the user that needs to use lock files.&lt;br /&gt;
Do not change the number (14).  Whatever is in your group file is correct. (On&lt;br /&gt;
Red Hat, do this also for group 'lock')&lt;br /&gt;
&lt;br /&gt;
User 'jarvi' in this case can now use RXTX with lock files.&lt;br /&gt;
&lt;br /&gt;
===== Red Hat users ===== &lt;br /&gt;
&lt;br /&gt;
In Red Hat, lock files are supposed to be handled by group 'lock' instead of group 'uucp'.&lt;br /&gt;
&lt;br /&gt;
Why: from Red Hat 7.2 upwards. the directory into which lock files are written, '/var/lock',&lt;br /&gt;
can only be written to by members of group 'lock'. On the other hand, the serial device&lt;br /&gt;
files are owned by group 'uucp' and are not world-writeable by default.&lt;br /&gt;
&lt;br /&gt;
Thus any user (which may or may not actually be using [http://www.uucp.org/index.shtml uucp] ... do people still know what &lt;br /&gt;
that was?) that accesses the serial device files must belong to group 'lock' (to create lockfiles) and to group 'uucp'&lt;br /&gt;
(to access the device files proper). See also [[Installation#I_Can_Not_Open_the_Port.|I cannot open the port.]]&lt;br /&gt;
&lt;br /&gt;
===== Mandrake users =====&lt;br /&gt;
&lt;br /&gt;
'/var/lock' needs to be owned by group 'uucp'.&lt;br /&gt;
&lt;br /&gt;
===== Mac OS X users =====&lt;br /&gt;
&lt;br /&gt;
You may need to create the lock directory with group 'uucp' ownership. There is a script&lt;br /&gt;
in 'contrib' called 'fixperm.sh' to help with this on Mac OS X.&lt;br /&gt;
&lt;br /&gt;
In 2.1-7r2(final) there is a mis-match between the lock file directory given in 'fixperm.sh' that in the source file SerialImp.h (/var/spool/uucp and /var/lock respectively).  If you want the binaries to work, you need to replace /var/spool/uucp by /var/lock in fixperm.sh, and run that as root.&lt;br /&gt;
&lt;br /&gt;
===== Lock File server =====&lt;br /&gt;
&lt;br /&gt;
As another option it is possible to use a Lock File Server.  In this case,&lt;br /&gt;
a server runs in group 'uucp' or 'lock' and rxtx then connects to localhost&lt;br /&gt;
to lock and unlock the port.  The server and install instructions can be&lt;br /&gt;
found in 'src/lfd'. RXTX will need to be configured to use the server:&lt;br /&gt;
&lt;br /&gt;
     configure --enable-lockfile_server&lt;br /&gt;
&lt;br /&gt;
Any user can then lock the ports if they are not already locked.&lt;br /&gt;
&lt;br /&gt;
===== Arcana =====&lt;br /&gt;
&lt;br /&gt;
Still cant get things to run under a root account?&lt;br /&gt;
&lt;br /&gt;
Vadim Tkachenko writes:&lt;br /&gt;
	&lt;br /&gt;
&amp;quot;Maybe you remember - couple of months back I've run into inability to&lt;br /&gt;
run the JDK 1.3+ from under root account.&lt;br /&gt;
&lt;br /&gt;
Today, absolutely suddenly, something clicked in my head and the cause&lt;br /&gt;
was found: libsafe. To make JDK work, it is enough to disable libsafe&lt;br /&gt;
(unset LD_PRELOAD).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== How can I tell which version of rxtx is installed? ====&lt;br /&gt;
&lt;br /&gt;
Version information is not documented in Sun's CommAPI so this is probably&lt;br /&gt;
unique to RXTX.&lt;br /&gt;
&lt;br /&gt;
As of rxtx-1.5-4 and rxtx-1.4-6 a class has been added to allow developers to &lt;br /&gt;
check which version of rxtx is installed.  The class is RXTXVersion.  &lt;br /&gt;
&lt;br /&gt;
The static method: System.out.println(RXTXVersion.getVersion());&lt;br /&gt;
&lt;br /&gt;
will print the rxtx version as a String in the following format:&lt;br /&gt;
&lt;br /&gt;
        &amp;quot;RXTX-MAJOR.MINOR-PATCH&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
an example would be:&lt;br /&gt;
&lt;br /&gt;
        &amp;quot;RXTX-1.5-4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A change in the MAJOR version would suggest you're in trouble.&lt;br /&gt;
&lt;br /&gt;
Odd MINOR version are reserved for development.  Even MINOR versions are&lt;br /&gt;
reserved for 'stable' releases.&lt;br /&gt;
&lt;br /&gt;
PATCH is used to differentiate incremental releases of the MINOR releases.&lt;br /&gt;
&lt;br /&gt;
CommPortIdentifier is expected to support getVersion() in the RXTX-1.5 series.&lt;br /&gt;
&lt;br /&gt;
==== What Type of Latency can I expect with RXTX ====&lt;br /&gt;
&lt;br /&gt;
	frantz &amp;lt;fcapiez at club-internet.fr&amp;gt; put RXTX under a scope and found&lt;br /&gt;
	the following:&lt;br /&gt;
&lt;br /&gt;
	RXTX currently has a latency of 150-200ms on a PII at 450mhz.&lt;br /&gt;
	The latency can be reduced to 70-80ms by reducing the usleep()&lt;br /&gt;
	value in SerialImp.c:eventLoop() to usleep(5000)).&lt;br /&gt;
&lt;br /&gt;
	Much lower latencies should be possible but the maintainer does not&lt;br /&gt;
	have equipment to test changes.&lt;br /&gt;
&lt;br /&gt;
	He is going to look at this further.  He needs 20 ms or less latency.&lt;br /&gt;
	&lt;br /&gt;
==== I got rxtx working on a new OS but I can't read from the port ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; Now my java program starts up nicely without complaining. However, it does&lt;br /&gt;
&amp;gt; never read any data from the serial port. It looks like it can write data,&lt;br /&gt;
&amp;gt; because if I start a terminal program after I tried to run my program, I get&lt;br /&gt;
&amp;gt; all the return stuff from the modem that my program wrote.&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; I hacked around abit and found out that it hangs in the select() call which&lt;br /&gt;
&amp;gt; simply never returns.&lt;br /&gt;
&amp;gt; &lt;br /&gt;
On Sun, 28 Jan 2001, Baldur Norddahl wrote:&lt;br /&gt;
&amp;gt; HPUX 11:&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; As I wrote to the mailinglist I had some wierd problems where it apparently&lt;br /&gt;
&amp;gt; could write data to the modem, but not read anything back. My terminal&lt;br /&gt;
&amp;gt; programs had no problem using the port. A few days after I reported the&lt;br /&gt;
&amp;gt; problem to the mailinglist, I had given up for now, but then I noticed that&lt;br /&gt;
&amp;gt; it suddenly worked! So it remains a mystery what was wrong as I did not&lt;br /&gt;
&amp;gt; change anything at all, neither in my program nor on the host.&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;gt; Baldur&lt;br /&gt;
&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I suspect two java applications had the port open.  Its easy to do while &lt;br /&gt;
developing.  Perhaps &amp;lt;ctl&amp;gt; z instead of &amp;lt;ctl&amp;gt; c was entered.&lt;br /&gt;
&lt;br /&gt;
This is the reason for adding lockfile support to rxtx.  If another application&lt;br /&gt;
has opened the port, a second application will appear to not be able to &lt;br /&gt;
read or get only part of the data.  ..because the first one is reading.  Only&lt;br /&gt;
one of the select()s are waken.&lt;br /&gt;
&lt;br /&gt;
Its possible to put lockfile support in for HPUX if it is known where other&lt;br /&gt;
applications place their lockfiles.   The easiest way to find out where is&lt;br /&gt;
to fire up minicom, kermit, ... and see where its lockfile is placed.&lt;br /&gt;
&lt;br /&gt;
Here are the known suspects:&lt;br /&gt;
&lt;br /&gt;
const char *lockdirs[]={ &amp;quot;/etc/locks&amp;quot;, &amp;quot;/usr/spool/kermit&amp;quot;,&lt;br /&gt;
                &amp;quot;/usr/spool/locks&amp;quot;, &amp;quot;/usr/spool/uucp&amp;quot;, &amp;quot;/usr/spool/uucp/&amp;quot;,&lt;br /&gt;
                &amp;quot;/usr/spool/uucp/LCK&amp;quot;, &amp;quot;/var/lock&amp;quot;, &amp;quot;/var/lock/modem&amp;quot;,&lt;br /&gt;
                &amp;quot;/var/spool/lock&amp;quot;, &amp;quot;/var/spool/locks&amp;quot;, &amp;quot;/var/spool/uucp&amp;quot;,NULL&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
freebsd uses /var/spool/uucp/, linux uses /var/lock those are the only two&lt;br /&gt;
I've done so far.  Adding the support is trivial once a directory is&lt;br /&gt;
decided upon.&lt;br /&gt;
&lt;br /&gt;
Lockfiles are rather simple.  when an application opens a port it first checks&lt;br /&gt;
if there is a file with the ports name.  If there is it grabs the PID from the&lt;br /&gt;
file.  If that PID is still active the application does not open the port.&lt;br /&gt;
&lt;br /&gt;
If the PID is not active or there is no lockfile, the application creates one&lt;br /&gt;
with its own PID in it.&lt;br /&gt;
&lt;br /&gt;
The confusion starts when you have to decide where (see above) to put the&lt;br /&gt;
lockfile, what the name format is for the file and how to store the PID.&lt;br /&gt;
&lt;br /&gt;
rxtx follows The File System Hierarchy Standard http://www.pathname.com/fhs/&lt;br /&gt;
on linux.  I'm not positive what is normal on other OS's.&lt;br /&gt;
&lt;br /&gt;
                more reading:&lt;br /&gt;
&lt;br /&gt;
                The File System Hierarchy Standard&lt;br /&gt;
                http://www.pathname.com/fhs/&lt;br /&gt;
&lt;br /&gt;
                FSSTND&lt;br /&gt;
                ftp://tsx-11.mit.edu/pub/linux/docs/linux-standards/fsstnd/&lt;br /&gt;
&lt;br /&gt;
                Proposed Changes to the File System Hierarchy Standard&lt;br /&gt;
                ftp://scicom.alphacdc.com/pub/linux/devlock-0.X.tgz&lt;br /&gt;
&lt;br /&gt;
                &amp;quot;UNIX Network Programming&amp;quot;, W. Richard Stevens,&lt;br /&gt;
                Prentice-Hall, 1990, pages 96-101.&lt;br /&gt;
                more reading:&lt;br /&gt;
&lt;br /&gt;
==== My ThinkPad is Not Working! ====&lt;br /&gt;
&lt;br /&gt;
	Scott Burleigh &amp;lt;Scott.Burleigh at jpl.nasa.gov&amp;gt; writes:&lt;br /&gt;
&lt;br /&gt;
		For your files, and in case anybody asks in the &lt;br /&gt;
		future, IBM Thinkpads ship with the external serial port&lt;br /&gt;
		*disabled* by default.  The Thinkpad configuration utility&lt;br /&gt;
		supplied with the machine (under Windows) says it's enabled,&lt;br /&gt;
		and the device manager in the System dialog of the Control&lt;br /&gt;
		panel says it's enabled, but they lie.  In order to enable the&lt;br /&gt;
		port you have to use the old DOS ps2.exe bios configuration &lt;br /&gt;
		utility which, under Windows 2000, is in&lt;br /&gt;
		c:\Program Files\Thinkpad\utilities:&lt;br /&gt;
&lt;br /&gt;
			ps2 sera enable&lt;br /&gt;
&lt;br /&gt;
		Until you do, &amp;quot;setserial -ga /dev/ttyS0&amp;quot; will always tell you&lt;br /&gt;
		the UART is unknown.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== APPLETS ===&lt;br /&gt;
&lt;br /&gt;
More info is needed on signing applets.  This is an exchange from the rxtx mail-&lt;br /&gt;
list.&lt;br /&gt;
&lt;br /&gt;
==== Using Applets ====&lt;br /&gt;
&lt;br /&gt;
prashantg10 at yahoo.com asked:&lt;br /&gt;
&lt;br /&gt;
	Hi All !&lt;br /&gt;
&lt;br /&gt;
	I am trying to use applet on thin terminal which has&lt;br /&gt;
	Linux base Kernel.For testing I am using Linux&lt;br /&gt;
	machine.I have install all the required components.&lt;br /&gt;
	e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even&lt;br /&gt;
	my application runs. When It comes to applet,&lt;br /&gt;
	everything is halts. It does not even show the listing&lt;br /&gt;
	of ports. Is it because applet can't run under root&lt;br /&gt;
	account or what might be the reasons. Can anybody tell&lt;br /&gt;
	me solution.&lt;br /&gt;
&lt;br /&gt;
Son To &amp;lt;son@openbx.net&amp;gt; replied:&lt;br /&gt;
&lt;br /&gt;
	Java applets run withing the sandbox of the security manager.&lt;br /&gt;
	Applets must be signed to access the com port, but for development &lt;br /&gt;
	purposes you can put&lt;br /&gt;
&lt;br /&gt;
	user_pref(&amp;quot;signed.applets.codebase_principal_support&amp;quot;, true);&lt;br /&gt;
&lt;br /&gt;
	in your prefs.js located in ~/.mozilla/default/XYYrandomDirName&lt;br /&gt;
	&lt;br /&gt;
	I didn't use Java applet for my application. I used XUL and CSS for&lt;br /&gt;
	the GUI development and used mozilla Javascript SOAP library to&lt;br /&gt;
	communicate with apache Axis webservice backend which uses RXTX to&lt;br /&gt;
	access the com port.&lt;/div&gt;</description>
			<pubDate>Sat, 25 Jul 2009 19:34:58 GMT</pubDate>			<dc:creator>Pardsbane</dc:creator>			<comments>http://rxtx.qbang.org/wiki/index.php/Talk:Trouble_shooting</comments>		</item>
	</channel>
</rss>