简体   繁体   中英

How to fix uid in NFC

I want to fix uid for nexus s and when use the phone to tag at NFC shield. The shield will show id. But when it tag at the nfc shield, id is not same. Can I fix my uid ?

What you likely see is the NFCID: the NFC peer-to-peer ID. This ID is randomly generated anew by the NFC hardware on every NFC connection and cannot be fixed.

当前的SDK不允许您使用卡片仿真,因此您无法将手机用作标签。

Because the ID changes for the peer-to-peer on every connection, you'll have to define an NDEF record with a text value in it. Make that value your fixed ID. On the other side, on the shield, you'll need to read out that record to find your fixed value/ID.

https://github.com/adafruit/Adafruit_NFCShield_I2C/tree/master/examples has some examples on how to manipulate NDEF records but only on MiFare classics. If you're using Ultralights or other kinds of tags, this will be different.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM