nfc - ACR122 - Android / How to extract the UID -


i try integrate acr122 android app. i'm using android library (http://www.acs.com.hk/en/products/3/acr122u-usb-nfc-reader/) available acs.

everything work, can detect presence of card want extract uid/id of card. know function that?

do have example of type of integration?

in case of mifare card need send apdu byte array card: (byte) 0xff, (byte) 0xca, (byte) 0x00, (byte) 0x00, (byte) 0x00 . i'm not sure acr122 api need wrap apdu specific api method transmit()

update

sample code:

 byte[] command = { (byte) 0xff, (byte) 0xca, (byte) 0x00, (byte) 0x00, (byte) 0x00 };  byte[] response = new byte[300];  int responselength;  responselength = reader.transmit(slotnum, command, command.length, response,response.length);  system.out.println(new string(response)); 

reader com.acs.smartcard.reader object , slotnum slot number. i’m not sure how find because don’t have acr test. if told able establish basic communication reader know slotnum.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -