nfc-tools / libnfc

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

Setting a longer timeout for detecting tag? #617

Open maxieds opened 4 years ago

maxieds commented 4 years ago

I am working with Mifare tags and am getting stuck in the REQA loop when trying to detect the tag with nfc-scan-device and the nfc-tools utility mifare-desfire-info. What I think is happening is that for one reason or another (specific to the tag implementation) it is taking too long for libnfc to get the response back from the REQA (0x26) command that it is sending out. The utilities keep issuing a new REQA request to the tag, and it never processes the response from my tag.

Is there a way to prevent libnfc from re-issuing the REQA request to the tag? E.g., can I set a very high threshold for the timeout before libnfc tries to poll again when it thinks there is no response coming back to it? I'm using a reader that is working off the pn53_usb driver.

Thanks.

doegox commented 4 years ago

Anticollision is handled directly by the pn53x firmware. REQA must receive the reply at a very strict timing according to the ISO. PN53x are moderately tolerant to slower answers, we can see it when one tries to mount a relay attack against a pn53x. It works so-so... You can try nfc-anticol which will operate a pseudo-anticollision purely from libnfc, this one is more lenient to slow answers. But honestly, besides dumb relay attacks (relaying also the anticollision), I see no reason for a legit tag to answer slowly to a REQA...

maxieds commented 4 years ago

@doegox The reason (I think) that my tag implementation is so slow to respond is that I have a lot of slow logging going on for development. It's not really possible to remove all of this right now.

What I'm really after is being able to write some custom C programs with libnfc and/or libfreefare that bypass all of the anticollision and just start directly communicating with the card. Is there a way to do this? I have seen the source to the libfreefare utilities, and it seems like to get a handle on a tag, you have to go through the problematic anticollison, where I'm running into problems. Is there a good way to just log the raw responses (without driver framing) that are received from the tag?

doegox commented 4 years ago

Yes, see the nfc-anticol I mentioned: https://github.com/nfc-tools/libnfc/blob/master/examples/nfc-anticol.c

maxieds commented 4 years ago

@doegox Can you help me figure out some issues compiling the nfc-anticol.c sources locally instead of in my clone of libnfc and running make install?

Here is the output of when I run it from the systems binaries:

$ sudo LIBNFC_LOG_LEVEL=3 nfc-anticol 
info    libnfc.config   Unable to open file: /usr/local/etc/nfc/libnfc.conf
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
debug   libnfc.general  0 device(s) found using acr122_usb driver
debug   libnfc.driver.pn53x_usb device found: Bus 020 Device 012
debug   libnfc.general  1 device(s) found using pn53x_usb driver
debug   libnfc.driver.pn53x_usb 3 element(s) have been decoded from "pn53x_usb:020:012"
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   GetFirmwareVersion
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 02 fe d4 02 2a 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 06 fa d5 03 33 02 07 07 e5 00 
debug   libnfc.chip.pn53x   GetFirmwareVersion
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 02 fe d4 02 2a 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 06 fa d5 03 33 02 07 07 e5 00 
debug   libnfc.chip.pn53x   SetParameters
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 12 14 06 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 13 18 00 
debug   libnfc.general  "SCM Micro / SCL3711-NFC&RW" (pn53x_usb:020:012) has been claimed.
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0c f4 d4 06 63 02 63 03 63 0d 63 38 63 3d b0 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 08 f8 d5 07 00 00 00 00 00 07 1d 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_BitFraming (Adjustments for bit oriented frames)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0b f5 d4 08 63 02 80 63 03 80 63 3d 00 b9 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 32 01 00 f9 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 ff b0 77 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 3e e6 00 
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 32 01 01 f8 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 ff b0 77 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 3e e6 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 ff b0 3a 3b 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 06 fa d4 32 05 ff ff ff f8 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 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.general  set_property_bool NP_HANDLE_CRC False
debug   libnfc.general  set_property_bool NP_EASY_FRAMING False
debug   libnfc.general  set_property_bool NP_AUTO_ISO14443_4 False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0c f4 d4 06 63 02 63 05 63 38 63 3c 63 3d 7f 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 08 f8 d5 07 00 80 40 00 10 00 54 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.pn53x_usb TX: 00 00 ff 08 f8 d4 08 63 02 00 63 03 00 59 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   SetParameters
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 12 04 16 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 13 18 00 
NFC reader: SCM Micro / SCL3711-NFC&RW opened

