Get device names connected on RS232 port

1.6k Views Asked by At

We are developing a java web application and it must read barcodes. We are using a barcode reader called Gryphon and it works properly. We are able to read barcodes from Java. We are using RXTX API (similar to JAVACOMM).

But what we would like to know is how to get the device name connected to the RS232 port. If the computer of a user had several devices connected to different RS232 ports, we only want to listen on the port where barcode reader is connected. How could we distinguish which is the device connected in each RS232 port?

With the next code I only get the port names (COM1, COM3, COM5, ...)

Enumeration<CommPortIdentifier> pp= CommPortIdentifier.getPortIdentifiers();
while (pp.hasMoreElements())
{
    System.out.println (pp.nextElement().getName());
}

I would like to obtain something like "Gryphon" or "Serial Port for Barcode Scanner".

Thanks

0

There are 0 best solutions below