[Rxtx] Multiple serial port connections in RXTX

Michael Erskine msemtd at googlemail.com
Thu Mar 31 04:51:45 MDT 2011


On 31 March 2011 11:36, Muzammil Hussain
<muzammil.hussain.syed at gmail.com> wrote:
> Michael,
>
> Could you let me know how to do it correctly ? I believe that I am
> instantiating seperate objects of SerialReader and SerialWriter for
> the 2 serial ports.
>
> regards,
> Muzammil

Take a look at your code:

    SerialPort serialPort1 = (SerialPort) commPort2;

...followed by...

    SerialPort serialPort2 = (SerialPort) commPort2;

The object commPort2 is being used for both ports.

Regards,
Michael.



More information about the Rxtx mailing list