0

I have a problem with HCE. I downloaded a sample code from https://github.com/grundid/host-card-emulation-sample. I build it and put it in google Nexus 5. I send the APDU to select AID and it returns successful return code. But I can't get successful return code when I put the same APP in Sony Xperia ZL. If I send APDU FFCA0000 to the two phones, they send back the UID. Can anyone tell me why I can't get successful return code when I send Select AID to the Sony Xperia ZL?

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
  • `FFCA0000` is not an APDU that is sent *to the phone*. Instead this APDU triggers the *card reader* to return the UID of a detected contactless card. – Michael Roland Jun 20 '14 at 10:45

1 Answers1

0

The reason for this is that the Sony Xperia ZL uses NXPs NFC chipset (according to this list). Current1 HCE capabilities require2 a device with Broadcom's NFC chipset.

Also see this question.

Note that even for non-HCE Android devices a contactless smartcard reader will typically detect the phone as a contactless card. In those cases the reader either detects the phone's secure element or the phone's peer-to-peer mode capabilities.



1) With current I refer to Android 4.4.2 AOSP, which is the last version where I checked the source code.

2) Unless the device manufacturer (Sony in this case) added additional functionality that's not part of AOSP. But I doubt that.

Community
  • 1
  • 1
Michael Roland
  • 39,663
  • 10
  • 99
  • 206
  • Thank you for your answer. I find someone can be successful to use this sample on Sony Xperia Z2. I find the phone use the NXP PN544. So I think that the phone can work fine in HCE with new NXP's chip. – Vega Hsieh Jun 23 '14 at 09:20
  • The Z2 contains NXP's PN547 (and not the PN544) which seems to use the NCI stack and therefore does support HCE (see [this](https://github.com/CyanogenMod/android_device_sony_shinano-common/blob/cm-11.0/proprietary-files.txt#L329). – Michael Roland Jun 24 '14 at 05:10