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

Unable to set alternate setting on USB interface (Connection timed out) #535

Open
alexandredubois opened this issue Mar 28, 2019 · 30 comments · May be fixed by #561 or #563

Comments

@alexandredubois
Copy link

commented Mar 28, 2019

Hello,

I get the following message using my ACR_122U

$ sudo nfc-scan-device -v
nfc-scan-device uses libnfc 1.7.1
1 NFC device(s) found:
error   libnfc.driver.acr122_usb        Unable to set alternate setting on USB interface (Connection timed out)
nfc_open failed for acr122_usb:003:005

Is someone familiar with this problem ? Any idea of what i can look for to troubleshoot this ?

@mondonc

This comment has been minimized.

Copy link

commented Apr 4, 2019

I have the same problem too.

With debian stretch, libnfc and pkg-config installed for compilation from source :
dpkg -l | grep nfc
ii libnfc-bin 1.7.1-4+b1
ii libnfc-dev:amd64 1.7.1-4+b1
ii libnfc5:amd64 1.7.1-4+b1

cat /etc/modprobe.d/blacklist-libnfc.conf
blacklist nfc
blacklist pn533

not enough after rebbot, I have to manually run
modprobe -r pn533_usb
modprobe -r pn533
modprobe -r nfc

But it still does not work.

Not any pcscd service on my system.

I have not ideas, anybody ?

@dragonlost

This comment has been minimized.

Copy link

commented Apr 5, 2019

i have exact same problem !

$ nfc-list
nfc-list uses libnfc 1.7.1
error	libnfc.driver.acr122_usb	Unable to set alternate setting on USB interface (Connection timed out)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:001:003
$ LIBNFC_LOG_LEVEL=3 nfc-list -v
debug	libnfc.config	Unable to open directory: /etc/nfc/devices.d
debug	libnfc.general	log_level is set to 3
debug	libnfc.general	allow_autoscan is set to true
debug	libnfc.general	allow_intrusive_scan is set to false
debug	libnfc.general	0 device(s) defined by user
nfc-list uses libnfc 1.7.1
debug	libnfc.driver.acr122_usb	device found: Bus 001 Device 003 Name ACS ACR122
debug	libnfc.general	1 device(s) found using acr122_usb driver
debug	libnfc.general	0 device(s) found using pn53x_usb driver
debug	libnfc.driver.acr122_usb	3 element(s) have been decoded from "acr122_usb:001:003"
error	libnfc.driver.acr122_usb	Unable to set alternate setting on USB interface (Connection timed out)
debug	libnfc.general	Unable to open "acr122_usb:001:003".
nfc-list: ERROR: Unable to open NFC device: acr122_usb:001:003

i have install rules --> no effect
i have install pcscd --> no effect
i have add pn533_usb in blacklist --> no effect

my config : Ubuntu Mate 18.04.2 LTS Amd64 and 4.15.0-45-generic

@dragonlost

This comment has been minimized.

Copy link

commented Apr 5, 2019

But if I run the service pcscd so, the player work and biip on my nfc tags.

@rosslev

This comment has been minimized.

Copy link

commented Apr 16, 2019

same problem

@filsif

This comment has been minimized.

Copy link

commented Apr 25, 2019

I have the same problem.

Ubuntu 18.04 , and I tried debian 9.8.0 liveCD.

There is a kernel message after calling nfc-scan-device -v :

usbfs : process 3206 ( pcscd ) did not claim interface 0 before use

Maybe a wrong version of library ? I can use any linux distrib, which version is easy to use acr122 ?

@Najihel

This comment has been minimized.

Copy link

commented May 9, 2019

Hello,

I have the same problem too

@sublimz

This comment has been minimized.

Copy link

commented May 12, 2019

Hello,
same problem for me on fresh Kali live

@blafois

This comment has been minimized.

Copy link

commented May 13, 2019

Commenting line 433 of acr122_usb.c, replacing it by "res = 0;" seems to fix the issue on my machine.

@sublimz

This comment has been minimized.

Copy link

commented May 13, 2019

Yes !,
Commenting line 433 of acr122_usb.c, replacing it by "res = 0;"
resolve my problem too ;
thanks @blafois

@Greg270

This comment has been minimized.

Copy link

commented May 14, 2019

Hello,

I'm a novice.
How you can edit the line 433 in acr122_usb.c ? what command do you use ? thanks !

@Greg270

This comment has been minimized.

Copy link

commented May 20, 2019

Up Please, what is the steps to edit the line ?

@blafois

This comment has been minimized.

Copy link

commented May 20, 2019

Up Please, what is the steps to edit the line ?

You need to clone the repo, edit the file aforementionned, recompile the lib.

@sublimz

This comment has been minimized.

Copy link

commented May 20, 2019

@juanjo666

This comment has been minimized.

Copy link

commented May 21, 2019

@sublimz entonces que camino hay que tomar? por mi parte he probado en distintas distribuciones, hasta con la version 1.7.0 de libnfc y mismo error, estoy sospechando que el problema sea el propio lector, a lo cual no le encuentro explicacion, alguna sugerencia o alternativa para poder darle paso de una vez por todas a mfcuk?

@Kerberos73

