Page 1 of 1

usb_claim_interface error -6

Posted: Mon Feb 10, 2020 4:32 pm
by oz1sej
I've installed rtl-sdr on a raspberry pi. Now, since I'm going to use it remotely, I want to use Stephen Blinick's ring buffer rewrite of rtl_tcp as detailed here: https://www.rtl-sdr.com/significantly-i ... g-buffers/

Unfortunately, I started out by installing rtl-sdr. Now, when I run my local copy of Stephen's rtl-sdr, I get

Code: Select all

Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

usb_claim_interface error -6
Failed to open rtlsdr device #0.
I've tried removing the official rtl-sdr, but that didn't change anything.

What does it mean that the device is claimed by a second instance of librtlsdr? How do I control, which instance of librtlsdr can claim the device?

Re: usb_claim_interface error -6

Posted: Tue Feb 11, 2020 2:33 am
by Aussie Susan
Did you blacklist the RTL-SDR to stop the default kernel driver from grabbing the interface (the first thing the error message mentioned)?
I also got this message when I accidentally tried to run two of the RTL-SDR apps at the same time.
Susan

Re: usb_claim_interface error -6

Posted: Tue Feb 11, 2020 7:11 am
by oz1sej
No I didn't - maybe I should try that! The reasons I didn't were 1. I don't know how to, 2. I was afraid that the two copies of rtl-sdr would use the same kernel module, so if I blacklisted it, the other copy wouldn't work either.

Would you happen to know how to blacklist a kernel module?

Re: usb_claim_interface error -6

Posted: Tue Feb 11, 2020 9:26 am
by oz1sej
Found out - it works. Thank you! :)

Re: usb_claim_interface error -6

Posted: Wed Feb 12, 2020 1:28 am
by Aussie Susan
Glad to hear it.
The things that you seemed to be misunderstanding was the word 'driver'. This is a part of the Linux kernel and,unless you blacklist it, it will grab the RTL-SDR interface and expect that all of the user software will use it to talk to the device.
This works in exactly the same way as a disk driver - you talk to it and it takes care of the low level details that vary from one disk type to another.
In this case you don't want that driver to be running.
Susan

Re: usb_claim_interface error -6

Posted: Sat Jan 02, 2021 4:13 am
by cadetali007
oz1sej wrote:
Tue Feb 11, 2020 9:26 am
Found out - it works. Thank you! :)
hello
i am facing the same problem..
please share the solution..
best regards

Re: usb_claim_interface error -6

Posted: Sat Jan 02, 2021 5:42 am
by cadetali007
Aussie Susan wrote:
Tue Feb 11, 2020 2:33 am
Did you blacklist the RTL-SDR to stop the default kernel driver from grabbing the interface (the first thing the error message mentioned)?
I also got this message when I accidentally tried to run two of the RTL-SDR apps at the same time.
Susan
hello
facing same issue .plzz share the solution
best regards

Re: usb_claim_interface error -6

Posted: Mon Jan 04, 2021 4:45 pm
by HakimJacob
Hi.... you may want to enable Debug inside libusb-win32 and use DebugView to debug the error. By the way, I am not so sure if VC++ plays a part in the error or not. I have not used it with libusb-win32. I kind of remember there were reports that VC++ might be the problem.

Instruction to use DebugView with libusb-win32.
Three steps to capture the debug message.
1) add usb_set_debug(255) to your code after the call of usb_init()
2) download DebugView from microsoft.com

Re: usb_claim_interface error -6

Posted: Tue Jan 12, 2021 3:07 am
by adamlayne
I have the same issue. Any solution?