Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libusb_set_configuration error -6 #15

Open
ghost opened this issue Jan 4, 2019 · 7 comments
Open

libusb_set_configuration error -6 #15

ghost opened this issue Jan 4, 2019 · 7 comments

Comments

@ghost
Copy link

ghost commented Jan 4, 2019

I'm trying to read/write a chinese "203-ID-RW" device. The lsusb -v output is the same of what reported in the idrw_linux.c file.

This is the dmesg output:

[  602.657079] usb 1-1.3: new full-speed USB device number 8 using dwc_otg
[  602.844249] usb 1-1.3: New USB device found, idVendor=6688, idProduct=6850
[  602.844265] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  602.844274] usb 1-1.3: Product: 203-ID-RW
[  602.844282] usb 1-1.3: Manufacturer: CTX
[  602.883640] hid-generic 0003:6688:6850.0004: hiddev96,hidraw0: USB HID v1.10 Device [CTX 203-ID-RW] on usb-3f980000.usb-1.3/input0

Here the output of your program:

# ./idrw_linux -v -r
Successfully found the RFID R/W device
libusb_set_configuration error -6

and here some further output in dmesg;

[ 608.765459] usb 1-1.3: usbfs: interface 0 claimed by usbhid while 'idrw_linux' sets config #1

Even issuying lsusb -v does nothing. I tried also as a root.
Is there something I could try to do?

UPDATE:
Just to be sure, I tried to exclude usbhid using this rule:

SUBSYSTEMS=="usb", DRIVERS=="usbhid", ACTION=="add", ATTR{authorized}="0"

now the error is different:

Successfully found the RFID R/W device
libusb_claim_interface error -4
@merbanan
Copy link
Owner

I have no direct idea what to do. Maybe unload the usbhid module before.

@667bdrm
Copy link

667bdrm commented Apr 25, 2019

Try to check if the following udev rules has been installed:

ATTR{idVendor}=="6688", ATTR{idProduct}=="6850", MODE="664", GROUP="plugdev"

And your user must be in plugdev group

@martinayotte
Copy link
Contributor

martinayotte commented May 3, 2019

I've the same issue about :

./idrw_linux -v -r
Successfully found the RFID R/W device
libusb_set_configuration error -6

Even if I copy the 20-rwrfid.rules in /dev/udev/rules.d and restart it...
( "lsusb" is showing the device properly ... )

The "dmesg" related output is :

[1748531.170474] usb 7-1: new full-speed USB device number 9 using ohci-platform
[1748531.399532] usb 7-1: New USB device found, idVendor=ffff, idProduct=0035, bcdDevice= 1.00
[1748531.399551] usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1748531.399564] usb 7-1: Product: IC Reader
[1748531.399575] usb 7-1: Manufacturer: IC Reader
[1748531.399586] usb 7-1: SerialNumber: 08FF20171101
[1748531.418295] input: IC Reader IC Reader as /devices/platform/soc/1c1c400.usb/usb7/7-1/7-1:1.0/0003:FFFF:0035.0008/input/input9
[1748531.476114] hid-generic 0003:FFFF:0035.0008: input,hidraw0: USB HID v1.10 Keyboard [IC Reader IC Reader] on usb-1c1c400.usb-1/input0
[1748531.477869] usbhid 7-1:1.1: couldn't find an input interrupt endpoint
[1748533.962295] usb 7-1: usbfs: interface 0 claimed by usbhid while 'idrw_linux' sets config #1

EDIT : The previous tests are done on my Ubuntu 14.04 desktop, but this morning, I did the same tests on an OrangePiPCPlus with Armbian Stetch Linux 5.1.0-rc7, and the results were exactly the same ...

@merbanan merbanan reopened this May 4, 2019
@dinuxlt
Copy link

dinuxlt commented Jun 5, 2019

Same here. Dmesg:

[512698.471138] usb 3-2.2: new full-speed USB device number 11 using xhci_hcd
[512698.589460] usb 3-2.2: New USB device found, idVendor=6688, idProduct=6850, bcdDevice= 1.01
[512698.589464] usb 3-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[512698.589466] usb 3-2.2: Product: 203-ID-RW
[512698.589468] usb 3-2.2: Manufacturer: CTX
[512698.598802] hid-generic 0003:6688:6850.000F: hiddev1,hidraw5: USB HID v1.10 Device [CTX 203-ID-RW] on usb-0000:07:00.0-2.2/input0
[dinux@dinux rfid_app]$ sudo ./rfid_app -l
Error while opening /dev/ttyUSB0

Related with #14 but tried three different USB ports

Tried this #3 (comment)
Result:

[dinux@dinux rfid_app]$ sudo ./rfid_app -d /dev/bus/usb/003/012 -l
Unknown or no device found:�fPh	)

idrw_linux command returns:

[dinux@dinux rfid_app]$ sudo ./idrw_linux -r
libusb_claim_interface error -4

Windows application works as expected. Link http://download.5yoa.com/IDW02.zip

@OrYaYo
Copy link

OrYaYo commented Oct 8, 2019

Hi,

I'm having exactly the same issue, using Kali linux. Does anyone know how to disable the lock that hid puts on the device?

@merbanan
Copy link
Owner

merbanan commented Oct 8, 2019

Try commenting out the libusb_claim_interface call in the code.

@OrYaYo
Copy link

OrYaYo commented Oct 10, 2019

Hi,

When I uncomment the libusb_claim_interface call (the whole section), I get the same error:

./idrw_linux -v -r
Successfully found the RFID R/W device
libusb_set_configuration error -6

If I do what has been mentioned by Mark-81, which is the following:

SUBSYSTEM=="usb", DRIVERS=="usbhid", ACTION=="add", ATTR{authorized}="0"

without removing the libusb_claim_interface call, I would get the error:

Successfully found the RFID R/W device
libusb_claim_interface error -4

This is expected.

When removing the libusb_claim_interface call, I get the follwing error:

# ./idrw_linux -v -r
Successfully found the RFID R/W device
CMD_GET_SNR
CRC_OK = 0x26
Outgoing packet, pkt_pl_unk = 0x08
STX OK 0xaa
ETX OK 0xbb
CMD_GET_SNR: 0x00 0x00

Control Out error -4

I have to say that the compiled binary now waits for the USB device to read the tag, but one the tag is read, it displays the error shown.

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants