Forum Replies Created

  • Re: Reply To: Problem authenticating a MIFARE Ultralight EV1 tag

    10. February 2017 at 20:19
    in reply to: Problem authenticating a MIFARE Ultralight EV1 tag
    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: Reply To: Problem authenticating a MIFARE Ultralight EV1 tag

    10. February 2017 at 10:44
    in reply to: Problem authenticating a MIFARE Ultralight EV1 tag
    Hi Support Team,

    I'm using MifareUltralight lib to authenticate NTAG 213 ('ultralight.transceive(PWD_AUTH_CMD);') and having the same problem as Jorge mentioned.

    I think the user-experience might not be good if we can't tell if a TagLostException is caused by wrong password or by connection error. One of the common usages of password-protection feature is to let users distinguish 'genuine' tags from 'fake' tags. However, because of this issue, we couldn't know if a read/write failure is due to authentication failure or connection error. Thus, we couldn't tell if a tag is genuine or fake unless we scan the tag several times.

    So, could you please check with dev team again to see if there is any way, either through hardware or through software, to let us distinguish authentication failure from connection error? Is it possible to throw out time-out exception as you mentioned for an invalid password?

    Hi Jorge,

    Please kindly let me know if you figured out how to solve this issue on our own.

    Thanks for help!
    Zhaoyu
    + 0  |  - 0
Viewing 2 posts - 1 through 2 (of 2 total)