nfc-tools/libnfc

ACS ACR122 - nfc-relay-picc Target_init error

Technix12345 opened this issue · 1 comments

Hello together,

i build the libnfc tools on a kali machine for using with 2x ACS ACR122 antenna.

I have got an error in the function call nfc_target_init(pndTarget, &ntEmulatedTarget, abtCapdu, sizeof(abtCapdu), 0).

  1. File: https://github.com/nfc-tools/libnfc/blob/master/utils/nfc-relay-picc.c
    Line: 401

  2. File: https://github.com/nfc-tools/libnfc/blob/master/libnfc/nfc.c
    Line: 1011
    => HAL(target_init, pnd, pnt, pbtRx, szRx, timeout);

It seems that there is a problem with the driver. Can you help me?

`
info libnfc.config Unable to open file: /usr/local/etc/nfc/libnfc.conf
debug libnfc.config Unable to open directory: /usr/local/etc/nfc/devices.d
unknown 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
debug libnfc.driver.acr122_usb device found: Bus 003 Device 013 Name ACS ACR122
debug libnfc.driver.acr122_usb device found: Bus 003 Device 012 Name ACS ACR122
debug libnfc.general 2 device(s) found using acr122_usb driver
debug libnfc.driver.acr122_usb 3 element(s) have been decoded from "acr122_usb:003:012"
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:003:012) 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 80 80 00 00 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
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 80 80 40 00 10 00 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 17 00 00 00 00 00 00 81 00 d5 4b 01 01 00 08 20 04 08 f1 28 bc 09 78 f7 d4 02 80 82 90 00 90 00
debug libnfc.driver.acr122_usb 3 element(s) have been decoded from "acr122_usb:003:013"
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:003:013) has been claimed.
debug libnfc.general set_property_bool NP_ACCEPT_INVALID_FRAMES False
debug libnfc.general set_property_bool NP_ACCEPT_MULTIPLE_FRAMES False
debug libnfc.general set_property_bool NP_HANDLE_CRC True
debug libnfc.general set_property_bool NP_HANDLE_PARITY True
debug libnfc.general set_property_bool NP_AUTO_ISO14443_4 True
debug libnfc.general set_property_bool NP_EASY_FRAMING True
debug libnfc.general set_property_bool NP_ACTIVATE_CRYPTO1 False
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 80 80 00 00 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.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 38 63 3d
debug libnfc.driver.acr122_usb RX: 80 06 00 00 00 00 00 00 81 00 d5 07 00 00 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 10
debug libnfc.driver.acr122_usb RX: 80 04 00 00 00 00 00 00 81 00 d5 13 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 30
debug libnfc.driver.acr122_usb RX: 80 04 00 00 00 00 00 00 81 00 d5 13 90 00
debug libnfc.chip.pn53x ReadRegister
debug libnfc.driver.acr122_usb TX: 6f 09 00 00 00 00 00 00 00 00 ff 00 00 00 04 d4 06 63 05
debug libnfc.driver.acr122_usb RX: 80 05 00 00 00 00 00 00 81 00 d5 07 00 90 00
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 0a 00 00 00 00 00 00 00 00 ff 00 00 00 05 d4 08 63 05 04
debug libnfc.driver.acr122_usb RX: 80 04 00 00 00 00 00 00 81 00 d5 09 90 00
debug libnfc.chip.pn53x TgInitAsTarget
debug libnfc.chip.pn53x No timeout
debug libnfc.driver.acr122_usb TX: 6f 30 00 00 00 00 00 00 00 00 ff 00 00 00 2b d4 8c 05 08 00 f1 28 bc 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 04 80 82 90 00
debug libnfc.driver.acr122_usb RX: 80 00 00 00 00 00 00 00 fe 00
debug libnfc.driver.acr122_usb Command timed out
debug libnfc.chip.pn53x InRelease
debug libnfc.driver.acr122_usb TX: 6f 08 00 00 00 00 00 00 00 00 ff 00 00 00 03 d4 52 00
debug libnfc.driver.acr122_usb RX: 80 05 00 00 00 00 00 00 81 00 d5 53 00 90 00
nfc-relay-picc: ERROR nfc-relay-picc.c:405
nfc-relay-picc: Initialization of NFC emulator failed

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 08 00 00 00 00 00 00 81 00 d5 03 32 01 06 07 90 00
debug libnfc.chip.pn53x InRelease
debug libnfc.driver.acr122_usb TX: 6f 08 00 00 00 00 00 00 00 00 ff 00 00 00 03 d4 52 00
debug libnfc.driver.acr122_usb RX: 80 05 00 00 00 00 00 00 81 00 d5 53 00 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.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 08 00 00 00 00 00 00 81 00 d5 03 32 01 06 07 90 00

`

Sorry but no, nobody can help you here. ACR122 is the worst device experience. See README.