This comment has been minimized.

Copy link

commented May 25, 2019

Hi! Have tried to change the value in the file, now I still get the error, but it has changed:

error libnfc.driver.acr122_usb Unable to set alternate setting on USB interface (Success)
mfcuk: ERROR: connecting to NFC reader

Any clues?

@martinayotte

This comment has been minimized.

Copy link

commented Jun 5, 2019

I'm facing the same issue ...
I've try commenting line 433 where there is "usb_close(data.pudh);" and replacing it with "res = 0;" but also commenting the "goto free_mem;" since it doesn't make sense to leave that there, but no success :
It is now showing the following error :

# /usr/local/bin/nfc-scan-device -v
/usr/local/bin/nfc-scan-device uses libnfc libnfc-1.7.1-215-gc42e250
1 NFC device(s) found:
error	libnfc.driver.acr122_usb	Unable to set alternate setting on USB interface (Connection timed out)
error	libnfc.driver.acr122_usb	Unable to write to USB (No such file or directory)
nfc_open failed for acr122_usb:008:004
@StephanCandA

This comment has been minimized.

Copy link

commented Jun 12, 2019

I also have the same issue. I tried it on a Raspberry (Raspian) and on a PC (Debian) both with a 4.19 + kernel.

my log from the pc:

sudo LIBNFC_LOG_LEVEL=3 nfc-list
debug libnfc.config key: [allow_autoscan], value: [true]
debug libnfc.config Unable to open directory: /etc/nfc/devices.d
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 0 device(s) defined by user
nfc-list uses libnfc 1.7.1
debug libnfc.driver.acr122_usb device found: Bus 006 Device 002 Name ACS ACR122
debug libnfc.general 1 device(s) found using acr122_usb driver
debug libnfc.general 0 device(s) found using pn53x_usb driver
debug libnfc.driver.acr122_usb 3 element(s) have been decoded from "acr122_usb:006:002"
error libnfc.driver.acr122_usb Unable to set alternate setting on USB interface (Connection timed out)
debug libnfc.general Unable to open "acr122_usb:006:002".
nfc-list: ERROR: Unable to open NFC device: acr122_usb:006:002

during this log the pcscd service is stopped but I get the same result with the service started.

@Slon4564556

This comment has been minimized.

Copy link

commented Jul 20, 2019

Hi,
The previous answers did not work with my acr122u, in kali live or ubuntu 18.04.2. New ways to solve this problem?

@RCTORONTO

This comment has been minimized.

Copy link

commented Jul 23, 2019

I also have this issue, using a acr122u-a9, Ubuntu 18.04, tried the current libnfc and the previous release, I can get the pcsc driver to work, but following the instructions to recompile with acr122_usb, and blacklisting the modules, and stopping pcscd results in the connection time out error - is this a problem with just the A9 variant of the device, if so I will order an older version. Has anyone found a solution?

@poolochon

This comment has been minimized.

Copy link

commented Aug 16, 2019

Same problem with ACR122U-A9.

@lelkluk

This comment has been minimized.

Copy link

commented Aug 20, 2019

The same here with Kali, no matter the version, with pn533_usb and pn533 blacklisted :(

@arall

This comment has been minimized.

Copy link

commented Aug 23, 2019

Same problem here

@harriperhana

This comment has been minimized.

Copy link

commented Aug 29, 2019

I'm having the same issue, is there going to be fix for this?

@Clemens-Dautermann

This comment has been minimized.

Copy link

commented Aug 30, 2019

I got the same issue

jpwidera pushed a commit to jpwidera/libnfc that referenced this issue Sep 5, 2019
@jpwidera jpwidera referenced a pull request that will close this issue Sep 5, 2019
@alexandredubois

This comment has been minimized.

Copy link
Author

commented Sep 10, 2019

A small update 6 months later :

  • The fix provided by @jpwidera seems to solve the problem... if you are able to compile the sourcecode yourself.
  • After discovering this issue, i choosed to buy my new ACR122U-A9 units directly from ACS and i did not notice this faulty behaviour anymore !
@lelkluk

This comment has been minimized.

Copy link

commented Sep 10, 2019

Here is the fastest workaround I managed to do with a live USB key
https://debian-facile.org/viewtopic.php?pid=310787#p310787 msg#37

@Clemens-Dautermann

This comment has been minimized.

Copy link

commented Oct 2, 2019

Here is the fastest workaround I managed to do with a live USB key
https://debian-facile.org/viewtopic.php?pid=310787#p310787 msg#37

This workaround does actually work for me. Thanks a lot!

@alexandredubois

This comment has been minimized.

Copy link
Author

commented Oct 3, 2019

For french readers, i wrote a blog post about the full "Unable to set alternate setting on USB interface" story with a solution to make this ACR122U to work on Kali latest version.

For non-french readers, i guess you will be able to pick the right commands :)

https://www.latelierdugeek.fr/2019/09/30/acr122u-resoudre-lerreur-unable-to-set-alternate-setting-on-usb-interface/

@sublimz

This comment has been minimized.

Copy link

commented Oct 3, 2019

@alexandredubois

This comment has been minimized.

Copy link
Author

commented Oct 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.