Can't get ATS or ATR from smart card using PN532 contactless reader

I'm using Arduino mega 2560 and PN532 NFC contactless shield, wiring by UART interface. Can get UID values and Mifare from examples of PN532 library GitHub - elechouse/PN532: NFC library for Arduino using PN532 .
What I need to get is Answer to Reset (ATR) or Answer to Select (ATS) from card. Is there any way to get it ?

Thanks in advance!

Probably either the wiring or the code is wrong. You didn't post information for either of it.

@ynw21
choose one of the following reasons:

  • wiring wrong (we don't see your setup)
  • sketch wrong (doesn't mean I blame the provided free sketch - but we don't see YOUR sketch)
  • card damaged,
  • module with counterfeit PN532 chip (provide a link to the product you bought)

Probably I'm still finding a way to get ATS answer from card. I used examples codes and some codes I found it on internet. I don't know the codes to get ATS and I can't find function in codes to get ATS in the PN532 library. My wiring is
SDA -> 19
SCL -> 18
5v -> 5v
GND -> GND
I need codes from PN532 library or other way with C++ codes to get ATS

Probably I'm still finding a way to get ATS answer from card. I used examples codes and some codes I found it on internet. I don't know the codes to get ATS and I can't find function in codes to get ATS in the PN532 library. My wiring is
SDA -> 19
SCL -> 18
5v -> 5v
GND -> GND
I need codes from PN532 library or other way with C++ codes to get ATS
card has no damage

I bought this kind of RFID shield

My wiring

I mean I need to know the codes to get ATS answer. Only I get is UID values which is the provided examples from PN532 library and select_apdu command from nfc.inDataExchange() function from PN532 library. still can't find ways to get ATS or ATR

The RX/TX signals of the PN532 aren't on the same pins as the I2C signals. So if you connected the SDA/SCL pins to the serial pins on the Arduino you have the reason why it doesn't work.

now I change to SPI mode and It works with it's examples and I got select apdu, ATQA, SAK and read mifare. what I need to get is ATS or ATR answer. I still find a proper way to get ATR or ATS answer.

the library and examples : GitHub - adafruit/Adafruit-PN532: Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.