user1490481
user1490481

Reputation: 31

Reading from a smartcard using nfc on android

I would like to ask an nfc related question for the android!

Firstly, I have created a java application to read my company's staff pass using java smartcardio api. I did it by sending an APDU command and parse the response APDU.

Now, I need to use the NFC on an android phone to read the staff pass. I used an nfc reader from the market to read my staff pass and found out that it is a mifare classic 1k card. The reader also showed me the the data in HEX for all 16 sectors. Apparently the HEX data is very different from the HEX data i got when I was using smartcardio api in java. Am I looking for the data in the wrong location? Can someone guide me to how I should proceed doing this? Thank you very much!

Upvotes: 3

Views: 5917

Answers (1)

NFC guy
NFC guy

Reputation: 10228

Your staff pass probably contains and NFC chip that can do both IsoDep and MifareClassic. You can find out exactly which ones are supported by the tag by calling getTechList() on the Tag object in the NFC intent.

In your app, you can access both IsoDep and MifareClassic, but not at the same time (call close() first before switching to another technology). IsoDep is the technology where you can use APDU commands in the transceive() method.

Upvotes: 2

Related Questions