log.info("*** Set interrupt endpoint");
    protected void startDevice() throws DriverException {        try {            final USBDevice usbDev = (USBDevice)getDevice();            this.usbDevData = new USBStorageDeviceData();//           Set configuration 0            final USBConfiguration conf = usbDev.getConfiguration(0);            usbDev.setConfiguration(conf);			// Set transport protocol            usbDevData.setMaxLun((byte)0);			if(conf.getInterface(0).getDescriptor().getInterfaceProtocol() == US_PR_BULK){				log.info("*** Set transport protocol to BULK ONLY");				usbDevData.setTransport(new USBStorageBulkTransport(usbDev, usbDevData));				((USBStorageBulkTransport)usbDevData.getTransport()).getMaxLun(usbDev);			} else if(conf.getInterface(0).getDescriptor().getInterfaceProtocol() == US_PR_SCM_ATAPI){				log.info("*** Set transport protocol to SCM ATAPI");			}			            USBEndPoint ep;			            for (int i = 0; i < conf.getInterface(0).getDescriptor().getNumEndPoints(); i++) {                ep = conf.getInterface(0).getEndPoint(i);                // Is it a bulk endpoint ?                if ((ep.getDescriptor().getAttributes() & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) {                    // In or Out ?                    if ((ep.getDescriptor().getEndPointAddress() & USB_DIR_IN) == 0) {                        usbDevData.setBulkInEndPoint(ep);                    } else {                        usbDevData.setBulkOutEndPoint(ep);                    }                } else if ((ep.getDescriptor().getAttributes() & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) {                    usbDevData.setIntrEndPoint(ep);                }            }            usbDev.registerAPI(SCSIHostControllerAPI.class, this);            final Bus hostBus = new USBStorageSCSIHostBus(getDevice());            scsiDevice = new USBStorageSCSIDevice(hostBus, "_sg");            // Execute INQUIRY            try {                scsiDevice.inquiry();            } catch (SCSIException ex) {                throw new DriverException("Cannot INQUIRY device", ex);            } catch (TimeoutException ex) {                throw new DriverException("Cannot INQUIRY device", ex);            } catch (InterruptedException ex) {                throw new DriverException("Interrupted while INQUIRY device", ex);            }            // Register the generic SCSI device.            try {                final DeviceManager dm = usbDev.getManager();                dm.rename(usbDev, SCSIHostControllerAPI.DEVICE_PREFIX, true);                dm.register(scsiDevice);            } catch (DeviceAlreadyRegisteredException ex) {                throw new DriverException(ex);            }        } catch (USBException e) {            throw new DriverException(e);        }    }