{
throw new CM19AException("No active configuration found");
}
/* Get the first interface, there should only be one */
UsbInterface usbInterface = (UsbInterface) config.getUsbInterfaces().get(0);
logger.debug("Got device; Manufacturer is " + cm19a.getManufacturerString());
logger.debug("Got interface; Active is " + usbInterface.isActive() + " Claimed is " + usbInterface.isClaimed());
try
{
usbInterface.claim();
logger.debug("Interface has been claimed");
}
catch (UsbException ue)
{
throw new CM19AException("Couldn't claim interface. " + "Message is " + ue.getMessage());