带有ACR122U的libnfc对SELECT(通过AID)APDU没有响应

时间:2018-05-14 19:59:28

标签: nfc apdu hce acr122 lib-nfc

有关调试和最终结果的信息,请参阅NFC reader "SELECT (by AID)" APDU is not routed to Android device。 TL; DR读者可能只是已经不存在了。

我有ACR122U nfc阅读器。我尝试在我的Ubuntu机器上运行此示例http://www.nfc-tools.org/index.php?title=Libnfc:APDU_example#apdu_example.c

这是我点击Android设备(应该处于HCE模式)时读取的日志输出:

./apdu_example
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
./apdu_example uses libnfc libnfc-1.7.1
debug   libnfc.driver.acr122_usb    device found: Bus 001 Device 088 Name     ACS ACR122
debug   libnfc.general  1 device(s) found using acr122_usb driver
debug   libnfc.driver.acr122_usb    3 element(s) have been decoded from "acr122_usb:001:088"
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 01 00 00 00 00 00 02 fe 00 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 02 fe 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 02 fe 00 d5 13 90 00
debug   libnfc.general  "ACS / ACR122U PICC Interface" (acr122_usb:001:088) has been claimed.
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 02 fe 00 d5 07 00 00 00 00 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   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 02 80 63 03 80
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 02 fe 00 d5 09 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 02 fe 00 d5 33 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 01
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 02 fe 00 d5 33 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 ff ff ff
debug   libnfc.driver.acr122_usb    RX: 80 04 00 00 00 00 00 02 fe 00 d5 33 90 00
NFC reader: ACS / ACR122U PICC Interface opened
Polling for target...
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 02 fe 00 d5 07     80 80 43 00 10 00 90 00
debug   libnfc.chip.pn53x   InListPassiveTarget
debug   libnfc.chip.pn53x   No timeout
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 0e 00 00 00 00 00 02 fe 00 d5 4b     01 01 08 03 20 04 01 02 03 04 90 00
Target detected!
=> a4 04 00 07 f0 01 02 03 04 05 06 00
debug   libnfc.chip.pn53x   InDataExchange
debug   libnfc.chip.pn53x   Timeout value: 5000
debug   libnfc.driver.acr122_usb    TX: 6f 14 00 00 00 00 00 00 00 00 ff 00     00 00 0f d4 40 01 a4 04 00 07 f0 01 02 03 04 05 06 00
res from transceive: -6
debug   libnfc.chip.pn53x   InDataExchange
debug   libnfc.chip.pn53x   Timeout value: 5000
debug   libnfc.driver.acr122_usb    TX: 6f 14 00 00 00 00 00 00 00 00 ff 00     00 00 0f d4 40 01 a4 04 00 07 f0 01 02 03 04 05 06 00

基本上我可以看到读者看到我的Android设备,因为我可以看到UID (01 02 03 04)(如果我点击其他设备,则可以看到其他UID)。之后传输select AID apdu只是超时,我在Android日志中看不到相关的响应。

在Android设备上,我安装了一个我正在尝试选择的AID的应用程序 - f0 01 02 03 04 05 06

这可能是这个特定读者的问题吗?还有其他ADP也似乎阻止读者响应,例如FF 00 00 00 02 D4 04只是没有回应。我能以某种方式诊断硬件吗?

0 个答案:

没有答案