Ubuntu javax.comm serial usb issues

I am experiencing some strange behavior when communicating with an Arduino board from a Java program using the javax.comm library. I am running the Java program on a VIA Pico-ITX with Ubuntu 9.04 Server 32-bit Alternate Installation. The version of javax.comm is "comm3.0_u1_linux".

If I boot the computer and immediately run the Java program, I receive about 2 lines per second with every other line being blank. I am expecting roughly 20 lines per second. In this scenario the buffer also appears to be getting backed as events on the Arduino are not carried through the serial data for several seconds.

If I boot the computer and run Minicom, I am able to receive the full 20 lines per second without issue. My config is /dev/ttyUSB0, 9600 8N1, No HW control, No SW control.

If I run the Java program after running Minicom, it behaves differently. It receives the information at the correct rate, but will stop receiving data at least once or twice. If I keep restarting the program, eventually I can receive data at the correct rate indefinitely.

I have removed all sources of interference, including my DC motors, USB wireless module and physically separating the computer from the Arduino. I have also attached the Arduino to my Windows7 PC and the Java program works perfect there.

Here's my script for setting up the javax.comm libraries and USB Serial configuration:

#!/bin/sh

# constants
JAVA_HOME=/usr/lib/jvm/java-6-sun/jre

# ensure running as root
if [ `id -u` -ne 0 ] ; then
echo error: you must be root to run this script
echo error: no changes have been made to the system
exit 1
fi

# install the library
cp commapi/lib/libLinuxSerialParallel.so $JAVA_HOME/lib/i386/
chmod 644 $JAVA_HOME/lib/i386/libLinuxSerialParallel.so
cp commapi/jar/comm.jar $JAVA_HOME/lib/ext/
cp commapi/jar/comm.jar `pwd`

# setup the javax.comm.properties file
cp commapi/docs/javax.comm.properties $JAVA_HOME/lib/
ln -s $JAVA_HOME/lib/javax.comm.properties `pwd`/javax.comm.properties

# SPECIAL add usb-to-serial device to properties file
sed -i -e '/serpath1 = \/dev\/ttyS1/aserpath2 = /dev/ttyUSB0' $JAVA_HOME/lib/javax.comm.properties

Here's the relevant part of the javax.comm.properties:

# Implementation specific driver
driver=com.sun.comm.LinuxDriver

# Paths to server-side serial port devices
serpath0 = /dev/ttyS0
serpath1 = /dev/ttyS1
serpath2 = /dev/ttyUSB0

# Paths to server-side parallel port devices
parpath0 = /dev/parport0
parpath1 = /dev/parport1

Here's the relevant part of the Java program:

CommPortIdentifier port_identifier = CommPortIdentifier.getPortIdentifier("/dev/ttyUSB0");
SerialPort serial_port = (SerialPort)port_identifier.open("Arduino", 2000);
serial_port.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);

InputStream input_stream = serial_port.getInputStream();
reader = new BufferedReader(new InputStreamReader(input_stream));

output_stream = serial_port.getOutputStream();

// THIS IS DONE IN A CONTINUOUS LOOP
String command = reader.readLine();
System.out.println("received=" + command);

I've tried a lot of things but haven't been able to solve this issue. I am hoping someone with more USB Serial experience will be able to point me in the right direction.

Ubuntu Netgear WNA3100 wireless USB issues

Am brand new to Ubuntu and this forum. I have loaded Ubuntu on to an old PC also running Win XP SP3. The PC has no networking capabilities other than a Netgear WNA3100 wireless USB device.The device works perfectly when in XP, but not so when in Ubuntu. I have trawled the forums and followed various ...

Ubuntu HELP!!! I have USB issues.

I a relivetively new user to Ubuntu Linux. I have a few issue's which i hope yall can resolve. 1. Intermittent Panel non-responce on start up.2. My blackberry phone no longer being recognized on the system. They started happening at the same time.I am running a Dell Latitude 110L laptop with a Penti ...

Ubuntu EDUP Ralink Wireless USB issues with ndiswrapper

