]> git.sesse.net Git - bmusb/commitdiff
Make a better error message on LIBUSB_ERROR_NOT_FOUND.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 30 Jul 2016 16:45:42 +0000 (18:45 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 30 Jul 2016 16:45:49 +0000 (18:45 +0200)
bmusb.cpp

index 5fda2177cd33ee19e0630bdff3a049ab42f8c43e..7f62a19bf7e4f68068ff309de4851e3637f640ca 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -1105,6 +1105,11 @@ void BMUSBCapture::configure_card()
        rc = libusb_set_interface_alt_setting(devh, /*interface=*/0, /*alternate_setting=*/1);
        if (rc < 0) {
                fprintf(stderr, "Error setting alternate 1: %s\n", libusb_error_name(rc));
+               if (rc == LIBUSB_ERROR_NOT_FOUND) {
+                       fprintf(stderr, "This is usually because the card came up in USB2 mode.\n");
+                       fprintf(stderr, "In particular, this tends to happen if you boot up with the\n");
+                       fprintf(stderr, "card plugged in; just unplug and replug it, and it usually works.\n");
+               }
                exit(1);
        }
        rc = libusb_set_interface_alt_setting(devh, /*interface=*/0, /*alternate_setting=*/2);