X-Git-Url: https://git.ao2.it/kinect-audio-setup.git/blobdiff_plain/d1e5053b659a5ec31e577443f2b44b91009f691a..6e31aa17271f90a443591719089688bbf2040765:/kinect_upload_fw/kinect_upload_fw.c diff --git a/kinect_upload_fw/kinect_upload_fw.c b/kinect_upload_fw/kinect_upload_fw.c index b2188d6..e3b72db 100644 --- a/kinect_upload_fw/kinect_upload_fw.c +++ b/kinect_upload_fw/kinect_upload_fw.c @@ -155,9 +155,19 @@ int main(int argc, char** argv) { goto fail_libusb_open; } - libusb_set_configuration(dev, 1); + int current_configuration = 0; + libusb_get_configuration(dev, ¤t_configuration); + if (current_configuration != 1) + libusb_set_configuration(dev, 1); + libusb_claim_interface(dev, 0); + libusb_get_configuration(dev, ¤t_configuration); + if (current_configuration != 1) { + res = -ENODEV; + goto cleanup; + } + seq = 1; bootloader_command cmd;