From 05831781fb79ec7436280ccef6ef0fdabf105f33 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 30 Jul 2016 18:45:42 +0200 Subject: [PATCH] Make a better error message on LIBUSB_ERROR_NOT_FOUND. --- bmusb.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bmusb.cpp b/bmusb.cpp index 5fda217..7f62a19 100644 --- 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); -- 2.39.2