I want to read a RFID card through NFC, the card is from the local transportation system in Bogotá, Colombia. I know this is possible because I've downloaded an android app that does just this!
My progress so far... When I put the phone over the card, my app is launched, with the ACTION_TECH_DISCOVERED intent, and I can read things like card UID but I don't know how to read the info I want, especifically the money on the card.
I've reading here in stackoverflow that what I need to do is find the application I want to access and send ADPU commands, but it looks like my card doesn't have any application because exploring the card with any android app, it always says Found 0 Applications. So, I don't know where I must get this info.
The tech info for my card is:
Thanks!
I've [read] here in stackoverflow that what I need to do is find the application I want to access and send ADPU commands.
Correct, that is exactly what you need to do. Once you got this information (i.e. a specification of the card's communication protocol), you would do something like the following:
Tag tag = ... // TODO: get tag handle from intent
IsoDep isoDep = IsoDep.get(tag);
if (isoDep != null) {
isoDep.connect();
byte[] response = isoDep.transceive(SELECT_APDU); // SELECT_APDU = 00 A4 0400 <Lc> <APPLICATION ID>
// TODO: send further APDU commands according to the protocol specification
//response = isoDep.transceive(APDU);
isoDep.close();
}
[...] but it looks like my card doesn't have any application because exploring the card with any android app, it always says Found 0 Applications.
This usually only means that there is no application on the card **that is known to the scanner app*. Many ISO-DEP cards to not have a publicly readable directory of applications that are available on the card. (Though some cards may have an EF.DIR or something similar.)
So, I don't know where I must get this info.
Right, that's usually the tricky part. There are several approaches to this: