ret = libusb_bulk_transfer(dev->usb_device, 0x81, buffer, len, &transferred, 0);
if (ret != 0 || (unsigned int)transferred != len) {
error(dev->ctx, "%s. Transferred: %d (expected %u)\n",
ret = libusb_bulk_transfer(dev->usb_device, 0x81, buffer, len, &transferred, 0);
if (ret != 0 || (unsigned int)transferred != len) {
error(dev->ctx, "%s. Transferred: %d (expected %u)\n",