Sent bits:     26 (7 bits)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 63 3d 86 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 00 24 00 
debug   libnfc.chip.pn53x   PN53X_REG_CIU_BitFraming (Adjustments for bit oriented frames)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 63 3d 07 7d 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 42 26 c4 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 43 00 01 e7 00 
debug   libnfc.chip.pn53x   PN53X_REG_CIU_Control (Contains miscellaneous control bits)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 63 3c 87 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 11 13 00 
Received bits: 1 (1 bits)
Sent bits:     93  20  
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 63 3d 86 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 07 1d 00 
debug   libnfc.chip.pn53x   PN53X_REG_CIU_BitFraming (Adjustments for bit oriented frames)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 63 3d 00 84 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.chip.pn53x   No timeout
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 42 93 20 37 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 08 f8 d5 43 00 78 0d d7 d2 70 4a 00 
Received bits: 78  0d  d7  d2  70  
Sent bits:     93  70  78  0d  d7  d2  70  c6  01  
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.chip.pn53x   No timeout
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0b f5 d4 42 93 70 78 0d d7 d2 70 c6 01 82 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 43 01 e7 00 
debug   libnfc.chip.pn53x   Chip error: "Timeout" (01), returned error: "RF Transmission Error" (-20))
Sent bits:     e0  50  bc  a5  
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.chip.pn53x   No timeout
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 06 fa d4 42 e0 50 bc a5 59 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 43 01 e7 00 
debug   libnfc.chip.pn53x   Chip error: "Timeout" (01), returned error: "RF Transmission Error" (-20))
Sent bits:     50  00  57  cd  
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.chip.pn53x   No timeout
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 06 fa d4 42 50 00 57 cd 76 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 43 01 e7 00 
debug   libnfc.chip.pn53x   Chip error: "Timeout" (01), returned error: "RF Transmission Error" (-20))

Found tag with
 UID: 780dd7d2
ATQA: 0001
 SAK: 78
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   InRelease
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 52 00 da 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 53 00 d8 00 
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 32 01 00 f9 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 ff b0 77 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 3a ea 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 ff b0 3e 37 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 

And here are bigger problems when I run my local copy of the same source in my home directory linked with -lnfc (still executing with sudo permissions):

$ sudo LIBNFC_LOG_LEVEL=3 ./Bin/NFCAntiCollisionMod 
info    libnfc.config   Unable to open file: /usr/local/etc/nfc/libnfc.conf
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
debug   libnfc.general  0 device(s) found using acr122_usb driver
debug   libnfc.driver.pn53x_usb device found: Bus 020 Device 012
debug   libnfc.general  1 device(s) found using pn53x_usb driver
debug   libnfc.driver.pn53x_usb 3 element(s) have been decoded from "pn53x_usb:020:012"
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   GetFirmwareVersion
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 02 fe d4 02 2a 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 06 fa d5 03 33 02 07 07 e5 00 
debug   libnfc.chip.pn53x   GetFirmwareVersion
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 02 fe d4 02 2a 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 06 fa d5 03 33 02 07 07 e5 00 
debug   libnfc.chip.pn53x   SetParameters
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 12 14 06 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 13 18 00 
debug   libnfc.general  "SCM Micro / SCL3711-NFC&RW" (pn53x_usb:020:012) has been claimed.
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0c f4 d4 06 63 02 63 03 63 0d 63 38 63 3d b0 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 08 f8 d5 07 00 00 00 00 00 07 1d 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_BitFraming (Adjustments for bit oriented frames)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0b f5 d4 08 63 02 80 63 03 80 63 3d 00 b9 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 32 01 00 f9 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 ff b0 77 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 3e e6 00 
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 32 01 01 f8 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 ff b0 77 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 3e e6 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 ff b0 3a 3b 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 06 fa d4 32 05 ff ff ff f8 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 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.general  set_property_bool NP_HANDLE_CRC False
debug   libnfc.general  set_property_bool NP_EASY_FRAMING False
debug   libnfc.general  set_property_bool NP_AUTO_ISO14443_4 False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0c f4 d4 06 63 02 63 05 63 38 63 3c 63 3d 7f 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 08 f8 d5 07 00 80 40 00 10 00 54 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.pn53x_usb TX: 00 00 ff 08 f8 d4 08 63 02 00 63 03 00 59 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   SetParameters
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 12 04 16 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 13 18 00 
NFC reader: SCM Micro / SCL3711-NFC&RW opened

