아니.. chatGPT로는 못했는데 claude 만세 -_ㅠ
What are these commands? The first command (90 60 00 00 00) is a MIFARE DESFire GetVersion command (wrapped command set). This seems to be specific to the NXP-based Android NFC stack and is not part of a typical NFC tag detection procedure. The second command (00 A4 04 00 07 D2 76 00 00 85 01 01 00) is a SELECT APDU that tries to select the NFC Forum Type 4 tag application (version 2.0) by its AID. This is part of the typical tag detection procedure for ISO 14443-4 (ISO-DEP) based tags/smartcards. Why are these commands sent before apps are notified about the presence of a tag and even if no app is active at all? A typical NFC device will automatically discover the presence of NFC tags that contain NDEF messages. Usually such NDEF messages then trigger actions on the device (e.g. start an app). As your tag seems to be an ISO 14443-4 (ISO-DEP) compliant tag/smartcard, the NDEF discovery procedure for an NFC Forum Type 4 tag is started. This procedure normally contains of the following steps:
Remark on the Broadcom NFC stack: There is a known issue that seems to still exist on Android 4.4: Even after the tag is passed to an app and the app started IsoDep communication the NFC stack arbitrarily sends READ BINARY commands interleaved with the app's communication. This frequently results into protocol errors due to invalid command sequences. This does not happen with NXP's NFC stack. Can I prevent this initial processing of a tag? Yes, but only since Android 4.4. On that platform you can use the NfcAdapter's enableReaderMode method to bring the device into a reader mode without NDEF discovery. |
8. MIFARE DESFire EV1 GetVersion command 1 Command: 90 60 00 00 00h Expected Response: XX XX XX XX XX XX XX 91 AFh 9. MIFARE DESFire EV1 GetVersion command 2. The Storage Size code (SS) value indicates the storage size, in particular: 1Ah indicates 8192 bytes, 18h indicates 4096 bytes and 16h indicates 2048 bytes Command: 90 AF 00 00 00h Expected Response: XX XX XX SW XX SS XX 91 AFh 10. MIFARE DESFire EV1 GetVersion command 3 Command: 90 AF 00 00 00h 11. Expected Response: XX XX XX XX XX XX XX XX XX XX XX XX XX 91 00 |
[링크 : https://www.nxp.com/docs/en/application-note/AN11004.pdf]
'하드웨어 > rfid_nfc_smartcard' 카테고리의 다른 글
SCardListReadersA 함수(winscard.h) (0) | 2025.03.17 |
---|---|
NTAG (0) | 2025.03.12 |
mifare desfire 인증 프로세스 (0) | 2025.03.11 |
libnfc, libfreefare (0) | 2025.02.28 |
ATQA, SAK (0) | 2025.02.28 |