DESFire card reading steps

Forum / MIFARE SDK / DESFire card reading steps

  • 2. August 2014 at 12:02
    Hi,

    I have just started to implement MIFARE SDK for MIFARE DESFire EV1 for android using SampleNxpNfcLiteLib example.

    I am using following parameters

    byte[] masterKey = new byte[] { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
    byte[] appId = new byte[] { 0x12, 0x12, 0x12 };
    byte[] appkey = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

    If i do following steps,
    1) testDesfirepersonalize
    2) testDesfireauthenticate
    3) testDesfireRead

    then, I am getting following response in application.

    personalize:false
    aythenticate : true
    read : false

    Though "Aythenticate" is "true", reading is not performed. It is giving me "com.nxp.nfclib.exceptions.DESFireException: invalidResponse: Authentication Error".

    Can you please provide me some steps how to read DESFire EV 1 card using SDK? Whats wrong with my steps or what am i missing.

    Thanks
    + 0  |  - 0

    Re: DESFire card reading steps

    7. August 2014 at 12:21
    Hi chintanrathod,

    I tried with the latest version of the library [version 01.01.02.1427] and with new factory default card the APIS given in the sample application works perfectly for me.

    Generally Reading Steps are:
    1) Personalize the card using personalize Api. with master key and application key and appID.
    2) Authenticate the card using authenticate Api . with master key and application key and appID.
    3) Write some data. using write(byte[] data).
    4) Read back using read.

    Thanks and Regards,
    Maruthi Konda
    + 0  |  - 0

    Re: DESFire card reading steps

    7. August 2014 at 12:46
    First of all thank you very much for your response.

    My points are clear but except one. What i need to perform is only "Reading" the card. The card will be prepared by client and what i need to do is reading sensitive information from particular application id. My client will provide me "Master Key" and "Application id". I am not allowed to write any data. So i can't use Factory default card for my application. :(

    I encode a card using ".net C++". I can read those data using provided "Master Key" and "Application id". But when I am trying to do so using this API, its not allowing me to read those data. Even though authentication is done, it fires exception in "Reading data" of Authentication Fail.

    Is there any solution for this problem?
    + 0  |  - 0

    Re: DESFire card reading steps

    7. August 2014 at 13:04
    Thank you Maruthi Konda for answering chintanrathod's query.

    Hi chintanrathod,

    Factory default card can definitely[/b] be used with LITE SDK provided it is personalized using LITE SDK's personalize API. Otherwise, it is not allowed.

    But our advanced version SDK will definitely help you in this scenario where you are free to personalize the way you want and use/read contents if you know the keys, app id and file id.

    Advanced version will be announced soon.
    + 0  |  - 0

    Re: DESFire card reading steps

    7. August 2014 at 15:52
    Oh.. So the only problem is with LITE version API that if card is not written using mifare SDK then it will not allow you to read anything.

    Ok got it. I will be waiting for your Advanced version API because I need to finish my project as soon as possible.

    Thank you very much.
    + 0  |  - 0
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.