1

If I want my android phone to emulate a physical card to the following reader: http://www.hidglobal.com/products/readers/iclass/rw100

Which AID would I have to use?

I was following this example: https://developer.android.com/guide/topics/connectivity/nfc/hce.html#HceServices

But when debugging, my code never reaches the

public byte[] processCommandApdu(byte[] commandApdu, Bundle extras) {

method. Seems the Android device still represents itself as a unique number on a HW level so I was suspecting an incorrect AID within the code may be the cause?

FYI, I am using the Sony Xperia Z3 compact with an NXP NFC chip inside...

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
Rok
  • 1,482
  • 3
  • 18
  • 37

1 Answers1

4

None.

Android HCE requires the reader to "speak" ISO/IEC 7816-4 over ISO/IEC 14443-4 (ISO-DEP). For ISO/IEC 14443 Type A this reader is only capable of reading the anti-collision identifier (UID) of cards but it does not send any APDUs. Consequently, the reader does not perform any AID based application selection.

Note that the UID cannot be configured through the Android HCE API and is randomly generated on many Android devices. Consequently, there is no sensible way you could use that reader in combination with Android devices that generate a random UID.

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
  • Thank you very much Michael! I guess regardless of the fact that my phone does not randomly generate this UID (it always returns the same number), it does not change the above facts, correct? We simply need to find a different reader right? – Rok Feb 17 '15 at 10:30
  • Well, that depends on what you want to achieve. If you want to identify this specific device, then you are done. Just use the UID that you get for your phone. If you want to communicate with an HCE app on the phone, then you will need to get another reader. – Michael Roland Feb 17 '15 at 13:47
  • I wanted to use that ID but what is interesting is that this ID is not unique. My colleague has an HTC phone, entirely different, which reports exactly the same ID as mine, indicating that these two phones must have the same chip vendor and what the HID reader reads is some kind of chip vendor id. Funny, as most other phones generate a different ID every time... Can you suggest a different reader on the market that would support what I need with iclass protocol? – Rok Feb 17 '15 at 15:27
  • Michael, do you happen to know if any of the HID readers support this APDU protocol? – Rok Feb 19 '15 at 14:46
  • No, I don't. But I suggest that you check for terms like "ISO/IEC 7816-4", "APDU", "ISO/IEC 14443-4", "T=CL", "ISO-DEP". – Michael Roland Feb 19 '15 at 23:49