ryanhz / nfc_emulator

Flutter plugin to emulate an NFC card, work in peer to peer mode.
MIT License
35 stars 18 forks source link

Detect / Authorise / Decode the random generated UID #7

Open braysonjohn148 opened 2 years ago

braysonjohn148 commented 2 years ago

Passing (cardAid, cardUid, aesKey) generates a unique card ID each time, how can I determine this card belongs to which user/device. Reading the emulated card, I have a PN532 using the Adafruit library.

ryanhz commented 2 years ago

The reader should not read the card ID as the user identifier, although I know a lot of applications do.

braysonjohn148 commented 2 years ago

But HCE emulates the card ID only (cardAid, cardUid, [aesKey]). Where can I pass other details?

ryanhz commented 2 years ago

this code implement the P2P communication, so you can pass any data you want. the cardUid is send on the process command callback

braysonjohn148 commented 2 years ago

Am sorry to be asking all these questions. But the android emulator emulates these (cardAid, cardUid, [aesKey]) where can I pass the other data? For example, I want to pass extra data like "HDHWHUD87346u3hbde" to the reader apart from the one above. Please you can explain more, am not an expert in NFC/HCE I just have this feature I have to implement.

ryanhz commented 2 years ago

i think you are looking something like this: https://github.com/ConorBobbleHat/AndroidNFCEmulator I had been able to read emulated NDEF record tag using PN532 + ESP8266 Arduino