nfc-tools / libnfc

Platform independent Near Field Communication (NFC) library
http://nfc-tools.org
GNU Lesser General Public License v3.0
1.71k stars 442 forks source link

error libnfc.driver.acr122_usb Command Code verification failed #666

Open Pebrok opened 2 years ago

Pebrok commented 2 years ago

Hi, I'm new to Libnfc. I'd like to use my ACR122U to read (or more) badges and cards, and I installed Kali on a USB stick. I start it on a pc on boot, and I installed everything, and it seemed to be working.

But everytime I do a nfc list , I got the following error message: error libnfc.driver.acr122_usb Command Code verification failed

I believe I looked everywhere on the net, and tried a lot of thing, but couldn't find a fix.

Can someone help ? As I am a newbie, I copy/paste code, so if anything more complicated is requested, please be patient.

Gnu-Hack commented 2 years ago

Hi!!

Gnu-Hack commented 2 years ago

What command do you use?

phodina commented 2 years ago

Hi @Gnu-Hack , I've encountered similar behaviour.

The NFC reader/writer is ACR122U-A9 based on the P/N.

I'm porting this package to GNU Guix. I tried both GNU and CMake systems. The package builds in both but as I attempt to run the following command I get this error:

# herd status pcscd
...
Stopped:
 - pcscd
...
$ lsusb
...
Bus 001 Device 101: ID 072f:2200 Advanced Card Systems, Ltd ACR122U
...
# /gnu/store/f8pq1slc44lldfnnbhfnxq66aivwmav2-libnfc-1.8.0/bin/nfc-list
/gnu/store/f8pq1slc44lldfnnbhfnxq66aivwmav2-libnfc-1.8.0/bin/nfc-list uses libnfc 1.8.0
NFC device: ACS / ACR122U PICC Interface opened
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
$ lsmod
Module                  Size  Used by
pn533                  45056  0
nfc                   122880  1 pn533
...

I've tried to blacklist the modules but that didn't help.

Also is it normal I hear some sound when the device activates? My guess is it's charging the coil or something like that. After that the tiny noise disappears and the LED on the device is turned on (red/amber).

Gnu-Hack commented 2 years ago

Hi!! have you installed the pccd drivers? what have you blacklisted? If the device has a red LED, it means that it is not correctly configured

José CardeLL

-------- Mensaje original -------- El 7 nov. 2022 23:09, Petr Hodina escribió:

