Título: Diferenciar USBs en uso Publicado por: DvNe en 18 Noviembre 2015, 18:03 pm Buenas,
Estoy realizando un proyecto en Java con el que necesito saber qué USB está siendo usado, me explico: Estoy programando en un portátil que tiene 3 entradas USB:
Y por otro lado, tengo un escaner de huella dactilar que se conecta por USB. He estado mirando la librería jUSB pero esta necesita instalar un driver para poder usarla así que la he descartado. Luego he estado indagando sobre la librería usb4java y he visto sus ejemplos. Copiando y pegando he preparado este pequeño código: Código
Y al ejecutarlo me aparece esto: Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 0.00 bDeviceClass 0 Per Interface bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 0 idVendor 0x1022 idProduct 0x7809 bcdDevice 0.00 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 0.00 bDeviceClass 0 Per Interface bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 0 idVendor 0x1022 idProduct 0x7807 bcdDevice 0.00 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 0.00 bDeviceClass 0 Per Interface bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 0 idVendor 0x1022 idProduct 0x7807 bcdDevice 0.00 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 0.00 bDeviceClass 0 Per Interface bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 0 idVendor 0x1022 idProduct 0x7808 bcdDevice 0.00 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 0.00 bDeviceClass 0 Per Interface bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 0 idVendor 0x1022 idProduct 0x7808 bcdDevice 0.00 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Unknown bDeviceSubClass 2 bDeviceProtocol 1 bMaxPacketSize0 64 idVendor 0x04f2 idProduct 0xb3b1 bcdDevice 57.16 iManufacturer 3 iProduct 1 iSerial 2 bNumConfigurations 1 Por esto deduzco que usb4java no soporta USB 3.0 (no se si estoy en lo cierto), pero lo que me confunde es que deberían aparecer bcdUSB con valor 2.00 (que creo que es la versión del puerto USB si estoy en lo cierto). Necesito saber si hay alguna forma de darle a cada puerto USB un nombre estilo COM1, COM2, etc. para distinguir cuándo conecto el escaner de huella dactilar a un USB u otro. |