×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Internal mifare in Nokia 6212 not detected using external reader

    hello readers.

    Hardware:
    ACR122 USB NFC reader
    Nokia 6212 (emulated 4k tag)

    I am having problems reading any blocks from my nokia's internal tag. The phone itself has had its secure element unlocked and i have installed a signed midlet which reads/writes data to internal mifare tag successfully.

    My problem is, using the ACR122 reader, i can load authentication keys, and even authenticate specific sectors in the mifare card, but even after doing so cannot read/write any data. (Surely it doesn't make sense that the sector trailers would be set to disallow both read and write with both keys!?). In any case, since my midlet can read/write data, surely my keys are correct and sectors allow data to be written.

    Using the tools which come with the reader, the phone is either detected as a 'generic card' or not classified at all. Putting on standard 4k or 1k tags are recognised and reported as the correct things.

    What am i missing here? what could possibly be wrong?

  2. #2
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Internal mifare in Nokia 6212 not detected using external reader

    I have noticed questions can go unanswered (and probably not looked at) for weeks if there are no replies to it, hence this message to get the ball rolling!

    cheers

  3. #3
    Registered User
    Join Date
    Nov 2008
    Posts
    13

    Re: Internal mifare in Nokia 6212 not detected using external reader

    Hi,

    We have exactly the same problem using the ACR122 reader. The reader knows there is a tag present but doesn't detect the 6212 as a mifare tag.

    When getting an ATR from a normal tag using the reader we get:

    Code:
    ACR122U Get ATR
    > ATR Value: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 02 00 00 00 00 69 
    > Active Protocol: T=CL
    > Card Type: ISO 14443A, Part3 (Mifare 4K)
    With the phone the answer is:

    Code:
    ACR122U Get ATR
    > ATR Value: 3B 8D 80 01 0D 78 80 84 02 00 73 C8 40 13 00 90 FF F8 
    > Active Protocol: T=CL
    Any help would be hugely appreciated.

  4. #4
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Internal mifare in Nokia 6212 not detected using external reader

    OK i think i've come up with a solution to this problem. i can't post the exact commands here now because i'm sending this from my phone. but i will post the exact commands when i get to work.

    essentially, you need to use the acr122 tool to disable the following parameters... auto ats generation and auto picc polling. this means you have to handle the polling manually (not as hard as it may sound). i used different commands to the ones listed in the API docs.

    using this solution, i have successfully managed to poll for a connection to the mobile, authenticate sectors and read from any block!

    i know this message won't help much as it is, but as mentioned, hang tight and i'll post all the steps in detail later this morning (in the next 5 hours).

    hope this will help any others struggling with this.

  5. #5
    Registered User
    Join Date
    Nov 2008
    Posts
    13

    Re: Internal mifare in Nokia 6212 not detected using external reader

    Thanks, that would be a very big help!

  6. #6
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Internal mifare in Nokia 6212 not detected using external reader

    Ok, as promised here goes.

    Set Parameters
    Either issue the following APDU commands directly or use the ACR122 tool's GUI.
    Code:
    FF 00 51 7F 00
    to disable auto PICC polling
    Code:
    FF 00 51 3F 00
    to disable auto ATS generation

    ACR122U Tool->Reader Commands->PICC Operating Parameter->Set PICC .....
    Disable "Auto PICC Polling"
    Disable "Auto ATS Generation"

    These parameters are reset everytime the reader is disconnected for me (so you may want to send the APDUs programmatically)

    Then use the following command to 'poll' for a card:
    Code:
    FF 00 00 00 04 D4 4A 01 00
    The response (if a card/phone is connected) should be in the following format:
    Code:
    D5 4B 01 01 00 02 38 04 UU UU UU UU 90 00
    where UU is the UID of the connected tag. (the 04 prior to it denotes the length of UID, in my case, 4 bytes)

    You now use this UID in your authentication command.
    Code:
    FF 00 00 00 0F D4 40 01 60 BB FF FF FF FF FF FF UU UU UU UU
    where BB is the block to authenticate, UU is the discovered UID and you can replace FF FF... with a keyset relevant to you. (I think this is for Key A, change the 60 to 61 for Key B *i think*)

    A response should be in the following format:
    Code:
    D5 41 00 90 00
    - if the third byte isn't 00 - then there was an error.

    You have now authenticated a block with a keyset for a particular UID.

    All that is left is to read the block:
    Code:
    FF 00 00 00 05 D4 40 01 30 BB
    where BB is the block to be read.

    You should get a response like the following:
    Code:
    D5 41 00 01 00 00 00 FE FF FF FF 01 00 00 00 00 FF 00 FF 90 00
    where the first three bytes and the last two bytes are status codes, the remaining 16 is your data.

    If the third byte is not 00, you had an error.

    FYI, this is not very stable. I often receive an error back when authenticating or when reading, and there's no reason i can see. My only hope is to re-poll, re-authenticate and re-read upon receiving an error.

    Let me know if this helps, i'm quite keen to know!

    Cheers

  7. #7
    Registered User
    Join Date
    Nov 2008
    Posts
    13

    Re: Internal mifare in Nokia 6212 not detected using external reader

    The procedure like you explained works perfectly using the ACR tool many thanks! Going to try and write something to the phone now,...

  8. #8
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Internal mifare in Nokia 6212 not detected using external reader

    Excellent, glad to hear it!

    And with over 100 views on this thread, hopefully some lurkers have been helped too!

  9. #9
    Registered User
    Join Date
    Nov 2008
    Posts
    13

    Re: Internal mifare in Nokia 6212 not detected using external reader

    Could you tell me where you found these commands, or just the command to write a block. Because for our project I need to write something to the phone's tag also.

    Also, would it be possible to get in contact with you? Being a master student (in Antwerp, Belgium) working on a thesis, it would be helpfull to be able to contact a professial for questions. Many thanks.

  10. #10
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Internal mifare in Nokia 6212 not detected using external reader

    The API can be found at: http://www.nfc-reader.com/NFC-smart-...API_ACR122.pdf
    This seems to be the API for the serial reader (as opposed to the ACR122U presumably indicating USB-connected). Of course, read it all, but in particular pages 12 and shortly thereafter should begin to coincide with the commands from my earlier post (including how to write to tags).

    As for being in contact, if you can try send me an email through this with your contact details I can give you the answer to this offline (privately). (I think my settings allow email contacts, if not, reply here and I'll see how to change them).

  11. #11
    Registered User
    Join Date
    Nov 2008
    Posts
    13

    Re: Internal mifare in Nokia 6212 not detected using external reader

    On your profile it says "That user has specified that they do not wish to receive emails." thats kind of why I asked .

  12. #12
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Internal mifare in Nokia 6212 not detected using external reader

    any idea where this is configured?

  13. #13
    Registered User
    Join Date
    Feb 2009
    Posts
    14

    Re: Internal mifare in Nokia 6212 not detected using external reader

    that should be it enabled; try now?

  14. #14
    Registered User
    Join Date
    Nov 2008
    Posts
    13

    Re: Internal mifare in Nokia 6212 not detected using external reader

    Jep works perfectly

  15. #15
    Registered User
    Join Date
    Feb 2009
    Posts
    28

    Re: Internal mifare in Nokia 6212 not detected using external reader

    Hi thanks for the code.

    But with my Nokia 6212 and my ACR122 I have some problem.
    When I try to authenticate a block I receive " D5 41 14 90 00 "
    --> 14 means 'Mifare: Authenticate error'.
    How can I solve this

    Thanks

Similar Threads

  1. which phones for laptop
    By dvdljns in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2006-02-14, 12:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •