Forum Replies Created

  • Re: Reply To: Mifare Classic EV1 1K fail to connect after changing keyA

    30. January 2017 at 14:50
    in reply to: Mifare Classic EV1 1K fail to connect after changing keyA
    Hi, thanks for the answer but the problem is that I get the exception earlier than you. I get the exception when connecting not when authenticating with the obsolete key:
    "I first authenticate with the default key FFFFFFFFFFFF to sector 0. Next I change the sector trailer with only the key A value changed to A1AAAABBBBBB. Then I start a new session and " now the exception is thrown while trying to connect:

    Caused by: java.io.IOException
    at android.nfc.tech.BasicTagTechnology.connect(BasicTagTechnology.java:104)
    at android.nfc.tech.MifareClassic.connect(MifareClassic.java:73)
    at com.nxp.nfclib.classic.ˋ.connect (:40)

    I change the sector trailer with:


    value = new byte[]{
    (byte) 0xA1, (byte) 0xAA, (byte) 0xAA,
    (byte) 0xBB, (byte) 0xBB, (byte) 0xBB,
    (byte) 0xFF, (byte) 0x07, (byte) 0x80, (byte) 0x69,
    (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
    (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};

    mifareClassicEv1.writeBlock(3, value)


    Which seems to be the exactly same thing as you did, but when I start the new session it will throw mentioned exception while connecting (on this line:
    mifareClassicEv1.getReader().connect()
    )

    Thanks
    + 0  |  - 0

    Re: Reply To: Mifare Classic EV1 1K fail to connect after changing keyA

    25. January 2017 at 15:38
    in reply to: Mifare Classic EV1 1K fail to connect after changing keyA
    What I found out is that if I do NOT change key (sector trailer) of the sector 0 it works perfectly fine for all other sectors (from 1 to 15).
    Is there anything special about sector 0 (except for the fact that block 0 contains manufacturer data) that 'destroys' the tag when you change the sector trailer 0 to the following value:

    new byte[]{
    (byte) 0xA1, (byte) 0xAA, (byte) 0xAA,
    (byte) 0xBB, (byte) 0xBB, (byte) 0xBB,

    (byte) 0xFF, (byte) 0x07, (byte) 0x80, (byte) 0x69,

    (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
    (byte) 0xFF, (byte) 0xFF, (byte) 0xFF};


    By 'destroys' I mean that the next attempt to call mifareClassicEv1.getReader().connect() throws exception mentioned in previous post.
    Thanks for help
    + 0  |  - 0
Viewing 2 posts - 1 through 2 (of 2 total)