*/
public void getMaxLun(USBDevice usbDev) throws USBException {
log.info("*** Get max lun ***");
final USBControlPipe pipe = usbDev.getDefaultControlPipe();
final USBPacket packet = new USBPacket(1);
final USBRequest req = pipe.createRequest(new SetupPacket(USB_DIR_IN
| USB_TYPE_CLASS | USB_RECIP_INTERFACE, 0xFE, 0, 0, 1), packet);
pipe.syncSubmit(req, GET_TIMEOUT);
log.debug("*** Request data : " + req.toString());
log.debug("*** Request status : 0x" + NumberUtils.hex(req.getStatus(), 4));
if (req.getStatus() == USBREQ_ST_COMPLETED) {
storageDeviceData.setMaxLun(packet.getData()[0]);
} else if (req.getStatus() == USBREQ_ST_STALLED) {
storageDeviceData.setMaxLun((byte) 0);
} else {
throw new USBException("Request status : 0x" + NumberUtils.hex(req.getStatus(), 4));
}
}