Sent bits:     26 (7 bits)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 63 3d 86 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 00 24 00 
debug   libnfc.chip.pn53x   PN53X_REG_CIU_BitFraming (Adjustments for bit oriented frames)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 63 3d 07 7d 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 42 26 c4 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 43 01 e7 00 
debug   libnfc.chip.pn53x   Chip error: "Timeout" (01), returned error: "RF Transmission Error" (-20))
Error transceiving Bits: RF Transmission Error
Error: No tag available
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   InRelease
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 52 00 da 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 53 00 d8 00 
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 32 01 00 f9 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 ff b0 77 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 3a ea 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 ff b0 3e 37 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
mathm1703:Testing mschmidt34$ LIBNFC_LOG_LEVEL=3 ./Bin/NFCAntiCollisionMod.exe 
info    libnfc.config   Unable to open file: /usr/local/etc/nfc/libnfc.conf
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
debug   libnfc.general  0 device(s) found using acr122_usb driver
debug   libnfc.driver.pn53x_usb device found: Bus 020 Device 012
debug   libnfc.general  1 device(s) found using pn53x_usb driver
debug   libnfc.driver.pn53x_usb 3 element(s) have been decoded from "pn53x_usb:020:012"
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   GetFirmwareVersion
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 02 fe d4 02 2a 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 06 fa d5 03 33 02 07 07 e5 00 
debug   libnfc.chip.pn53x   GetFirmwareVersion
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 02 fe d4 02 2a 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 06 fa d5 03 33 02 07 07 e5 00 
debug   libnfc.chip.pn53x   SetParameters
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 12 14 06 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 13 18 00 
debug   libnfc.general  "SCM Micro / SCL3711-NFC&RW" (pn53x_usb:020:012) has been claimed.
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0c f4 d4 06 63 02 63 03 63 0d 63 38 63 3d b0 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 08 f8 d5 07 00 00 00 00 00 07 1d 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_BitFraming (Adjustments for bit oriented frames)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0b f5 d4 08 63 02 80 63 03 80 63 3d 00 b9 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 32 01 00 f9 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 ff b0 77 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 3e e6 00 
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 32 01 01 f8 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 ff b0 77 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 3e e6 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 ff b0 3a 3b 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.general  set_property_bool NP_INFINITE_SELECT True
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 06 fa d4 32 05 ff ff ff f8 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 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.general  set_property_bool NP_HANDLE_CRC False
debug   libnfc.general  set_property_bool NP_EASY_FRAMING False
debug   libnfc.general  set_property_bool NP_AUTO_ISO14443_4 False
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 0c f4 d4 06 63 02 63 05 63 38 63 3c 63 3d 7f 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 08 f8 d5 07 00 80 40 00 10 00 54 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.pn53x_usb TX: 00 00 ff 08 f8 d4 08 63 02 00 63 03 00 59 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   SetParameters
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 12 04 16 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 13 18 00 
NFC reader: SCM Micro / SCL3711-NFC&RW opened

Sent bits:     26 (7 bits)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 63 3d 86 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 00 24 00 
debug   libnfc.chip.pn53x   PN53X_REG_CIU_BitFraming (Adjustments for bit oriented frames)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 63 3d 07 7d 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00 
debug   libnfc.chip.pn53x   InCommunicateThru
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 42 26 c4 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 43 01 e7 00 
debug   libnfc.chip.pn53x   Chip error: "Timeout" (01), returned error: "RF Transmission Error" (-20))
Error transceiving Bits: RF Transmission Error
Error: No tag available
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   InRelease
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 03 fd d4 52 00 da 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 53 00 d8 00 
debug   libnfc.general  set_property_bool NP_ACTIVATE_FIELD False
debug   libnfc.chip.pn53x   RFConfiguration
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 32 01 00 f9 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 02 fe d5 33 f8 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   ReadRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 04 fc d4 06 ff b0 77 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 04 fc d5 07 00 3a ea 00 
debug   libnfc.chip.pn53x   PN53X_SFR_P3 (Port 3 value)
debug   libnfc.chip.pn53x   WriteRegister
debug   libnfc.driver.pn53x_usb TX: 00 00 ff 05 fb d4 08 ff b0 3e 37 00 
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 00 ff 00 
debug   libnfc.chip.pn53x   PN53x ACKed
debug   libnfc.driver.pn53x_usb RX: 00 00 ff 03 fd d5 09 00 22 00
doegox commented 4 years ago

All seems normal to me, just that nfc-anticol didn't see any tag in the second and third runs. Did you try with a genuine iso14443A tag ?