×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jul 2010
    Location
    Vienna
    Posts
    11

    Problem uploading an applet to the SE with GPShell

    Hello everybody.
    First of all, I have a Nokia 6212 NFC, and it's already unlocked with Nokia Unlock MIDlet.

    I'm trying to upload an applet to the SE with GPShell but it seems I'm not selecting the correct AID...

    mode_211
    enable_trace
    establish_context
    card_connect
    select -AID A000000003000000
    Command --> 00A4040008A000000003000000
    Wrapped command --> 00A4040008A000000003000000
    Response <-- 6A82
    select_application() returns 0x80216A82 (6A82: The application to be selected could not be found.)

    On the other hand, if I just send the SELECT command, the response is:

    mode_211
    enable_trace
    establish_context
    card_connect
    select
    Command --> 00A4040000
    Wrapped command --> 00A4040000
    Response <-- 6F2383023F008801008A010582023F008D02EF0384008C050F010101FFAB068401309E01019000
    card_disconnect
    release_context

    Could anybody explain me which is the correct AID to use?
    TIA and regards
    Alfonso

  2. #2
    Registered User
    Join Date
    Jul 2010
    Location
    Vienna
    Posts
    11

    Re: Problem uploading an applet to the SE with GPShell

    By the way, my hw config is: ACR122U reader (touchatag) and Nokia 6221.

    Any idea would be very appreciated!

    Alfonso

  3. #3
    Registered User
    Join Date
    Feb 2009
    Location
    Hagenberg, Austria
    Posts
    121

    Re: Problem uploading an applet to the SE with GPShell

    Hallo Alfonso,

    I had the same problem in the past. In the end, my solution was to switch to another smart card reader.

    The problem is, that you are not sending commands to the contactless smart card (i.e. the Nokia phone's secure element). Instead you send the commands to the reader's SAM module. This module has no card manager with that AID and consequently replies that the application could not be selected.

    If you take a look at the reader's API manuals, you will see that there are two versions of the reader, one with SAM and one without.
    * The manual of the SAM version explains that contactless communication is only possible with pseudo APDUs. Regular APDUs are only used to communicate with the internal SAM module.
    * The manual of the reader version without SAM on the other hand explains that regular APDUs can be used to communicate with contactless smart cards.

    So you could try to remove the SAM from the reader and see if the reader acts as the SAM-less version then. (I have not tested this and I do not really expect this to work but it would be interesting to prove me wrong!)

    br,
    Michael

  4. #4
    Registered User
    Join Date
    Jul 2010
    Location
    Vienna
    Posts
    11

    Re: Problem uploading an applet to the SE with GPShell

    Hallo Michael,

    I've removed the sim card inserted in the SAM slot and then I've tried this GPShell script:

    mode_211
    enable_trace
    establish_context
    card_connect -readerNumber 1
    select
    Command --> 00A4040000
    Wrapped command --> 00A4040000
    select_application() returns 0x000006F7 (The fragment has received incorrect data)

    The reader seems to work, but I think the APDU processing is still wrong...
    Do you think the only way to solve this problem (and upload the applet to the SE of the phone with success) is to change the reader for another without SAM??

    Danke tshön
    Regards
    Alfonso
    Last edited by perdyprosty; 2010-11-24 at 10:31.

  5. #5
    Registered User
    Join Date
    Feb 2009
    Location
    Hagenberg, Austria
    Posts
    121

    Re: Problem uploading an applet to the SE with GPShell

    Hallo Alfonso,

    as the APDUs transfered by GPShell are defined inside the globalplatform library, I don't see any chance to adapt GPShell's behavior to the requirements of the ACR122U (i.e. wrapping commands into pseudo APDUs).

    br,
    Michael

  6. #6
    Registered User
    Join Date
    Jul 2010
    Location
    Vienna
    Posts
    11

    Re: Problem uploading an applet to the SE with GPShell

    Hallo Michael,
    Do you think the only solution could be to change the reader to another ACR122U without SAM?
    Could you tell me which reader are you using to download applets into the SE?
    It would help me so much in order to buy another reader.

    TIA and regards
    Alfonso
    Last edited by perdyprosty; 2010-11-24 at 10:28.

  7. #7
    Registered User
    Join Date
    Feb 2009
    Location
    Hagenberg, Austria
    Posts
    121

    Re: Problem uploading an applet to the SE with GPShell

    Hallo Alfonso,

    I'm using an Omnikey 5321.

    br,
    Michael

  8. #8
    Registered User
    Join Date
    Jul 2010
    Location
    Vienna
    Posts
    11

    Re: Problem uploading an applet to the SE with GPShell

    Hallo Michael,

    Using an ACR122U from ACS, without SAM, it works properly (the version from touchatag ACR122U-SAM doesn't work for applet uploading, everybody have to NOTICE this).

    Thank you!
    Alfonso

  9. #9
    Registered User
    Join Date
    Jul 2010
    Location
    Vienna
    Posts
    11

    Re: Problem uploading an applet to the SE with GPShell

    Quote Originally Posted by mroland View Post
    Hallo Alfonso,

    I'm using an Omnikey 5321.

    br,
    Michael
    It's worked fine with the Omnikey reader as well,
    Thanks Michael

Similar Threads

  1. Some question about install applet on SE
    By joykyo in forum Near Field Communication
    Replies: 3
    Last Post: 2010-02-27, 07:44
  2. Installing applet in SE memory
    By berroto in forum Near Field Communication
    Replies: 9
    Last Post: 2010-02-27, 06:37
  3. loading applet to SE
    By ggeorge82 in forum Near Field Communication
    Replies: 6
    Last Post: 2010-02-27, 06:25
  4. Re: How to set APPLET as default in SE
    By scc in forum Near Field Communication
    Replies: 0
    Last Post: 2009-06-12, 21:38
  5. Applet into SE
    By klo_go in forum Near Field Communication
    Replies: 4
    Last Post: 2007-11-26, 11:40

Posting Permissions

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