[svlug] Problem with Java and Multi-port serial port

Sumit rsumit_2001 at yahoo.co.in
Fri Jul 25 01:54:05 PDT 2003


Hi 
  We have an application that uses CommPortIndentifier
to open a serial port file.
 
Now we have added a 8-port multiport serial port card
(Rocketport) to out Linux RH9.0 box. The serial ports
are configured as /dev/ttyR0-7 using the device driver
provided with the card. 

When we used the java application that opens the
serial port to open /dev/ttyR0 it fails. Is leads to
an exception.
Specifically this is the code 
  try
        {
            OpenCommPort ( );
         }
  catch ( Exception e )
        { sf.VERBOSE ( "Unable to open serial port" );
        }

and 

private void OpenCommPort() throws
NoSuchPortException, PortInUseException, IOException,
UnsupportedCommOperationException

{
CommPortIdentifier portId =
CommPortIdentifier.getPortIdentifier( sf.commPort );

serialPort = (SerialPort) portId.open (CLASS_NAME,
CommPortIdentifier.PORT_SERIAL);

......
......
    }


We are newbie as far as Java is concern. 

Any help, pointers are greatly appreciated. 


Thanks,
Sumit




=====

The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance.
         Confucius BC 551-479, Chinese Ethical Teacher, Philosopher




________________________________________________________________________
Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/




More information about the svlug mailing list