Topic: ACR122 (touchatag) doesn't recognize several tags

Hi,

I've got strange problems with my ACR122:

It doesn't recognize some Mifare 1ks.

Furthermore, it doesn't recognize any german passport (my Omnikey 5321 does).

(Does not recognize means = it doesn't event recognise that there's a tag on the reader)

Thanks for your help

Re: ACR122 (touchatag) doesn't recognize several tags

Hello,

philipp wrote:

I've got strange problems with my ACR122:

We need more information to help you:
- What is your OS ?
- What is your libnfc version ?
- What is the output on libnfc's example nfc-list with debug enabled ?

--
Romuald Conty

Romuald Conty

Re: ACR122 (touchatag) doesn't recognize several tags

Hi Romuald,

rconty wrote:

Hello,

We need more information to help you:
- What is your OS ?

We tried it under Ubuntu Karmic Koala.

rconty wrote:

- What is your libnfc version ?

I've tested it with two versions 1.3.1 and  1.2.1. Currently i'm using the older version.

rconty wrote:

- What is the output on libnfc's example nfc-list with debug enabled ?

Here is the output (libnfc 1.2.1)Found the following PCSC device(s)

- ACS ACR 38U-CCID 00 00
Tx: ff  00  00  00  04  d4  06  00  00 
Rx: d5  07  00  90  00 
Tx: ff  00  00  00  02  d4  02 
Rx: d5  03  32  01  04  07  90  00 
Tx: ff  00  00  00  04  d4  06  63  3d 
Rx: d5  07  07  90  00 
Tx: ff  00  00  00  05  d4  08  63  3d  00 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  06  63  02 
Rx: d5  07  00  90  00 
Tx: ff  00  00  00  05  d4  08  63  02  80 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  06  63  03 
Rx: d5  07  00  90  00 
Tx: ff  00  00  00  05  d4  08  63  03  80 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  06  63  0d 
Rx: d5  07  00  90  00 
Tx: ff  00  00  00  05  d4  08  63  0d  00 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  06  63  38 
Rx: d5  07  05  90  00 
Tx: ff  00  00  00  05  d4  08  63  38  05 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  06  63  05 
Rx: d5  07  47  90  00 
Tx: ff  00  00  00  05  d4  08  63  05  47 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  06  63  3c 
Rx: d5  07  10  90  00 
Tx: ff  00  00  00  05  d4  08  63  3c  10 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  32  01  00 
Rx: d5  33  90  00 
Tx: ff  00  00  00  06  d4  32  05  00  00  00 
Rx: d5  33  90  00 
Tx: ff  00  00  00  04  d4  06  63  02 
Rx: d5  07  80  90  00 
Tx: ff  00  00  00  05  d4  08  63  02  80 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  06  63  03 
Rx: d5  07  80  90  00 
Tx: ff  00  00  00  05  d4  08  63  03  80 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  06  63  0d 
Rx: d5  07  00  90  00 
Tx: ff  00  00  00  05  d4  08  63  0d  00 
Rx: d5  09  90  00 
Tx: ff  00  00  00  04  d4  32  01  01 
Rx: d5  33  90  00 

Connected to NFC reader: ACR122U102 - PN532 v1.4 (0x07)

Tx: ff  00  00  00  04  d4  4a  01  00 
Rx: d5  4b  00  90  00 
Tx: ff  00  00  00  09  d4  4a  01  01  00  ff  ff  00  00 
Rx: d5  4b  00  90  00 
Tx: ff  00  00  00  09  d4  4a  01  02  00  ff  ff  00  00 
Rx: d5  4b  00  90  00 
Tx: ff  00  00  00  05  d4  4a  01  03  00 
Rx: d5  4b  00  90  00 
Tx: ff  00  00  00  04  d4  4a  01  04 
Rx: d5  4b  00  90  00

Re: ACR122 (touchatag) doesn't recognize several tags

Hi

Can you please provide the corresponding trace with a working device (same NFC tag) so we can compare.  Does pcsc-lite reports errors if you run it in debug mode (AFACR, pcscd -fd).

Thanks

Romain

Re: ACR122 (touchatag) doesn't recognize several tags

Hi

