At A Glance Main Projects Tutorials Resume

Contact


Email: palen1c at gmail.com




RXTX Ubuntu ttyACM Devices Not Working

Mon, 18 Oct 2009 21:03:05 EST

I have been using RXTX with Java for quite a long time. It was the component I used for my senior research project in college and I have used it with may other projects demonstrated on this website. I have used it since the beginning of my exploits in trying to use Flash for real time control of hardware. However in trying to finish the RC Interceptor I have found a few heart wrenching bugs in RXTX. The first major bug is that in all versions it doesnt work with ACM named devices. If you follow most of the general advice by arduino people having trouble with rxtx on Ubuntu they say to compile the newest version and use that. This wont work if you have a device like mine with a name like ttyACM0.

The RC Interceptor is a USB to rs232 device but shows up in an Ubuntu 9.04 system as ttyACM0. In order to make rxtx2.2pre2 recognize this device I had to download the source, and modify RXTXCommDriver.java around line 500 to add a prefix of ACM to the allowed prefixes for Linux type serial ports. I then had to compile and install the rxtx 2.2pre2 driver myself. Oh, you also have to crazily use the configure option --disable-PRINTER or make will fail. I hope this helps someone. I appreciate RXTX, but it caused me some gut wrenching pain and deadline missing this weekend which I am not happy about. I guess the motto in software is just like those lame NBC the more you know public announcements.

Charles Palen has been involved in the technology sector for several years. His formal education focused on Enterprise Database Administration. He currently works as the principal software architect and manager at Transcending Digital where he can be hired for your next contract project. Charles is a full stack developer who has been on the front lines of small business and enterprise for over 10 years. Charles current expertise covers the areas of .NET, Java, PHP, Node.js, Javascript, HTML, and CSS. Charles created Technogumbo in 2008 as a way to share lessons learned while making original products.

Comments

Justin
Justin
March 30, 2013 12:34 am

Thank you so much for that Charles! It worked for me!

Charles
Charles
November 1, 2009 1:49 pm

The easiest way to handle this situation in RXTX is actualy to use Java to write a system property. You can force RXTX to include a serial port in its search by inserting the following into your class. In my case, I tell it to look for /dev/ttyACM0 System.setProperty("gnu.io.rxtx.SerialPorts", "/dev/ttyACM0") Its easiest to solve this problem this way because you can forgo custom OS configurations. My code is portable across WIN and NIX systems doing it this way, plus there is no need to recompile rxtx.

Charles
Charles
October 20, 2009 1:04 pm

No kidding? I have no clue how to use a udev rule or even what it is. There is another thing I found in RXTX that I am having to modify it for as well unfortunately anyway.

BrockP
BrockP
October 20, 2009 11:52 am

I assume it won't open device names in /dev/ttyACM0 ? Why not use a simple udev rule to make a new name for it that RXTX like? You can give any type of name you want, I renamed a 64hardrive machine so that the names were based on what controller they were on for example.

Comments are currently disabled.