System specs:compaq@compaq-desktop:~$ uname -aLinux compaq-desktop 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 05:23:09 UTC 2010 i686 GNU/LinuxI made sure the system had all the latest updates on it, as of March 24I followed this web page for what I describe below:https://help.ubuntu.com/community/W ...

Ubuntu Continued Network and USB Issues

After an absolutely tragic attempt at upgrading to Gutsy with a fresh install and about a week and a half's worth of trying to get my internet connection functioning by transposing CLI info to my smartphone...I gave up.I am now using a fresh install of Feisty and it has been working like a dream unt ...

Ubuntu Belkin (Broadcom) Wireless USB Issues

Hi. I am trying to run a Belkin F5D7051 Wireless G USB adapter in Ubuntu. On trawling the web for info, I can only find old pages with old solutions or people stating that it is impossible to run Broadcom chipsets in Linux. I have tried installing Ndiswrapper, to absolutely no avail. I am quite a ne ...

Ubuntu & javax.comm

I have a Java application that requires javax.comm but I cannot find it in the package manager. I've downloaded the Sun runtime for Mozilla so I can actually run Java apps (this is a .jar) so I'm just missing this library.Anyone help, please?Ta,Xeno ...

Ubuntu Help with serial-usb & programing

I'm trying to read out a RS232 device from ttyUSB0... all I get is garbage.The cable/converter is fine - works under windows.It's recognized by the driverBus 002 Device 013: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Portbut when I read it out (java or low level 'c') I just get garbage... ...

Ubuntu Maxtor Mini III USB issues

I am having trouble with my new Maxtor Mini III USB drive. When I plug it in, it seems to auto-mount just fine, and I can read/write to it (formatted as FAT32), however even when connected to a USB 2.0 port, the speed is very slow.Looking at /var/log/messages, about every 31 seconds, give or take a ...

Ubuntu Actiontec Prism2.5 USB issues

I am having difficulty setting up my Actiontec Prism2.5 wireless card under Ubuntu. I have read this thread (http://www.ubuntuforums.org/showthread.php?t=209351&highlight=linux-wlan-ng+prism2.5), which discusses similar issues but does not help me. Maybe it does help but I am relatively new to l ...

Ubuntu Problem using serial or usb Comm Ports

I am trying an application through Wine, but suspect Wine is not the problem. I am trying an application called MixW that uses the sound card to receive and transmit on radio frequencies. On XP the program runs on Com3. On Ubuntu I get the error message this port does not exist or is used by another ...

Ubuntu Serial to USB issues

I'm looking for some help ...I've attached a Belkin USB Hub to my server and although it says that it's been found when I try to attach a serial to USB cable to either the hub or the server it is not recognised.Any clue as to what could be the problem?I've tried installing mod pl2303 and mct_u232 bu ...

Ubuntu Linux Beginner, Huawei USB Modem E1750 Issues

I have tried off an on for a month to make my Huawei E1750 work, looking at various threads here, and trying out different versions of Ubuntu (10.04, 9.04, 8.04). I currently have Ubuntu 9.04. I will probably ask a lot of obvious questions, but I really am a beginner and I have no previous experienc ...

Ubuntu Printer / USB issues

I am running Ubuntu 10.04 on a Toshiba Equium which has stopped recognising our HP Photosmart C4580 printer; under the printer properties it says "Printer status - Inactive - /usr/lib/cups/backend/hp failed". I have tried reinstalling cups and other packages relating to hp but nothing has ...

Ubuntu USB issues

I have an Imation drive and have partitioned it using ImationLock v224. Is there any way that I can operate this with Ubuntu?Thanks,Uri(newbie to Ubuntu and loving it) ...

Javax.comm, RXTX, jUSB, javax.usb

I'm on the need of using serial ports with a java application. The last time I checked, Sun offered Java Comm as a solution; but now they removed the Api from their site (I'm using winXP). There's an RXTX package as an alternative, but I haven't seen any reviews of it; maybe you could tell me a litt ...

