Problem authentication Mifare classic

Forum / MIFARE and NFC Reader IC`s / Problem authentication Mifare classic

Tagged: 

  • 4. July 2016 at 2:36
    Hi,

    I star to development with Mifare SDK in Android, I use Um10853 to star.

    this is the process to manage the card

    public void onClassicCardDetected(IMFClassic objMFCCard) {
    // TODO Auto-generated method stub
    // super.onClassicCardDetected(objMFCCard);
    Log.e(TAG, "--------------- onClassicCardDetected --------------");
    classic = objMFCCard;
    try{
    textout += "Card Detected : " + classic.getCardDetails().cardName + "\n";
    textout += "Uid :" + Utilities.dumpBytes(classic.getUID()) + "\n";
    tv.setText(textout);
    classic.getReader().connect();
    byte[] key = {(byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF};
    classic.authenticateSectorWithKeyB(2, key);
    byte[] sc_data = classic.readBlock(4);

    when it do authentication throw exception. I know the key is right

    please any help is welcome.
    + 0  |  - 0

    Re: Problem authentication Mifare classic

    5. July 2016 at 9:21
    Hi Jose,

    Before you try to read content from the MIFARE Classic you should authenticate. For instance the UID resides in block 0 and to read from block 0 you have to authenticate before the access.

    Regards,
    The MIFARE Team
    + 0  |  - 0
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.