[svlug] Problem with Java and Multi-port serial port
Sumit
rsumit_2001 at yahoo.co.in
Fri Jul 25 15:49:27 PDT 2003
Hi
--- "Justin F. Knotzke" <jknotzke at shampoo.ca> wrote:
>
> It appears that even with Java 1.4 you need rxtx
> (the 3rd party
> package I told you about).
>
>
> http://wass.homelinux.net/howtos/Comm_How-To.shtml
>
I am using Sun Java 1.4 and I am using the rxtx
package, exactly the one described in the above link.
The problem is things work fine with /dev/ttyS0 but
gives problem with /dev/ttyR0(one of the multiport
serial port).
The code also have a function as follows to find all
the available ports. This function prints only
/dev/ttyS0 and /dev/lp0 as the available ports
public void PrintAllPorts( )
{
Enumeration ports =
CommPortIdentifier.getPortIdentifiers();
if (ports == null) {
sf.VERBOSE("No comm ports found!" );
return;
}
// print out all ports
sf.VERBOSE( "printing all ports..." );
while ( ports.hasMoreElements() )
{
sf.VERBOSE( "- " +
((CommPortIdentifier)ports.nextElement()).getName() );
}
}
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