Emulate Mifare smart card on NFC device (with NXP

2019-08-19 20:20发布

问题:

I'm struggling to find out how to emulate a Mifare smart card on an Android NFC device with NXP chip. Is it possible?

At http://www.mifare.net/en/micommunity/qa/ question number 4, they say there are ways to do it. Does anyone know how, in more detail? I've been trying to ask them without any answer.

And do you know whether devices using the NXP chip normally are equipped with an embedded secure element (eSE) with Mifare capabilities and where I can find info about it?

回答1:

You can't emulate a Mifare Classic smart card on an Android device with NXP NFC Controller because the Android OS doesn't support that yet. Android 4.4 introduced host-based card emulation (HCE) but only down to the ISO14443-4 layer:

Specifically, Android 4.4 supports emulating cards that are based on the NFC-Forum ISO-DEP specification (based on ISO/IEC 14443-4) and process Application Protocol Data Units (APDUs) as defined in the ISO/IEC 7816-4 specification. Android mandates emulating ISO-DEP only on top of the Nfc-A (ISO/IEC 14443-3 Type A) technology. Support for Nfc-B (ISO/IEC 14443-4 Type B) technology is optional. The layering of all these specifications is shown in the figure 3.

Mifare Classic requires some lower lever control than that so you're SOL. What's stated in http://www.mifare.net/en/micommunity/qa/ is ambiguous since it refers to Mifare in general as opposed to Mifare Classic specifically. Mifare Classic is different animal as it came out before the NFC Forum standards to form. So it's more difficult to integrate with higher level projects like Android.

RE: NXP chip with eSE. This is not always used by device manufacturers so you will have to look carefully at the architecture of the device in question. Some devices it makes sense to have an eSE but not all.