Sorry for the delay in getting back to you. I think it might have
to do with how the serial driver opens the connection. It needs to
toggle the !DTR line on the serial interface to cause a reset. The
DTR is the data terminal ready line, and according to
http://tldp.org/HOWTO/Serial-HOWTO-20.html
Although Linux doesn't
support DTR/DSR flow control, it can be obtained by connecting
the RTS/CTS pins at the PC to the DSR/DTR pins at the device
that uses DTR/DSR flow control. DTR flow control is the same as
DTR/DSR flow control but it's only one-way and only uses the DTR
pin at the device. Many text terminals and some printers use
DTR/DSR (or just DTR) flow control. In the future, Linux may
support DTR/DSR flow control. The software has already been
written but it's not clear when (or if) it will incorporated
into the serial driver.
The normal use of DTR and
DSR (not for flow control) is as follows: A device asserting DTR
says that its powered on and ready to operate. For a modem, the
meaning of a DTR signal from the PC depends on how the modem is
configured. Negating DTR is sometimes called "hanging up" but it
doesn't always do this. One way to "hang up" (negate DTR) is to
set the baud rate to 0 using the command "stty 0". Trying to do
this from a "foreign" terminal may not work due to the
two-interface problem. See Two
interfaces at a terminal. For internal modem-serial_ports
it worked OK with a port using minicom but didn't work if the
port was using wvdial. Why?
So i'm thinking it has to do with the linux implementation of RXTX,
or that it needs to be set explicitly on the linux platform. I
can't find anything explicit in the documentation, but looking
through the source I found these methods:
final public class RXTXPort extends SerialPort {
......
/**
* Line status methods
*/
/**
* @returns true if DTR is set
*/
public native boolean isDTR();
/**
* @param state
*/
public native void setDTR( boolean state );
You might want to use this as a method to reset the device on
startup, as well as to restart the device if it ever jams or needs
restarting. Let me know how it goes. The connection is
capacitively coupled so it doesn't matter what the state end up as -
it just needs to be toggled from high to low (though the pin is
listed as an inverted pin so you might have to set the state as
HIGH).
Reza