Hi @.***(https://github.com/Gnu-Hack) , I've encountered similar behaviour.

The NFC reader/writer is ACR122U-A9 based on the P/N.

I'm porting this package to GNU Guix. I tried both GNU and CMake systems. The package builds in both but as I attempt to run the following command I get this error:

herd status pcscd

... Stopped:

  • pcscd ... $ lsusb ... Bus 001 Device 101: ID 072f:2200 Advanced Card Systems, Ltd ACR122U ...

    /gnu/store/f8pq1slc44lldfnnbhfnxq66aivwmav2-libnfc-1.8.0/bin/nfc-list

    /gnu/store/f8pq1slc44lldfnnbhfnxq66aivwmav2-libnfc-1.8.0/bin/nfc-list uses libnfc 1.8.0 NFC device: ACS / ACR122U PICC Interface opened error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed error libnfc.driver.acr122_usb Command Code verification failed $ lsmod Module Size Used by pn533 45056 0 nfc 122880 1 pn533 ...

I've tried to blacklist the modules but that didn't help.

Also is it normal I hear some sound when the device activates? My guess is it's charging the coil or something like that. After that the tiny noise disappears and the LED on the device is turned on (red/amber).

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

phodina commented 2 years ago

Here's also the dmesg

[143292.130231] usb 1-3.3: new full-speed USB device number 103 using xhci_hcd
[143292.280946] usb 1-3.3: New USB device found, idVendor=072f, idProduct=2200, bcdDevice= 2.14
[143292.280960] usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[143292.280966] usb 1-3.3: Product: ACR122U PICC Interface
[143292.280971] usb 1-3.3: Manufacturer: ACS
[143295.679311] usb 1-3.3: NFC: NXP PN532 firmware ver 1.6 now attached
[143344.473036] pn533_usb 1-3.3:1.0: NFC: NXP PN533 NFC device disconnected
[143344.602653] usb 1-3.3: reset full-speed USB device number 103 using xhci_hcd
[143344.857382] usb 1-3.3: NFC: NXP PN532 firmware ver 1.6 now attached
[143366.956943] usbcore: deregistering interface driver pn533_usb
[143366.957007] pn533_usb 1-3.3:1.0: NFC: NXP PN533 NFC device disconnected
[143370.078518] usb 1-3.3: reset full-speed USB device number 103 using xhci_hcd

Here's check for the pccd drivers - none loaded.

lsmod | grep pccd

Also not compiled into kernel

grep pccd -i /run/current-system/kernel/.config

Do you know which package they are part of? @Gnu-Hack

Maybe it's this one

Gnu-Hack commented 2 years ago

Install you (Debian)

sudo apt-get install pcscd pcsc-tools

After:

sudo nano /etc/modprobe.d/blacklist-libnfc.conf

And write here:

blacklist nfc blacklist pn533 blacklist pn533_usb

After do not restart, turn off and on

if the red led has gone off it is good. then check with the following:

sudo nfc-list -v nfc-scan-device nfc-list pcsc_scan

José CardeLL

-------- Mensaje original -------- El 7 nov. 2022 23:20, Petr Hodina escribió:

Here's also the dmesg

[143292.130231] usb 1-3.3: new full-speed USB device number 103 using xhci_hcd [143292.280946] usb 1-3.3: New USB device found, idVendor=072f, idProduct=2200, bcdDevice= 2.14 [143292.280960] usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [143292.280966] usb 1-3.3: Product: ACR122U PICC Interface [143292.280971] usb 1-3.3: Manufacturer: ACS [143295.679311] usb 1-3.3: NFC: NXP PN532 firmware ver 1.6 now attached [143344.473036] pn533_usb 1-3.3:1.0: NFC: NXP PN533 NFC device disconnected [143344.602653] usb 1-3.3: reset full-speed USB device number 103 using xhci_hcd [143344.857382] usb 1-3.3: NFC: NXP PN532 firmware ver 1.6 now attached [143366.956943] usbcore: deregistering interface driver pn533_usb [143366.957007] pn533_usb 1-3.3:1.0: NFC: NXP PN533 NFC device disconnected [143370.078518] usb 1-3.3: reset full-speed USB device number 103 using xhci_hcd

I'll check the pccd drivers

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

phodina commented 2 years ago

Okay, I'll test it on Debain tomorrow to see if the issue is the device itself or me packaging for GNU Guix.

However, these steps I already applied. But it might be the way how Guix is structured that it might need some patch.

Nevertheless thanks for the support!

Gnu-Hack commented 2 years ago

OK we talk tomorrow

José CardeLL

-------- Mensaje original -------- El 7 nov. 2022 23:58, Petr Hodina escribió:

Okay, I'll test it on Debain tomorrow to see if the issue is the device itself or me packaging for GNU Guix.

However, these steps I already applied. But it might be the way how Guix is structured that it might need some patch.

Nevertheless thanks for the support!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Gnu-Hack commented 2 years ago

hello, have you managed to do it?

José CardeLL

-------- Mensaje original -------- El 7 nov. 2022 23:58, Petr Hodina escribió:

Okay, I'll test it on Debain tomorrow to see if the issue is the device itself or me packaging for GNU Guix.

However, these steps I already applied. But it might be the way how Guix is structured that it might need some patch.

Nevertheless thanks for the support!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

phodina commented 2 years ago

Hi, yes I ran the commands on Fedora.

The libnfc does not work there either.

However I've been able to read the cards using pcsc_scan after blacklisting the modules.

Therefore the NFC reader/writer device is functional.

Regarding the LED. It stays Red the whole time. When reading card it turns Green and after it goes back to Red.

Here are some logs from GNU Guix.

# /gnu/store/84vh7mcfgdpp19m1bwnancfr1ni369gs-libnfc-1.8.0/bin/nfc-list
/gnu/store/84vh7mcfgdpp19m1bwnancfr1ni369gs-libnfc-1.8.0/bin/nfc-list uses libnfc 1.8.0
error   libnfc.driver.acr122_usb    Unable to claim USB interface (Device or resource busy)
nfc-list: ERROR: Unable to open NFC device: acr122_usb:001:126
$ lsmod
Module                  Size  Used by
pn533_usb              20480  0
pn533                  45056  1 pn533_usb
nfc                   122880  1 pn533
rmmod pn533_usb pn533 nfc
# /gnu/store/84vh7mcfgdpp19m1bwnancfr1ni369gs-libnfc-1.8.0/bin/nfc-list
/gnu/store/84vh7mcfgdpp19m1bwnancfr1ni369gs-libnfc-1.8.0/bin/nfc-list uses libnfc 1.8.0
NFC device: ACS / ACR122U PICC Interface opened
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
error   libnfc.driver.acr122_usb    Command Code verification failed
# LIBNFC_LOG_LEVEL=3 /gnu/store/84vh7mcfgdpp19m1bwnancfr1ni369gs-libnfc-1.8.0/bin/nfc-list
info    libnfc.config   Unable to open file: /gnu/store/84vh7mcfgdpp19m1bwnancfr1ni369gs-libnfc-1.8.0/etc/nfc/libnfc.conf
debug   libnfc.config   Unable to open directory: /gnu/store/84vh7mcfgdpp19m1bwnancfr1ni369gs-libnfc-1.8.0/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
/gnu/store/84vh7mcfgdpp19m1bwnancfr1ni369gs-libnfc-1.8.0/bin/nfc-list uses libnfc 1.8.0
debug   libnfc.driver.acr122_usb    device found: Bus 001 Device 126 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:126"
debug   libnfc.driver.acr122_usb    TX: 62 00 00 00 00 00 00 01 00 00
debug   libnfc.driver.acr122_usb    RX: 80 02 00 00 00 00 00 00 81 00 3b 00
debug   libnfc.driver.acr122_usb    ACR122 PICC Operating Parameters
debug   libnfc.driver.acr122_usb    TX: 6f 05 00 00 00 00 00 00 00 00 ff 00 51 00 00
debug   libnfc.driver.acr122_usb    RX: 80 02 00 00 00 00 00 00 81 00 90 00
debug   libnfc.chip.pn53x   GetFirmwareVersion
debug   libnfc.driver.acr122_usb    TX: 6f 07 00 00 00 00 00 00 00 00 ff 00 00 00 02 d4 02
debug   libnfc.driver.acr122_usb    RX: 80 08 00 00 00 00 00 00 81 00 d5 03 32 01 06 07 90 00
debug   libnfc.chip.pn53x   SetParameters
debug   libnfc.driver.acr122_usb    TX: 6f 08 00 00 00 00 00 00 00 00 ff 00 00 00 03 d4 12 14
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 13 90 00
debug   libnfc.general  "ACS / ACR122U PICC Interface" (acr122_usb:001:126) has been claimed.
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.acr122_usb    TX: 6f 11 00 00 00 00 00 00 00 00 ff 00 00 00 0c d4 06 63 02 63 03 63 0d 63 38 63 3d
debug   libnfc.driver.acr122_usb    RX: 80 09 00 00 00 00 00 00 81 00 d5 07 83 8b 00 05 00 90 00
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 09 00 00 00 00 00 00 00 00 ff 00 00 00 04 d4 32 01 00
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 09 00 00 00 00 00 00 00 00 ff 00 00 00 04 d4 32 01 01
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_AUTO_ISO14443_4 True
debug   libnfc.general  set_property_bool NP_FORCE_ISO14443_A True
debug   libnfc.general  set_property_bool NP_FORCE_SPEED_106 True
debug   libnfc.general  set_property_bool NP_ACCEPT_INVALID_FRAMES False
debug   libnfc.general  set_property_bool NP_ACCEPT_MULTIPLE_FRAMES False
NFC device: ACS / ACR122U PICC Interface opened
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.acr122_usb    TX: 6f 13 00 00 00 00 00 00 00 00 ff 00 00 00 0e d4 06 63 02 63 03 63 05 63 38 63 3c 63 3d
debug   libnfc.driver.acr122_usb    RX: 80 0a 00 00 00 00 00 00 81 00 d5 07 83 8b 04 05 10 00 90 00
debug   libnfc.chip.pn53x   PN53X_REG_CIU_TxMode (Defines the transmission data rate and framing during transmission)
debug   libnfc.chip.pn53x   PN53X_REG_CIU_RxMode (Defines the transmission data rate and framing during receiving)
debug   libnfc.chip.pn53x   PN53X_REG_CIU_TxAuto (Controls the settings of the antenna driver)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 10 00 00 00 00 00 00 00 00 ff 00 00 00 0b d4 08 63 02 80 63 03 80 63 05 44
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.chip.pn53x   InListPassiveTarget
debug   libnfc.chip.pn53x   Timeout value: 300
debug   libnfc.driver.acr122_usb    TX: 6f 09 00 00 00 00 00 00 00 00 ff 00 00 00 04 d4 4a 01 00
debug   libnfc.driver.acr122_usb    RX: 80 05 00 00 00 00 00 00 81 00 d5 4b 00 90 00
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.chip.pn53x   InListPassiveTarget
debug   libnfc.chip.pn53x   Timeout value: 300
debug   libnfc.driver.acr122_usb    TX: 6f 0e 00 00 00 00 00 00 00 00 ff 00 00 00 09 d4 4a 01 01 00 ff ff 01 00
debug   libnfc.driver.acr122_usb    RX: 80 05 00 00 00 00 00 00 81 00 d5 4b 00 90 00
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.chip.pn53x   InListPassiveTarget
debug   libnfc.chip.pn53x   Timeout value: 300
debug   libnfc.driver.acr122_usb    TX: 6f 0e 00 00 00 00 00 00 00 00 ff 00 00 00 09 d4 4a 01 02 00 ff ff 01 00
debug   libnfc.driver.acr122_usb    RX: 80 05 00 00 00 00 00 00 81 00 d5 4b 00 90 00
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.chip.pn53x   InListPassiveTarget
debug   libnfc.chip.pn53x   Timeout value: 300
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 4a 01 03 00
debug   libnfc.driver.acr122_usb    RX: 80 05 00 00 00 00 00 00 81 00 d5 4b 00 90 00
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_FORCE_ISO14443_B True
debug   libnfc.general  set_property_bool NP_FORCE_SPEED_106 True
debug   libnfc.general  set_property_bool NP_HANDLE_CRC True
debug   libnfc.general  set_property_bool NP_EASY_FRAMING False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 06 63 02 63 03
debug   libnfc.driver.acr122_usb    RX: 80 06 00 00 00 00 00 00 81 00 d5 07 83 83 90 00
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.chip.pn53x   Timeout value: 300
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 42 01 0b 3f 80
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 05 00 00 00 00 00 00 81 00 d5 43 01 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_FORCE_ISO14443_B True
debug   libnfc.general  set_property_bool NP_FORCE_SPEED_106 True
debug   libnfc.general  set_property_bool NP_HANDLE_CRC True
debug   libnfc.general  set_property_bool NP_EASY_FRAMING False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 06 63 02 63 03
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 06 00 00 00 00 00 00 81 00 d5 07 83 83 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_FORCE_ISO14443_B True
debug   libnfc.general  set_property_bool NP_FORCE_SPEED_106 True
debug   libnfc.general  set_property_bool NP_HANDLE_CRC True
debug   libnfc.general  set_property_bool NP_EASY_FRAMING False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 06 63 02 63 03
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 06 00 00 00 00 00 00 81 00 d5 07 83 83 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_FORCE_ISO14443_B True
debug   libnfc.general  set_property_bool NP_FORCE_SPEED_106 True
debug   libnfc.general  set_property_bool NP_HANDLE_CRC True
debug   libnfc.general  set_property_bool NP_EASY_FRAMING False
debug   libnfc.chip.pn53x   PN53X_REG_CIU_TxMode (Defines the transmission data rate and framing during transmission)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 06 63 02 63 03
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.chip.pn53x   PN53X_REG_CIU_RxMode (Defines the transmission data rate and framing during receiving)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 03 0b
debug   libnfc.driver.acr122_usb    RX: 80 06 00 00 00 00 00 00 81 00 d5 07 83 83 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.chip.pn53x   PN53X_REG_CIU_ManualRCV (Allows manual fine tuning of the internal receiver)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 0d 10
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug   libnfc.chip.pn53x   PN53X_REG_CIU_RFCfg (Configures the receiver gain and RF level)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 16 70
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug   libnfc.chip.pn53x   PN53X_REG_CIU_GsNOFF (Selects the conductance of the antenna driver pins TX1 and TX2 for load modulation when own RF field is switched OFF)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 13 88
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug   libnfc.chip.pn53x   PN53X_REG_CIU_GsNOn (Selects the conductance of the antenna driver pins TX1 and TX2 for modulation, when own RF field is switched ON)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 17 f8
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug   libnfc.chip.pn53x   PN53X_REG_CIU_CWGsP (Selects the conductance of the antenna driver pins TX1 and TX2 when not in modulation phase)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 18 3f
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug   libnfc.chip.pn53x   PN53X_REG_CIU_ModGsP (Selects the conductance of the antenna driver pins TX1 and TX2 when in modulation phase)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 19 10
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug   libnfc.chip.pn53x   PN53X_REG_CIU_TReloadVal_hi (Describes the 16-bit long timer reload value (Higher 8 bits))
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 1c 69
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug   libnfc.chip.pn53x   PN53X_REG_CIU_TReloadVal_lo (Describes the 16-bit long timer reload value (Lower 8 bits))
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 1d f0
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.chip.pn53x   Timeout value: 300
debug   libnfc.driver.acr122_usb    TX: 6f 08 00 00 00 00 00 00 00 00 ff 00 00 00 03 d4 42 0a
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.chip.pn53x   got expected timeout on iClass activate all
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.chip.pn53x   Timeout value: 300
debug   libnfc.driver.acr122_usb    TX: 6f 08 00 00 00 00 00 00 00 00 ff 00 00 00 03 d4 42 0c
debug   libnfc.chip.pn53x   timeout on iClass anticol
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 05 00 00 00 00 00 00 81 00 d5 43 01 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 05 00 00 00 00 00 00 81 00 d5 43 01 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 0b 00 00 00 00 00 00 00 00 ff 00 00 00 06 d4 32 05 00 01 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.acr122_usb    TX: 6f 09 00 00 00 00 00 00 00 00 ff 00 00 00 04 d4 32 01 00
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.general  set_property_bool NP_HANDLE_CRC False
debug   libnfc.general  set_property_bool NP_HANDLE_PARITY False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0d 00 00 00 00 00 00 00 00 ff 00 00 00 08 d4 06 63 02 63 03 63 0d
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed
debug   libnfc.general  set_property_bool NP_HANDLE_CRC True
debug   libnfc.general  set_property_bool NP_HANDLE_PARITY True
debug   libnfc.driver.acr122_usb    ACR122 Abort
debug   libnfc.driver.acr122_usb    TX: 6f 07 00 00 00 00 00 00 00 00 ff 00 00 00 02 d4 02
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 00 81 00 d5 33 90 00
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0d 00 00 00 00 00 00 00 00 ff 00 00 00 08 d4 06 63 02 63 03 63 0d
debug   libnfc.driver.acr122_usb    RX: 80 07 00 00 00 00 00 00 81 00 d5 07 83 0b 10 90 00
debug   libnfc.chip.pn53x   PN53X_REG_CIU_RxMode (Defines the transmission data rate and framing during receiving)
debug   libnfc.chip.pn53x   PN53X_REG_CIU_ManualRCV (Allows manual fine tuning of the internal receiver)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.acr122_usb    TX: 6f 0d 00 00 00 00 00 00 00 00 ff 00 00 00 08 d4 08 63 03 8b 63 0d 00
debug   libnfc.driver.acr122_usb    RX: 80 08 00 00 00 00 00 00 81 00 d5 03 32 01 06 07 90 00
error   libnfc.driver.acr122_usb    Command Code verification failed

For some reason the pcsc_scan does not work on GNU Guix:

# /gnu/store/xymj77nibwqs1fvqblx7wjq48gpcjcz7-pcsc-tools-1.6.0/bin/pcsc_scan
Using reader plug'n play mechanism
Scanning present readers...
Waiting for the first reader... | SCardGetStatusChange: Command cancelled.
phodina commented 2 years ago

Based on the debug info do you @Gnu-Hack think that the HW reader I have is different inside? I mean it responds differently than what the library expects.

My assumption is based on the TX is the byte array that's send over USB for configuration and RX is the respond from the device.

Gnu-Hack commented 2 years ago

what is your reader?

José CardeLL

-------- Mensaje original -------- El 10 nov. 2022 7:56, Petr Hodina escribió:

Based on the debug info do you @.***(https://github.com/Gnu-Hack) think that the HW reader I have is different inside? I mean it responds differently than what the library expects.

My assumption is based on the TX is the byte array that's send over USB for configuration and RX is the respond from the device.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

phodina commented 2 years ago

Well it enumerates as:

$ lsusb
...
Bus 001 Device 013: ID 072f:2200 Advanced Card Systems, Ltd ACR122U

The text on the back of the NFC device says:

ACR122U
P/N: ACR122U-A9
phodina commented 1 year ago

@Gnu-Hack any thoughts?

Cioci89 commented 6 months ago

I have the same problem with a new installation of Ubuntu Desktop 22.04.04

But the problem that i have found is in the libnfc6....

follow my guide for another problem...that resolve also this problem https://github.com/nfc-tools/libnfc/issues/684#issuecomment-1632260381