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.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -