From 56423c83869d7ac8888b55434c3b482e9fc8eb14 Mon Sep 17 00:00:00 2001 From: shakemid Date: Fri, 23 Nov 2018 00:18:29 +0900 Subject: [PATCH] add libusb_reset_device before configuration --- pcsensor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pcsensor.c b/pcsensor.c index 198b9b3..0deb5cc 100644 --- a/pcsensor.c +++ b/pcsensor.c @@ -210,6 +210,7 @@ int setup_libusb_access(temper_device_t *devices) { for (i = 0; i < numdev; i++) { usb_detach(devices[i].handle, INTERFACE1); usb_detach(devices[i].handle, INTERFACE2); + libusb_reset_device(devices[i].handle); if (libusb_set_configuration(devices[i].handle, 0x01) < 0) { fprintf(stderr, "Could not set configuration 1\n");