1. 程式人生 > >如何使用NFC讀卡器讀取NFC卡片的UID

如何使用NFC讀卡器讀取NFC卡片的UID

                方法1:

APDU命令FFCA000000 讀取UID

ACR122U APDU Command< FF CA 00 00 00 > 04 76 BF E1 BF 02 80 90 00

方法2:

因為Mifare UltraLight卡片的UID是在卡片的第一個page和第二個Page裡面,所以我們可以直接讀取page 1個page 2資料就好了。

ACR122U Read Page

< FF B0 00 00 04 > 04 76 BF 45 90 00 > Data Read at Start Page 00> Number of Bytes Read: 04>> Hex Mode: 04 76 BF 45 ACR122U Read Page< FF B0 00 01 04
> E1 BF 02 80 90 00 > Data Read at Start Page 01> Number of Bytes Read: 04>> Hex Mode: E1 BF 02 80

參考1:

APDU "Read Binary Blocks command" 參考“ACR122U NFC Reader API.pdf”的5.3 Read Binary Blocks 章節APDU "Get UID APDU"參考“ACR122U NFC Reader API.pdf”的4.1 PICC Commands for General Purposes章節

參考2:

What is a unique identifier number and what is it used for?

ISO/IEC 14443 Type A defines a Unique IDentifer to be used for card selection and activation. The standard defines single, double and triple size UIDs which correspondingly consist of 4, 7 and 10 Byte. In many contactless systems, the UID is not only used for card activation but also as a logical reference i.e. in a background system to the card itself

MIFARE Ultralight CUnique 7 bytes serial number (UID)MIFARE Plus7 or 4 bytes UID. Optional supporting random UID