I recently bought a ACR ACS120U PICC reader because a wanted to use libnfc for a project at my company. I tried it in Ubuntu Linux 9.10 karmit koala. When I started pcscd and in another windows pcsc_scan, it says that there is already a card inserted (which is not true) and if I put, por example a myfare ultralight tag, pcsc_scan does not do anything at all. I believe It thinks there is already a card on the reader but I do not know why. I tried the reader in Windows and I worked perfectly so I am stuck.

Do anybody know what is wrong ?  Please help!!!

My software configuration is pcsc-lite 1.5.5, I am using the ACR122U_Driver_Lnx_MAC10.56_101_P driver (compiled locally). When I start pcscd -d -a -f, I got:

00000000 debuglog.c:230:DebugLogSetLevel() debug level=debug
00000081 debuglog.c:259:DebugLogSetCategory() Debug options: APDU
01001232 pcscdaemon.c:512:main() pcsc-lite 1.5.5 daemon ready.
00189906 hotplug_libhal.c:318:get_driver() Looking a driver for VID: 0x072F, PID: 0x2200
00000048 hotplug_libhal.c:366:HPAddDevice() Adding USB device:  usb_device_72f_2200_noserial_if0
01002486 readerfactory.c:1024:RFInitializeReader() Attempting startup of ACS ACR122U 00 00 using /usr/local/pcsc/drivers/ifd-acsccid.bundle/Contents/Linux/libacsccid.so
00052433 readerfactory.c:877:RFBindFunctions() Loading IFD Handler 3.0
00000041 ifdhandler.c:1552:init_driver() Driver version: 1.0.1
00000138 ifdhandler.c:1565:init_driver() LogLevel: 0x0003
00000083 ifdhandler.c:1585:init_driver() DriverOptions: 0x0000
00000010 ifdhandler.c:83:IFDHCreateChannelByName() lun: 0, device: usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0
00184181 ccid_usb.c:282:OpenUSBByName() Manufacturer: Advanced Card Systems Ltd.
00000219 ccid_usb.c:292:OpenUSBByName() ProductString: ACS CCID driver
00000217 ccid_usb.c:298:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.
00001902 ccid_usb.c:501:OpenUSBByName() Found Vendor/Product: 072F/2200 (ACS ACR122U)
00000021 ccid_usb.c:503:OpenUSBByName() Using USB bus/device: 005/004
00003015 ccid_usb.c:1003:get_data_rates() IFD does not support GET_DATA_RATES request: Success
00001980 ccid_usb.c:1187:UpdateSlotIccStates() Slot 0: Present
00000205 ifdhandler.c:365:IFDHGetCapabilities() tag: 0xFB0, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
00000226 ccid_usb.c:1203:CardDetectionThread() Enter: 005/004
00214723 readerfactory.c:249:RFAddReader() Using the pcscd polling thread
00000187 ifdhandler.c:365:IFDHGetCapabilities() tag: 0xFAE, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
00000026 ifdhandler.c:419:IFDHGetCapabilities() Reader supports 1 slot(s)
00000112 ifdhandler.c:1046:IFDHPowerICC() action: PowerUp, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
00003376 ccid_usb.c:1276:CardDetectionThread() Slot ICC states: 005/004
00000033 ccid_usb.c:1278:CardDetectionThread() Slot 0: Present

Re: ACR122 (touchatag) doesn't recognize several tags

Hi PacoSoria, I have ACR122U with firmware version 206. The reader's linux ccid driver is buggy. In fact, pcsc-lite has listed the reader as unsupported.

Anyway, I ran into the same problem and used a trick to work around it until it gets fixed. First I start pcscd as you did, then plug the reader in WITH a card on top (i use DESFire but i think any card will do). Then I kill the pcscd and then start it again. This time libnfc will work with reader.

Hope this help.

Re: ACR122 (touchatag) doesn't recognize several tags

Thank for you answering thaoix, I have tried your solution but i found this:

pcscd window:

00000028 winscard.c:303:SCardConnect() Attempting Connect to ACS ACR122U 00 00 using protocol: 3
00000021 prothandler.c:128:PHSetProtocol() Attempting PTS to T=0
00000022 ifdhandler.c:584:IFDHSetProtocolParameters() protocol T=0, usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)
00000019 winscard.c:451:SCardConnect() Active Protocol: T=0
00000018 winscard.c:461:SCardConnect() hCard Identity: 1a8c4
00000226 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 7
00000021 winscard.c:1651:SCardTransmit() Send Protocol: T=0
00000019 APDU: FF 00 48 00 00
00000018 ifdhandler.c:1173:IFDHTransmitToICC() usb:072f/2200:libhal:/org/freedesktop/Hal/devices/usb_device_72f_2200_noserial_if0 (lun: 0)