Ubuntu USB Issues

I am having some usb issues. It would be great if someone could offer some advice.I mainly use two devices. An Ipod 5th generation (ipod photo) and a samsung printer. Both devices have worked before on this computer, on this distribution (8.04).Intermittently the printer shows on lsub and connects t ...

Serial comm over USB

New to programming serial comm over usb and cannot find what I am looking for through google yet.When doing I/O multiplexing using a select() call, how do you detect when a USB cable is unplugged, as I don't see select returning an error. ...

Ubuntu Hardy frequent freezes and USB issues

I am using Hardy amd64It frequently freezes up, like for example, often when I click on any video file, the Totem window opens and everything freezes. I can move the mouse pointer but nothing responds, not even Ctrl+Alt+BackspaceToday, when I clicked on a new IM on pidgin, Hardy froze again.I don't ...

Ubuntu Booting from USB issues

I have a joggler device and have Ubuntu installed on a USB drive. If that USB drive is the only thing plugged in it boots fine. If I plug another USB device it doesn't boot.Now I am assuming this is a GRUB issue but I'm not really sure what to change and what I need to change it too.I was told this ...

Issues installing ubuntu 10.10 from usb

I've been trying to install ubuntu 10.10 on a dell DE051 desktop its using Phoenix ROM BIOS PLUS Version 1.10 A00 for the BIOS, it makes me go through bios options before loading from usb now the install process seems to work fine I'm using a different hard disk than the original one that had window ...

Ubuntu Highspeed USB issues

After some googling I found out that there might be a problem with highspeed external USB drives in Linux in general.Im using Ubuntu 10.10 32 bit and have now this problem I think. My external hard drive is working fine but when I type dmesg in a terminal I can see message errors that appear randoml ...

Ubuntu USB issues

I am running 9.10 latest updates (as far as I know)My problem is with my usb connections. I cant connect different usb devices to the same usb ports if a device had been previously connected to it. IE: I have to keep my camera connected to one particular port. If I disconnect it and connect anything ...

Ubuntu how to install usb-serial converter

guys i can not get usb to serial converter install i follow lot of intruction but every time i have to load the driver using sudo command it ask me for the password but when i have to enter the password my keyboard does not respond im using 10.04 ...

Ubuntu ISO to USB issues...

everybody! I've been an Ubuntu user for a while and I found it difficult to just have Ubuntu as the only OS on my netbook, I have a Windows XP SP3 disk and I wanted to wipe out my current partition, install XP, then reinstall Ubuntu as a dual boot, but I can't find any way to easily convert a Window ...

ubuntu 10.04 login and usb issues

I used to have a previous version of Ubuntu installed, I apologize I do not remember which version it was, but everything on it worked properly. I recently installed 10.04 on the same machine, removing the previous install and now it takes me like 3 reboots to finally log into my system, due to my m ...

Ubuntu USB Issues

When I updated to Karmic, I encountered a problem with my webcam. It would work sometimes, and really sporadically. Now, I realise that it's a problem with my USB drives in general. The same thing that happens with my webcam also happens with other USB devices; printers, mouses... etc. Sometimes whe ...

Ubuntu [jaunty 64bit] usb issues (data loss etc)

following error occurs:[ 454.516563] usb 1-5: new high speed USB device using ehci_hcd and address 10[ 454.649816] usb 1-5: configuration #1 chosen from 1 choice[ 454.653128] scsi10 : SCSI emulation for USB Mass Storage devices[ 454.653284] usb-storage: device found at 10[ 454.653287] usb-storage: w ...

Ubuntu USB Issues

Getting frustrated as I do not know how to add USB's to the virtual machines as they are presently not being detected.I am using virtual box ose ...

Ubuntu USB issues on Virtual Machines

I was just wondering if anyone knows how to connect USBs to virtual machines. I set one up on Ubuntu and it is running Windows Xp Professional on it perfectly. I would like to install additional things on the VM but the VM will not detect the USB.Also anyone have any drivers for Saitek products that ...