Forum Replies Created

  • Re: Reply To: Difficulty importing & bulding sampleproject into Android Dev Studio on OSX

    17. September 2018 at 8:56
    in reply to: Difficulty importing & bulding sampleproject into Android Dev Studio on OSX
    Thank you - I will try that out
    Kind Regards,
    Phil
    + 0  |  - 0

    Re: Reply To: Mifare Classic Authenticate Sector with KeyB

    15. October 2015 at 13:18
    in reply to: Mifare Classic Authenticate Sector with KeyB
    Does any one know why the NXP Classic library will return a -1 ClassicException? Is the -1 code documented for the function below?

    classic.authenticateSectorWithKeyB(sectorNo, key);
    + 0  |  - 0

    Re: Reply To: Mifare Classic Authenticate Sector with KeyB

    3. September 2015 at 10:32
    in reply to: Mifare Classic Authenticate Sector with KeyB
    Hi David,
    Thank you for replying.
    I'm not sure you understood my first message completely.
    At first try, I did actually have another type of phone (Prestigio) on which I tested. This phone actually had the issue you are referring to, meaning, this phone's NFC controller did not recognize the Classic card.

    So my next step was to get a new phone, Samsung Galaxy S3. On this phone, when I use the SampleNxpNfcLibLite app and the NXP TagInfo app's (For your reference I put the output from Taginfo right at the end of this message in RED ,both these apps indicated that the device supports Classic Card.
    Also the SampleNxpNfcLibLite app returns "true"

    So I copied the SampleNxpNfcLibLite app and added another function specifically for the authenticate sector with keyB, which is the code in my first message above

    The code below in blue is the actual code from the SampleNxpNfcLibLite APP, this code executes and always returns true - no exceptions. My code above which I placed Just below the original code in the same app, is giving the -1 Exception.

    /** Classic Authenticate Operations. */
    private void testClassicauthenticate() {
    boolean res = false;
    try {
    NxpLogUtils.d(TAG, "testClassicauthenticate, start");
    byte sectorNo = 2;
    byte[] appId = new byte[] { 0x11, 0x11, 0x11 };
    byte[] key = { (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
    (byte) 0xFF, (byte) 0xFF };

    classic.authenticate(sectorNo, appId, key);
    res = true;
    } catch (SmartCardException e) {
    e.printStackTrace();
    }
    showMessage("authenticate :" + res, 'd');
    NxpLogUtils.d(TAG, "testClassicauthenticate, result is " + res);
    NxpLogUtils.d(TAG, "testClassicauthenticate, End");
    }



    For your reference:



    3.0
    1970-01-20 21:05:29
    <title>NXP Semiconductors MIFARE Classic (MF1S50) tag</title>
    9B:62:EC:07
    false
    <section>


    NXP Semiconductors




    MIFARE Classic (MF1S50)


    </section>
    <section>


    Maximum NDEF storage size after format: 716 bytes


    </section>
    <section>


    1 kB
    ► 16 sectors, with 4 blocks per sector
    ► 64 blocks, with 16 bytes per block


    </section>
    <section>


    MIFARE Classic compatible
    ISO/IEC 14443-3 (Type A) compatible
    ISO/IEC 14443-2 (Type A) compatible




    Tag description:
    ► TAG: Tech [android.nfc.tech.MifareClassic, android.nfc.tech.NfcA, android.nfc.tech.NdefFormatable]
    android.nfc.tech.NdefFormatable
    android.nfc.tech.MifareClassic
    android.nfc.tech.NfcA
    ► Maximum transceive length: 253 bytes
    ► Default maximum transceive time-out: 618 ms




    ID: 9B:62:EC:07
    ATQA: 0x0400
    SAK: 0x08




    <address>0</address>



    <address>1</address>



    <address>2</address>



    <address>3</address>





    <address>4</address>
    20 20 20 20 43 72 65 64 69 74 20 32 20 20 20 20


    <address>5</address>
    12 34 36 29 11 14 11 30 01 14 27 01 00 10 00 10


    <address>6</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01


    <address>7</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>8</address>
    11 11 11 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>9</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>10</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>11</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>12</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>13</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>14</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>15</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>16</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>17</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>18</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>19</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>20</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>21</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>22</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>23</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>24</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>25</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>26</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>27</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>28</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>29</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>30</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>31</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>32</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>33</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>34</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>35</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>36</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>37</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>38</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>39</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>40</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>41</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>42</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>43</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>44</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>45</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>46</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>47</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>48</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>49</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>50</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>51</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>52</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>53</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>54</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>55</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>56</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>57</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>58</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>59</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF


    <address>60</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>61</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>62</address>
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


    <address>63</address>
    00 00 00 00 00 00 FF 07 80 69 FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF



    r/R=read, w/W=write, i/I=increment,
    d=decr/transfer/restore, x=r+w, X=R+W
    data block: r/w/i/d:key A|B, R/W/I:key B only,
    I/i implies d, *=value block
    trailer (order: key A, AC, key B): r/w:key A,
    W:key B, R:key A|B, (r)=readable key
    AC: W implies R+r, R implies r


    </

    + 0  |  - 0

    Re: Reply To: Mifare SDK Lite filterIntent

    23. July 2015 at 7:40
    in reply to: Mifare SDK Lite filterIntent
    Hey David,

    Thanks for replying again. you are correct.

    For point - I have tried connection to the Mifare cards using a C# app on my PC with a Omnikey 5321 PCSC readder, and it works, I can authenticate and read the card. So now, we know our card is legit Mifare 1k.

    For the Second point, I'm beginning to believe the phone's controller does not cater for Mifare Classic.. Hence it returns android.nfc.tech.NfcA as the only supported tech list on this specific card. So i tried connecting to the card using the NFCa tag methods which provides access to NFC-A (ISO 14443-3A) properties and I/O operations.

    The Connect call actually worked and I mannaged to get the Mifare Card Serial Number (UID) Ex: 9BF44F07 in this case i used the method mNfca.getTag().getId() which returned it.

    However if i attemt to do any furhter communication i get the following from log cat.

    07-23 07:38:51.374 25442-25453/com.philicoe.wavereader I/VISA_CARD﹕ nNFCa tag discovered
    07-23 07:38:51.394 25442-25453/com.philicoe.wavereader E/NFCa﹕ NFCa Connected
    07-23 07:38:51.394 25442-25453/com.philicoe.wavereader E/NFCa﹕ Connection bytes returned: 0400
    07-23 07:38:51.394 25442-25453/com.philicoe.wavereader E/NFCa﹕ Tag ID:9BF44F07
    07-23 07:38:51.394 25442-25453/com.philicoe.wavereader I/NFCa﹕ NFCa_APDU_TO_SEND_START:FF82200006089B07084FF4
    07-23 07:38:51.394 25442-25453/com.philicoe.wavereader I/NFCa﹕ Requesting NFCa APDU: FF82200006089B07084FF4
    07-23 07:38:51.394 25442-25453/com.philicoe.wavereader I/NFCa﹕ Calling NFCa tranceive: FF82200006089B07084FF4
    07-23 07:38:56.399 25442-25453/com.philicoe.wavereader E/NFCa﹕ Error communicating with NFCa card: android.nfc.TagLostException: Tag was lost.
    07-23 07:38:56.399 25442-25453/com.philicoe.wavereader I/NFCa﹕ NFCa_APDU_TO_SEND_START:FF860000050100006100F4
    07-23 07:38:56.399 25442-25453/com.philicoe.wavereader I/NFCa﹕ Requesting NFCa APDU: FF860000050100006100F4
    07-23 07:38:56.399 25442-25453/com.philicoe.wavereader I/NFCa﹕ Calling NFCa tranceive: FF860000050100006100F4
    07-23 07:39:01.409 25442-25453/com.philicoe.wavereader E/NFCa﹕ Error communicating with NFCa card: android.nfc.TagLostException: Tag was lost.
    07-23 07:39:01.409 25442-25453/com.philicoe.wavereader E/NFCa﹕ NFCa Send complete
    07-23 07:39:01.409 25442-25453/com.philicoe.wavereader E/VISA_CARD﹕ android.nfc.tech.NfcA


    Regards,



    + 0  |  - 0

    Re: Reply To: Mifare SDK Lite filterIntent

    21. July 2015 at 10:36
    in reply to: Mifare SDK Lite filterIntent
    Any help on this?
    + 0  |  - 0

    Re: Reply To: Mifare SDK Lite filterIntent

    21. July 2015 at 10:35
    in reply to: Mifare SDK Lite filterIntent
    Hi David,

    I tried a couple of times with various different code versions, and I added the following to my onNewIntent method before using the NXP library calls:

    Tag tagFromIntent = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
    Log.e(TAG,"TagFromIntent:"+ tagFromIntent.toString());
    String curTechlist[] = tagFromIntent.getTechList();
    boolean isClassicSupported=false;
    for(int i=0;i<curTechlist.length;i++){

    if(curTechlist.contains("Classic")){
    isClassicSupported=true;
    break;
    }
    }
    if(isClassicSupported) {
    classsic2 = MifareClassic.get(tagFromIntent);
    Log.e(TAG, Integer.toString(classsic2.getType()));
    int MFSize = classsic2.getSize();
    }
    else
    {
    Log.e(TAG,"NO Classic card //\n Classic card not supported by this device");

    }




    When I checked the Log Cat, I found the below issue: on the phone the get tech list returns not a Mifare device but the following:
    android.nfc.tech.NfcA

    07-21 10:29:19.333 9072-9072/com.nxp.sampleliblite E/NFC_TAG﹕ TagFromIntent:TAG: Tech [android.nfc.tech.NfcA ]
    07-21 10:29:43.667 9072-9072/com.nxp.sampleliblite E/NFC_TAG﹕ NO Classic card //
    Classic card not supported by this device
    + 0  |  - 0

    Re: Reply To: Mifare SDK Lite filterIntent

    17. July 2015 at 11:55
    in reply to: Mifare SDK Lite filterIntent
    Hi David,

    Thank you for replying to me.

    The Device is called a Prestigio, Model PAP5501.
    For the Log cat, I need to check for you.. Will post if I see any.
    Thank you
    Regards,
    Phil
    + 0  |  - 0
Viewing 7 posts - 1 through 7 (of 7 total)