nfc-list window

DBG nfc.c:107: List avaible device using PN532_UART driver
INFO: Sorry, serial auto-probing have been disabled at compile time.
DBG nfc.c:116: No listing function avaible for ARYGON driver
DBG nfc.c:168: Looking for ACR122, found ACR122... Use it.
DBG acr122.c:208: Connecting to ACS ACR122U 00 00


and it keeps connecting for ever. Any other hint??

Thanks a lot

Re: ACR122 (touchatag) doesn't recognize several tags

Sorry, after a while in the nfc-list window it shows this but after that it does not say anything else

DBG acr122.c:208: Connecting to ACS ACR122U 00 00
DBG nfc.c:176: [ACS ACR122U 00 00 / ACR122U206] has been claimed.
TX: ff  00  00  00  02  d4  02

Re: ACR122 (touchatag) doesn't recognize several tags

Hi, I got it working but not in Ubuntu. It worked like thaoix said but in a knoppix system

Thanks guys!!!

Re: ACR122 (touchatag) doesn't recognize several tags

Hello again!!!!!
I have been trying to play with the nfc-emulate tool but it does not work properly for me: It start working and configurate the reader but it is not possible to configure the ID I want.

I think the problem is in the function  nfc_target_init of the nfc.c  file because it returns with false in this line
if (!pnd->pdc->transceive(pnd->nds,abtCmd,39,abtRx,&szRxLen)) return false;
so the nfc-emulate code is not executed completely. Next is the results I got on the screen, is there any way to check what is happening ???  Thanks. 




debian5:~/Desktop/libnfc-read-only_rev_318/src/examples$ ./nfc-emulate
DBG nfc.c:147: Autodetecting available devices using ACR122 driver.
DBG acr122.c:162: PCSC reports following device(s):
DBG acr122.c:167: - ACS ACR122U 00 00 (pos=0)
DBG nfc.c:151: Auto-connecting to ACS ACR122U 00 00 using ACR122 driver
DBG acr122.c:208: Connecting to ACS ACR122U 00 00
DBG nfc.c:176: [ACS ACR122U 00 00 / ACR122U206] has been claimed.
TX: ff  00  00  00  02  d4  02 
RX: d5  03  32  01  04  07  90  00 
TX: ff  00  00  00  04  d4  06  63  3d 
RX: d5  07  00  90  00 
TX: ff  00  00  00  05  d4  08  63  3d  00 
RX: d5  09  90  00 
TX: ff  00  00  00  04  d4  06  63  02 
RX: d5  07  80  90  00 
TX: ff  00  00  00  05  d4  08  63  02  80 
RX: d5  09  90  00 
TX: ff  00  00  00  04  d4  06  63  03 
RX: d5  07  80  90  00 
TX: ff  00  00  00  05  d4  08  63  03  80 
RX: d5  09  90  00 
TX: ff  00  00  00  04  d4  06  63  0d 
RX: d5  07  20  90  00 
TX: ff  00  00  00  05  d4  08  63  0d  20 
RX: d5  09  90  00 
TX: ff  00  00  00  04  d4  06  63  38 
RX: d5  07  01  90  00 
TX: ff  00  00  00  05  d4  08  63  38  01 
RX: d5  09  90  00 

[+] Connected to NFC reader: ACS ACR122U 00 00 / ACR122U206 - PN532 v1.4 (0x07)
[+] Try to break out the auto-emulation, this requires a second reader!
[+] To do this, please send any command after the anti-collision
[+] For example, send a RATS command or use the "nfc-anticol" tool
TX: ff  00  00  00  04  d4  06  63  05 
RX: d5  07  47  90  00 
TX: ff  00  00  00  05  d4  08  63  05  47 
RX: d5  09  90  00 
TX: ff  00  00  00  27  d4  8c  00  04  00  00  b0  0b  20  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00 
Error: Could not come out of auto-emulation, no command was received
debian5:~/Desktop/libnfc-read-only_rev_318/src/examples$