开发者

PN532 Card Emulation mode

开发者 https://www.devze.com 2023-01-01 12:56 出处:网络
I am trying to configure the ACR122U\'s in card emulation mode, but i didn\'t know how to use it. I am using java 6 smartcard io for reader communication.Who worked with PN 53开发者_JAVA技巧2 card emu

I am trying to configure the ACR122U's in card emulation mode, but i didn't know how to use it. I am using java 6 smartcard io for reader communication.Who worked with PN 53开发者_JAVA技巧2 card emulation mode,Please give me some suggestions...

Thanks and Regards Anish


Configuring the PN532 to emulate a MIFARE Classic card is nearly impossible I'm sorry to say. I have been trying it the last couple weeks and had no luck. The Datasheet clearly states that it can do this but it is not clear exactly how. I do know however that a SAM is not required for MIFARE 1K emulation.

Using the PN532 command TgInitAsTarget you can emulate a Mifare Classic card by specifying the SENS_RES and SEL_RES and UID, and that always works if all you want to do is emulate a UID, however emulating a MIFARE 1K that can actually respond to MIFARE authentication an read commands is another story. Basically, when a PN532 is emulating a MIFARE 1K and receives the MIFARE authentication command (0x60 0xXX, where XX=block number) the response that you should send as an emulated card is a 4 byte random number which the initiator should then encrypt using the key provided and the internal PN532 CRYPTO1 cipher. The problem is that the initiator never responds to that random number challenge and the emulation always fails there.

I am doing this with just a PN532 so I can command the PN532 directly, I'm not sure what API is provided with the ACR122U can do but if you can's access the actual PN532 commands then that will make your life even more difficult potentially.

CHeck out my post on libnfc.org for additional details of what I've tried:

http://www.libnfc.org/community/topic/277/nfcemulatetag/

If you managed to get it to work, I would love to hear more about what you did.

BEST OF LUCK!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号