List devices = hub.getAttachedUsbDevices();
Iterator iterator = devices.iterator();
while (iterator.hasNext()) {
UsbDevice device = (UsbDevice) iterator.next();
System.out.println(device.getProductString());
System.out.println(device.getSerialNumberString());
System.out.println(device.getManufacturerString());
System.out.println();
if (device.isUsbHub()) {
listDevices((UsbHub) device);
}
}