Hello,
I'm developing on Pax device and I want to manage Mifare ULTRALIGHT C (MF0ICU2)
Pax devices use a custom PayDroid OS and not a standard android, consequently, I don't have NFC android libraries.
I need to install something call NeptuneLiteAPI that expose IPCC via a library.
First, I'm a little bit lost with naming convention & standard. Api is speaking about :
Normally, Ultralight C is 14443 Type A, but I can't read my card with this option, I succeed to read with "M1 Card" option. What is a M1 card ? it it Classic 1k?
Documentation mention that I need to use APDU and expose some command to execute this kind of call
I succeed to read and write the card (with M1 function), the library expose default read/write method that use compatibility mode compatible with my card
Now, i'm trying to configure authentication and to send some command to the chip, via the APDU command.
Here is a simplication of the code I can use
iPicc = getDal().getPicc(piccType);
iPicc.open();
while(){
PiccCardInfo cardInfo = iPicc.detect(EDetectMode.ONLY_M);
if(cardInfo!=null){
//Read : works
byte[] page0=iPicc.m1Read((byte) 0);
// Write : works
iPicc.m1Write((byte)(13),hexStringToByteArray("AAAAAAAA000000000000000000000000"));
}
For writing, i have 3 methods:
if I understood well, Mifare Ultralight C does't respect APDU but APDU is the only way?
And on some website, I found that using instruction class "FF", I can sent direct instruction to chip.
But I'm lost in the command I need to send, and I try several.
I have the error (unfortunatly, they are the one NeptuneLiteAPi and not a standard one).
But it's strange, I well detect the card just before and succeed to read/write, so the card is well "connected"
I tried several commands (direct instruction, APDU instruction, CRC computation), nothing works.
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("30")); // PICC#97(unexpected error)
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("3004")); // PICC#97(unexpected error)
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("3000")); // PICC#97(unexpected error)
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("3000A802")); // Avec CRC => No specific card in sensing area, or card is not activated PICC#3(not search card error)
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("300002A8")); // Avec CRC inversé => No specific card in sensing area, or card is not activated PICC#3(not search card error)
//byte[] cmd2 = iPicc.cmdExchange(CryptageUtils.hexStringToByteArray("3000A802"),17); // Card is not activated. PICC#3(not search card error)
// byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("30000000")); // No specific card in sensing area, or card is not activated PICC#3(not search card error)
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("ff300000")); // No specific card in sensing area, or card is not activated PICC#3(not search card error)
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("ff30000F")); // No specific card in sensing area, or card is not activated PICC#3(not search card error)
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("FFCA00000004")); // No specific card in sensing area, or card is not activated PICC#3(not search card error)
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("3000000004")); // No specific card in sensing area, or card is not activated PICC#3(not search card error)
//byte[] cmd2 = iPicc.isoCommand(cardInfo.getCID(), CryptageUtils.hexStringToByteArray("3001")); // No specific card in sensing area, or card is not activated PICC#3(not search card error)
If anyone can well me or put me on the right way, I would really appreciate.
Regards.
Hi Thibaut. Did you figure it out? I'm doing the same as you but with a Mifare Classic 1k and I have the same problems. I'm looking for help too.
I will keep you posted with any progress I manage to make. I hope we can get this done together.
Regards.