acr122 no reader found at 'usb'

Asked by Ang talunin

I'm trying to read the tag with the tagtool.
I've got a ACR122U-A9 reader.

The error / information I can see is

python examples/tagtool.py -d nfc.dev:
[main] enable debug output for module 'nfc.dev'
[nfc.clf] searching for reader with path 'usb'
[nfc.dev.transport] using pyusb version 0.x
[nfc.dev.transport] path matches '^(usb|)$'
[nfc.dev] trying usb:072f:2200
[nfc.dev] import nfc.dev.acr122
[nfc.clf] no reader found at 'usb'
[main] no contactless reader found

lsusb:
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 037: ID 072f:2200 Advanced Card Systems, Ltd
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 034: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 035: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB

sudo nfc-list (with card on reader)
nfc-list uses libnfc 1.7.0
NFC device: ACS / ACR122U PICC Interface opened
1 ISO14443A passive target(s) found:
ISO/IEC 14443A (106 kbps) target:
    ATQA (SENS_RES): 00 02
       UID (NFCID1): 81 22 b4 15
      SAK (SEL_RES): 18

sudo nfc-scan-device -v:
nfc-scan-device uses libnfc 1.7.0
1 NFC device(s) found:
- ACS / ACR122U PICC Interface:
    acr122_usb:001:037
chip: PN532 v1.6
initator mode modulations: ISO/IEC 14443A (106 kbps), FeliCa (424 kbps, 212 kbps), ISO/IEC 14443-4B (106 kbps), Innovision Jewel (106 kbps), D.E.P. (424 kbps, 212 kbps, 106 kbps)
target mode modulations: ISO/IEC 14443A (106 kbps), FeliCa (424 kbps, 212 kbps), D.E.P. (424 kbps, 212 kbps, 106 kbps)

I'm currently working on raspberry pi with debian dist.

Anything I'm missing / doing wrong here?

Question information

Language:
English Edit question
Status:
Solved
For:
nfcpy Edit question
Assignee:
No assignee Edit question
Solved by:
Ang talunin
Solved:
Last query:
Last reply:
Revision history for this message
Luís Silva (luis-m-silva99) said :
#1

I have an ACR122U-A9 too and got the same error.

Just for reference: I tried the ACR122U-A9 with the isbm-snep-java lib and it has compatibility issues. The version of ACR122U that works with this java lib is ACR122U-A2 (note for A2). I don't know if the A9 version has issues in nfcpy too or if I'm doing something wrong or missing some step as you, let's wait for another answer.

Revision history for this message
Andrew Davison (andydvsn) said :
#2

Exactly the same problem with the ACR122U-A9 here as well. It all works perfectly the the libnfc tools, but with nfcpy I get the exact same issue. Unfortunately I don't have another reader available to test against, so this is just a 'me too' post, I'm afraid.

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#3

This may now be solved with revision 204 and 205, please update and re-test. There was one issue with setting the USB device configuration - also my ACR122U203 didn't like that. A second issue I've found with activation when a card is already present.

For my device the initial log is as below and I'd be interested in similar snippets for the ACR122 version you have:

[main] enable debug output for module 'nfc.dev'
[nfc.clf] searching for reader with path 'usb'
[nfc.dev.transport] using pyusb version 0.x
[nfc.dev.transport] path matches '^(usb|)$'
[nfc.dev] trying usb:072f:2200
[nfc.dev] import nfc.dev.acr122
[nfc.dev.transport] >>> 6b050000000000000000ff00480000
[nfc.dev.transport] <<< 830a000000000000810041435231323255323033
[nfc.dev.acr122] GetFirmwareVersion called with timeout 100 ms
[nfc.dev.transport] >>> 6b070000000000000000ff00000002d402
[nfc.dev.transport] <<< 83080000000000008100d503320104079000
[nfc.dev.pn53x] chipset is a PN532 version 1.4

Revision history for this message
Andrew Davison (andydvsn) said :
#4

I'm afraid I'm still seeing the same issue here on Ubuntu 12.04 with the ACR122U-A9. This is what I get:

[nfc.clf] searching for reader with path 'usb'
[nfc.dev.transport] using pyusb version 0.x
[nfc.dev.transport] path matches '^(usb|)$'
[nfc.dev] trying usb:072f:2200
[nfc.dev] import nfc.dev.acr122
[nfc.dev.transport] >>> 6b050000000000000000ff00480000
-110
[nfc.clf] no reader found at 'usb'
[main] no contactless reader found

This is with the latest fetch with bzr. Happy to test any further changes! :)

Revision history for this message
Ang talunin (launchmad) said :
#5

Sorry for the late reply.
I'll try to test the new version asap.

In the meantime I also got what I needed working with a script called pyscar.

What I did was:
sudo apt-get install python-pyscard
sudo apt-get install pcscd

Took the code from:
http://pyscard.sourceforge.net/pyscard-usersguide.html#monitoringsmartcards

And that was enough to start reading rfid cards

Revision history for this message
Andrew Davison (andydvsn) said :
#6

Okay, a different response with revision 205 on this Raspberry Pi:

[main] enable debug output for module 'nfc'
[nfc.clf] searching for reader with path 'usb'
[nfc.dev.transport] using pyusb version 0.x
[nfc.dev.transport] path matches '^(usb|)$'
[nfc.dev] trying usb:072f:2200
[nfc.dev] import nfc.dev.acr122
[nfc.dev.transport] >>> 6b050000000000000000ff00480000
[nfc.dev.transport] <<< 830a000000000000810041435231323255323133
[nfc.dev.acr122] GetFirmwareVersion called with timeout 100 ms
[nfc.dev.transport] >>> 6b070000000000000000ff00000002d402
[nfc.dev.transport] <<< 830a000000000000810041435231323255323133
Traceback (most recent call last):
  File "examples/tagtool.py", line 439, in <module>
    TagTool().run()
  File "/home/pi/monday/nfcpy/examples/cli.py", line 283, in run
    while self.run_once() and self.options.loop:
  File "/home/pi/monday/nfcpy/examples/cli.py", line 230, in run_once
    try: clf = nfc.ContactlessFrontend(device)
  File "/home/pi/monday/nfcpy/nfc/clf.py", line 105, in __init__
    if path and not self.open(path):
  File "/home/pi/monday/nfcpy/nfc/clf.py", line 156, in open
    self.dev = nfc.dev.connect(path)
  File "/home/pi/monday/nfcpy/nfc/dev/__init__.py", line 64, in connect
    device = driver.init(usb)
  File "/home/pi/monday/nfcpy/nfc/dev/acr122.py", line 92, in init
    chipset = Chipset(transport)
  File "/home/pi/monday/nfcpy/nfc/dev/acr122.py", line 50, in __init__
    super(Chipset, self).__init__(transport)
  File "/home/pi/monday/nfcpy/nfc/dev/pn53x.py", line 126, in __init__
    ic, ver, rev, support = self.get_firmware_version()
  File "/home/pi/monday/nfcpy/nfc/dev/pn53x.py", line 243, in get_firmware_version
    else: ic, ver, rev, support = data
ValueError: too many values to unpack

A second try ended like this:

[main] enable debug output for module 'nfc'
[nfc.clf] searching for reader with path 'usb'
[nfc.dev.transport] using pyusb version 0.x
[nfc.dev.transport] path matches '^(usb|)$'
[nfc.dev] trying usb:072f:2200
[nfc.dev] import nfc.dev.acr122
[nfc.dev.transport] >>> 6b050000000000000000ff00480000
[nfc.dev.transport] <<< 83080000000000008100d503320106079000
[nfc.dev.acr122] failed to retrieve ACR122U version string
[nfc.clf] no reader found at 'usb'
[main] no contactless reader found

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#7

Looks like more of a USB problem. In the first execution the same answer is returned for two different commands, then in the second execution the answer to the first command is the one expected before. Very strange.

In general my impression of the RPi's USB implementation was so far very mixed. With libusb/pyusb 0.x it more or less never worked well. With libusb/pyusb 1.x it worked a lot better. Maybe you could switch to the pyusb 1.x?

Revision history for this message
V Naresh (vnwarrior) said :
#8

I'm having this same issue - I think it is the same as bug https://bugs.launchpad.net/nfcpy/+bug/1257591 (I get this log output as well as the one in the bug *alternatingly*)

Revision history for this message
Stephen Tiedemann (stephen-tiedemann) said :
#9

I now have an ACR122U-A9 and experience the same. Bug #1257591 will cover any progress.