marcus905 / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 0 forks source link

nfc-list.exe fails to claim USB interface #253

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. compile libnfc 1.7.0 RC7
2. plug in ACR122U reader
3. start nfc-list.exe

What is the expected output? What do you see instead?
nfc-list.exe uses libnfc 1.7.0
error   libnfc.driver.acr122_usb        Unable to claim USB interface 
(libusb0-dll:err [claim_interface] could not claim interface 0, win error: 
Command not recognized
)
ERROR: Unable to open NFC device: acr122_usb:bus-0:\\.\libusb0-0001-x072f-0x90cc

What version of the product are you using? On what operating system?
libnfc 1.7.0 RC7, Windows 7 64-bit

Please provide any additional information below.
Compiled with CMake-gui, mingw64

Original issue reported on code.google.com by boska.mi...@gmail.com on 29 Jun 2013 at 10:44

GoogleCodeExporter commented 9 years ago
Never mind, I have fixed this issue. I have uninstalled libusb drivers, 
unticked acr122u USB in cmake and using the old PC/SC driver, which works 
great. 

But I have not managed to make libnfc work with libusb with my reader

Original comment by boska.mi...@gmail.com on 30 Jun 2013 at 12:10

GoogleCodeExporter commented 9 years ago

Original comment by yob...@gmail.com on 1 Jul 2013 at 8:04

GoogleCodeExporter commented 9 years ago
Same issue on XP 32-bit

libusb0-sys:err [claim_interface] device is not configured

Original comment by zhangyo...@gmail.com on 7 Dec 2013 at 5:03

GoogleCodeExporter commented 9 years ago
According to 
http://sourceforge.net/apps/trac/libusb-win32/wiki/libusbwin32_documentation

usb_set_configuration must be called with a valid configuration (not 0) before 
you can claim the interface.

Original comment by zhangyo...@gmail.com on 7 Dec 2013 at 5:14

GoogleCodeExporter commented 9 years ago
Actually, usb_set_configuration is not required. The problem is usb_reset.

After calling usb_reset, the device will need to re-enumerate and thus requires 
you to find the new device and open a new handle. The handle used to call 
usb_reset() will no longer work.

Comment the line of usb_reset(data.pudh) in acr122_usb_open

Original comment by zhangyo...@gmail.com on 7 Dec 2013 at 5:40

GoogleCodeExporter commented 9 years ago
I have same issue and tried suggestion that I found here  
http://www.libnfc.org/community/topic/791/solved-why-nfclist-only-works-with-sud
o-using-pn53x-usb-device/

with no success.

When I run nfc-list under the root user - everything is fine but when I try to 
do it under the regular user I get:

error   libnfc.driver.acr122_usb    Unable to claim USB interface (Operation not 
permitted)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:004:002

I can reproduce this only on 32-bit Ubuntu: 12.04.3 LTS.
On 64-bit Ubuntu (of same release version) everyting is fine and I can work 
with the reader under the regular user.

Original comment by maximch...@gmail.com on 9 Jan 2014 at 11:18

GoogleCodeExporter commented 9 years ago
Can you check the rights of the device?

 lsusb -> where is it? ->
 ls -l /dev/bus/usb/xxx/xxx
Has the group "rw-" access? Are you member of that group?
Are there extended ACLs?
 getfacl /dev/bus/usb/xxx/xxx

Is there any other program using the device? Check with
 sudo lsof -n |grep /dev/bus/usb/xxx/xxx
Is pcscd running? Try stopping it.

Original comment by yob...@gmail.com on 9 Jan 2014 at 2:48

GoogleCodeExporter commented 9 years ago
I think maximchick's problem is not related to this issue.

maximchick: maybe udev rules have not been installed in your system, so you 
will probably have permissions issue.

Original comment by romu...@libnfc.org on 10 Jan 2014 at 1:09