Host based card emulation, please, any instructions?

I am new to this field, I have Nexus S (CyanogenMod11 = Android Kitkat 4.4.2) and I need to use HCE (host based card emulation) to emulate a contactless card.

Any guidance on the steps and tips I need to follow to complete this? (- Do I need to program a simulated Secure Element? Put it in the cloud?)

PS: I also need to use the new reading mode, because my application will be read by another Android NfC-enabled phone, not an NFC reader.

Thanks.

+1
source share
1 answer

Prior to CyanogenMod 11, CyanogenMod supported its own host-based emulation emulation. You can register a front- IsoPcdA.transceive() dispatch for android.nfc.tech.IsoPcdA technology and then emulate a smart card using the IsoPcdA.transceive() method. See Nikolai Elenkov 's blog post on how to use this API.

However, looking at the source of CyanogenMod 11 (in particular, the NFC service) , it seems that this functionality was reset in version 11 in favor of the official Android 4.4 Android interface.

The official Android 4.4 HCE API allows applications to emulate a contactless smart card (ISO 14443-4 + ISO 7816-4 APDU) in the Android service. This service will process all incoming APDU commands for the application and create the correct response APDUs. See the official API user guide for more information on how to register such an HCE service and this answer on how to process incoming APDU commands in your HCE service.

Unfortunately, this API is not available on devices that use libnfc-nxp as a low-level NFC stack (see the empty routeAid() and enableRoutingToHost() implementation in CyanogenMod 11 source code).

So, to summarize this, it seems that currently it is not possible to use host-based emulation on a Nexus S with CM 11.

+2
source

Source: https://habr.com/ru/post/1269610/


All Articles