Problem authenticating a MIFARE Ultralight EV1 tag

Forum / MIFARE SDK / Problem authenticating a MIFARE Ultralight EV1 tag

  • 10. February 2017 at 18:48
    Hi,

    First, I understand that if the tag is behaving that way there is nothing that anyone can do in software and I trust you that this is the tags behavior. Therefore, I will keep the code I posted since is the only workaround that works for me. But I think you should update the Javadoc and datasheet to reflect that this is the expected behavior.

    Second (just out of curiosity, as I said I’m keeping the code I have now) I don’t understand why the states are in any way related to this behavior. What I understand is that the tag will go to HALT or IDLE state when any error happens. For example, as far as I understand, if the tag receives a wrong CRC it will go to HALT or IDLE state and then will answer with a NAK. But if the tag receives a wrong password it will also go to HALT or IDLE but, instead of answering with a NAK, it will timeout. I don’t understand why these two errors will have a different behavior even though it seems like they will go to the same state.

    Thanks for your time
    + 0  |  - 0

    Re: Problem authenticating a MIFARE Ultralight EV1 tag

    10. February 2017 at 20:19
    Hi Jorge,

    Thanks a lot for the detailed explanation. I'm using similar way to handling the exceptions as you do. And I'm using the native NFC API android.nfc.tech.MifareUltralight. However, it doesn't help:(. We'll get TagLostException in both scenarios.

    Thanks,
    Zhaoyu


    private void authenticate(MifareUltralight ultralight, byte[] password) {
    try {
    byte[] PWD_AUTH_CMD = new byte[password.length + 1];

    //PWD_AUTH code 1Bh [Ref.1 p46]
    PWD_AUTH_CMD[0] = 0x1B;

    int i = 1;
    for (byte b : password) {
    PWD_AUTH_CMD = b;
    i++;
    }
    ultralight.transceive(PWD_AUTH_CMD);
    } catch (TagLostException e) {
    Log.e("### error", "TagLostException while authenticating MifareUltralight message...", e);
    errorTagLost();
    } catch (IOException e) {
    Log.e("### error", "IOException while authenticating tag...", e);
    }
    }


    Hi Support Team,

    Anyways, thanks for clarification and quick response :)

    Zhaoyu

    + 0  |  - 0

    Re: Problem authenticating a MIFARE Ultralight EV1 tag

    22. February 2017 at 9:30
    Hello Jorge and Zhaoyu,

    To be honest, this I had to learn also with talks with NXP guys. For me as programmer it is very disappointing to deal with “communication stalls” if something goes wrong. But it is based on ISO/IEC 14443-3 definition.

    Regards,
    The TapLinx team
    + 0  |  - 0
Viewing 3 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic.