[PATCH] librtlsdr: libusb detach kernel driver before claiming interface

p.munoz at alumnos.upm.es p.munoz at alumnos.upm.es
Sat May 19 13:21:26 UTC 2012


From: Pablo Muñoz <p.munoz at alumnos.upm.es>

rtl_sdr founds ezcap USB dongle but exits with usb_claim_interface error -6

Signed-off-by: Pablo Muñoz <p.munoz at alumnos.upm.es>
---
 src/librtlsdr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/librtlsdr.c b/src/librtlsdr.c
index 7721c4a..0599722 100644
--- a/src/librtlsdr.c
+++ b/src/librtlsdr.c
@@ -865,7 +865,7 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
 	}
 
 	libusb_free_device_list(list, 1);
-
+	libusb_detach_kernel_driver(dev->devh,0);
 	r = libusb_claim_interface(dev->devh, 0);
 	if (r < 0) {
 		fprintf(stderr, "usb_claim_interface error %d\n", r);
-- 
1.7.10





More information about the osmocom-sdr mailing list