I'm integrating a Serial Device and using javax.comm.SerialPort, with java.io.InputStream and java.io.OutputStream as below :
serialPort = (SerialPort) portId.open(name, portNumber);
outputStream = serialPort.getOutputStream();
inputStream = serialPort.getInputStream();
serialPort.setSerialPortParams(baudRate, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
This was working good, but quite recently when we have a new device to be integrated, intermittently, I see an issue where when the data is written to the outputstream, is reaching the Device only when closing the InputStream.
So the device does not respond, and when my java code times out and tries to close the connection, it starts responding.
Very weird issue and was wondering if anyone faced such an issue.
Note : Am using a Mac OS X 10.6 (Snow Leopard)