×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    5

    Problems with JCOP and OmniKey 5321

    Hi folks!

    I have some trouble with loading/debugging a Java Card Applet with JCOP and a OmniKey 5321 Reader. I hope someone could help me, cuz I really want to be able to debug directly on the phone.

    At first I don't really know if the settings are set up correctly.


    In the debug process a part of the applet is loaded with the reader to the Nokia 6131 but at some point the upload fails.

    Here is a output of the jcshell:

    Code:
    cm>  /term "winscard:4|OMNIKEY CardMan 5x21-CL 0"
    --Opening terminal
    >  /card -a a000000003000000 -c com.ibm.jc.CardManager
    resetCard with timeout: 0 (ms)
    --Waiting for card...
    ATR=3B 88 80 01 00 73 C8 40 13 00 90 00 71             ;....s.@....q
    ATR: T=0, T=1, Hist=0073C84013009000
     => 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00          ..............
     (58073 usec)
     <= 6F 10 84 08 A0 00 00 00 03 00 00 00 A5 04 9F 65    o..............e
        01 FF 90 00                                        ....
    Status: No Error
    cm>  set-key 42/1/DES-ECB/404142434445464748494a4b4c4d4e4f 42/2/DES-ECB/404142434445464748494a4b4c4d4e4f 42/3/DES-ECB/404142434445464748494a4b4c4d4e4f
    cm>  init-update 42
     => 80 50 2A 00 08 4D 50 51 1A FC 58 36 88 00          .P*..MPQ..X6..
     (113411 usec)
     <= 00 00 63 42 70 1D F6 A8 01 09 2A 02 00 3B 5E CE    ..cBp.....*..;^.
        CB D7 D6 D9 43 6E 36 53 CB 11 79 BF 90 00          ....Cn6S..y...
    Status: No Error
    cm>  ext-auth enc
     => 84 82 03 00 10 81 71 70 73 9F 08 32 54 C7 AE 60    ......qps..2T..`
        A3 07 36 30 10                                     ..60.
     (45218 usec)
     <= 90 00                                              ..
    Status: No Error
    cm>  delete 7469636b65788084
     => 84 E4 00 00 18 94 9D ED E1 52 5B 57 65 66 6E A0    .........R[Wefn.
        2B 4A BB FA 29 E8 5C 51 5B 65 02 E0 66 00          +J..).\Q[e..f.
     (62191 usec)
     <= 6A 88                                              j.
    Status: Reference data not found
    jcshell: Error code: 6a88 (Reference data not found)
    jcshell: Wrong response APDU: 6A88
    Ignoring expected error
    cm>  delete 7469636b6578
     => 84 E4 00 00 18 8E 47 B4 FD 33 D7 15 E1 75 14 D4    ......G..3...u..
        B9 56 02 95 84 3B 8D 4A AE 20 40 32 1D 00          .V...;.J. @2..
     (75440 usec)
     <= 6A 88                                              j.
    Status: Reference data not found
    jcshell: Error code: 6a88 (Reference data not found)
    jcshell: Wrong response APDU: 6A88
    Ignoring expected error
    cm>  upload -d -b 250 "C:\Dokumente und Einstellungen\isis\Desktop\workspace\DemoJavaCard\bin\demo\javacard\demo.cap"
     => 84 E6 02 00 20 F2 E2 F6 E4 2F 92 F7 2D 90 06 41    .... ..../..-..A
        1B 7A 7D 6F E0 9F 9A A3 36 B7 C2 D4 D9 8A 83 10    .z}o....6.......
        7A 75 E1 D0 77 00                                  zu..w.
     (170995 usec)
     <= 00 90 00                                           ...
    Status: No Error
     => 84 E8 00 00 F8 4C 76 F5 69 C2 4E 25 30 37 54 A5    .....Lv.i.N%07T.
        76 F8 9B A8 20 43 3B 5C 01 CE DD AE A1 A4 33 98    v... C;\......3.
        85 5A 87 CE 5E A0 CE 77 D8 01 9B 8D 24 AB 83 B5    .Z..^..w....$...
        C6 B0 12 EF 6A 01 85 8C DB 79 44 F7 8A A6 C8 3F    ....j....yD....?
        46 34 13 D1 3C 99 30 AB 84 47 91 A4 1E D0 91 B6    F4..<.0..G......
        A6 8C 84 08 43 BD 2B 28 7C 8A 52 1A 48 6A 08 C9    ....C.+(|.R.Hj..
        DB FC B3 41 DE C1 23 C2 D5 A1 38 04 41 50 5C D0    ...A..#...8.AP\.
        40 8F 3E E4 9B 6F FF 92 FD EB 49 FC 68 2E BB A4    @.>..o....I.h...
        69 D7 AD BB F0 8E C3 AC 69 BE 40 24 05 3F 7C B0    i.......i.@$.?|.
        F9 AA 54 43 25 E7 15 B6 66 0F 0C 83 1D 05 D4 46    ..TC%...f......F
        69 B1 D2 D6 89 F9 5F 29 4D F8 6E 9F C0 47 8A 2D    i....._)M.n..G.-
        7A 42 B7 B4 C4 E0 38 4C 2A 84 D6 41 A0 34 C5 32    zB....8L*..A.4.2
        D7 4B 79 EB 43 9E D1 47 81 C9 30 EF D7 39 B1 D1    .Ky.C..G..0..9..
        21 41 CD A1 86 D3 68 B7 F2 80 44 F2 B3 3E E3 F0    !A....h...D..>..
        D7 95 8B 0F 4D 3A 6A BE 9D F9 D9 80 F5 BF 88 BE    ....M:j.........
        10 29 42 0F EA EF 13 DE E1 B8 9A 02 3A 00          .)B.........:.
     (441581 usec)
     <= 00 90 00                                           ...
    Status: No Error
     => 84 E8 00 01 F8 C2 00 E6 8F 97 58 8F 41 97 7A 78    ..........X.A.zx
        AE A7 23 45 8F D2 06 27 42 3C 1A 9F 40 26 19 07    ..#E...'B<..@&..
        73 7A 09 17 F2 01 BF 53 6F 31 8C 82 AB 86 4B 83    sz.....So1....K.
        10 05 57 DF E2 7C 00 05 0C 23 27 A0 A6 AE C3 7D    ..W..|...#'....}
        53 1D 71 52 67 D7 BC AF AC 24 5B 29 71 E9 61 A6    S.qRg....$[)q.a.
        40 75 8D 78 AD 4B 36 4B 1B 55 FF 50 7F 62 30 1E    @u.x.K6K.U.P.b0.
        25 D3 25 37 9A 67 0E B6 4F F2 F2 71 30 C0 F2 A5    %.%7.g..O..q0...
        0C D1 70 5A 9A 8A 85 31 41 5E 35 CA 8F 5A 52 54    ..pZ...1A^5..ZRT
        27 01 F4 8A 0C 9B 31 9E 2F 1C F3 1E 6B 05 F2 EB    '.....1./...k...
        F4 3A 5F C1 FD 0B 31 D1 66 C3 FE 86 17 B5 AA A9    .:_...1.f.......
        3C 53 14 F3 ED F4 A8 9A 3F 22 F7 BB 73 B4 C3 B1    <S......?"..s...
        58 27 8A D3 85 24 FB 3F 6B 7C CC 8C 4B ED 6C F3    X'...$.?k|..K.l.
        C2 53 F6 83 26 A5 95 39 27 2B 9A 35 79 E7 F4 2B    .S..&..9'+.5y..+
        A8 B1 65 AB 1C E0 5C 0F 0B 2E D4 9B 8D 87 5C D8    ..e...\.......\.
        5B 75 4E 5D 3F 8A 1F EC 67 26 AD 51 AC 6E FC F1    [uN]?...g&.Q.n..
        EA C7 49 E0 FE E9 16 9C 1C 99 C2 44 24 00          ..I........D$.
     (323962 usec)
     <= 00 90 00                                           ...
    Status: No Error
     => 84 E8 00 02 F8 87 E0 C3 DF 1B 37 E7 F6 84 C4 13    ..........7.....
        0B 67 0F 7A E5 F1 BD BB C6 1B 79 8B CD 05 A7 95    .g.z......y.....
        FB D3 02 A9 A5 E3 96 36 C7 5B 9F B8 F8 9D 4A C8    .......6.[....J.
        D4 FB 00 7B 72 79 7A E1 7C D3 0D E9 D1 91 BE EB    ...{ryz.|.......
        23 CD 0C FA D4 3E 1B B2 DA 7E 59 8D EB 36 EE 34    #....>...~Y..6.4
        6F F5 CF 79 DE 1F 59 A0 D6 B7 5A 57 D9 31 93 E3    o..y..Y...ZW.1..
        12 5F 23 F6 DE B5 A9 85 A9 DB E4 34 7F E1 6D DD    ._#........4..m.
        DE 37 3D 1C 5A EA 0C 98 19 B6 88 A5 0B 4B 4B CF    .7=.Z........KK.
        63 E3 30 F4 4B FA 61 2D C0 D5 A6 46 3C 4C DD 2B    c.0.K.a-...F<L.+
        81 6C 16 5F 01 04 84 65 88 D6 96 D5 14 90 7E 13    .l._...e......~.
        30 59 46 19 13 DD CA 09 0D E3 D3 48 2E 09 F0 37    0YF........H...7
        D7 EC 07 30 5A DF 77 0B 32 37 FA 30 76 4C 36 B8    ...0Z.w.27.0vL6.
        C2 8F 49 3B C1 8F E5 F4 3A 30 85 F5 BD B1 CC B7    ..I;....:0......
        E5 FA 4F 05 D9 8C FD F2 1F 68 7D 84 CC DF F3 55    ..O......h}....U
        6E 1E 06 BA 2E 54 B4 EF 54 4A 7C 4F E4 5B 5C 50    n....T..TJ|O.[\P
        51 59 BE B7 3C C9 37 B4 46 1E 90 7A 58 00          QY..<.7.F..zX.
     (141590 usec)
     <= 00 90 00                                           ...
    Status: No Error
     => 84 E8 00 03 F8 F1 5A A9 A8 E1 06 54 A2 82 D5 77    ......Z....T...w
        53 65 28 BF B7 8A AD 3E 51 F1 5E 17 57 C6 8A 75    Se(....>Q.^.W..u
        8C 83 1A 5B B3 E9 51 04 3F 34 DD 4F C9 D2 B6 CF    ...[..Q.?4.O....
        8F 85 25 C3 B3 A7 B7 2B CA C0 1E E9 44 23 BE A7    ..%....+....D#..
        49 A1 D5 CE E3 AA 96 66 03 8F 50 D3 96 A8 D2 67    I......f..P....g
        62 C7 6F 72 32 57 5E 04 34 82 66 A3 F7 2B 82 F8    b.or2W^.4.f..+..
        C6 6F BE 9E 72 7E 96 06 D7 F8 D8 74 58 95 4F CF    .o..r~.....tX.O.
        BD 8C FE E2 82 2B 39 F4 DD E4 51 73 EB FB 71 16    .....+9...Qs..q.
        D9 E0 9C 98 89 C2 9C C3 05 47 D7 B9 27 D7 D7 34    .........G..'..4
        40 1F 8B 76 66 97 C3 32 F1 A6 CB 31 6C 9A 75 5D    @..vf..2...1l.u]
        BF 2D 01 F9 F0 45 55 84 D9 A5 48 41 A5 5B 36 00    .-...EU...HA.[6.
        D4 28 F4 46 88 FE A1 32 60 F0 5B 8B B8 D3 0D D0    .(.F...2`.[.....
        47 1B 35 1B 91 5B 94 87 C3 F6 69 A5 4F 41 1C D5    G.5..[....i.OA..
        4A 12 D1 80 BE 1E 3D 31 CD 86 6D 2C 84 F7 DF 9D    J.....=1..m,....
        C8 2C 54 22 86 16 78 E8 EC 64 F0 F4 A8 C0 2C A8    .,T"..x..d....,.
        F5 73 2C 22 16 46 6B 6C B5 4B 3E 85 F3 00          .s,".Fkl.K>...
     (142359 usec)
     <= 00 90 00                                           ...
    Status: No Error
     => 84 E8 80 04 98 C9 17 5A 30 7F 6E 5E 43 F8 0E 5E    .......Z0.n^C..^
        C9 DE A6 D9 0A CB EE 3E 64 93 43 C8 85 BE 4A DF    .......>d.C...J.
        93 5C 37 55 44 6F BA E5 17 34 EE 62 BC C1 26 8C    .\7UDo...4.b..&.
        16 C2 D7 E0 25 0B E8 72 F2 1D 80 DA 79 E1 DD B2    ....%..r....y...
        94 86 40 25 C3 F2 FB FB 83 A8 95 33 A9 54 D2 E1    ..@%.......3.T..
        74 74 64 21 CD F7 2E EA 19 1D DD A0 D0 8C 8D 4B    ttd!...........K
        00 3F 1F BB D2 CC 9A B3 77 37 D3 D0 0F ED 84 AA    .?......w7......
        58 B4 7D 13 B8 0B 1A AA 00 36 03 4B 91 57 F6 56    X.}......6.K.W.V
        B0 3C E4 0B E7 AC 9E CA 37 5F D5 0F F0 95 4C 00    .<......7_....L.
        1A FF 3C 40 1D 49 AB BE 15 DA 6F 7E D8 00          ..<@.I....o~..
     (649454 usec)
     <= 6A 80                                              j.
    Status: Wrong data
    jcshell: Error code: 6a80 (Wrong data)
    jcshell: Wrong response APDU: 6A80
    Unexpected error; aborting execution
    Thanks in advance for your effort.

    Greetings and a nice weekend
    Saxos

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    182

    Re: Problems with JCOP and OmniKey 5321

    Hi Saxos,

    Please use the following script for installing a cardlet to a NFC phone thru ominkey reader.

    Please make sure that you install all the necessary drivers OK reader.

    Code:
    /terminal "winscard:4|OMNIKEY CardMan 5x21-CL 0"
    /card 
    set-key 42/1/DES-ECB/404142434445464748494A4B4C4D4E4F 
    set-key 42/2/DES-ECB/404142434445464748494A4B4C4D4E4F 
    set-key 42/3/DES-ECB/404142434445464748494A4B4C4D4E4F
    init-update 42 
    ext-auth mac 
    #this delete step will fail for first since there is no package. So comment this line using '#' and execute the remaining portion
    delete -r <put package-id your cardlet here>
    upload "C:\testcardlet.cap"
    #install package-id AID
    install <put package-id your cardlet here> <put AID your cardlet here> 
    card-info
    /close
    thanks and regards
    sunil

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

    Re: Problems with JCOP and OmniKey 5321

    Hi sunil

    Thanks.
    I had already installed all required drivers (PS/SC, Sync. API). I only didn't install the I²C-Bus API. I think it isn't neccessary.

    You posted a config script. I think its from GPShell, isn't it?

    I can upload applets via GPShell without any problem, but it isn't possible with JCOP/eclipse. So I have no possibility to debug java card applets with my IDE.

    saxos

  4. #4
    Registered User
    Join Date
    Oct 2006
    Posts
    182

    Re: Problems with JCOP and OmniKey 5321

    Quote Originally Posted by Saxos1983 View Post

    You posted a config script. I think its from GPShell, isn't it?
    No, it is a JCShell script file. Save the content of the above post (that script part) in file (say, ins.jcsh). Put it somewhere in your local drive. And, in JCOP debug shell, use /set-var path <path to script-file folder>, to set the path variable to your scrpt file folder.

    eg: /set-var path c:\jcop-script

    after that just type 'ins' and enter. this should work.

    also, you are using 'ext-auth enc'. instead of that try to use 'ext-auth mac'.

    sunil

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    8

    Re: Problems with JCOP and OmniKey 5321

    Hi everybody,
    can anybody solve this error..I am unable to install into the card.In the simulator it works fine..But on real card it isnot installing.
    APDU Traces is alsdo enabled.


    > /term "winscard:4|OMNIKEY CardMan 5x21-CL 0"
    --Opening terminal
    <div class="jive-quote"> /card -a A00000030603000200000000 -c com.ibm.jc.CardManager</div>
    resetCard with timeout: 0 (ms)
    --Waiting for card...
    ATR=3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 02 00 ;....O..........
    00 00 00 69 ...i
    ATR: T=0, T=1, Hist=804F0CA00000030603000200000000
    => 00 A4 04 00 0C A0 00 00 03 06 03 00 02 00 00 00 ................
    00 00 ..
    jcshell: Unable to select Card Manager or invalid FCI: Unknown Global Platform Java Card.
    Subsequent commands might fail! Inspection might not be possible!
    ??> /select A00000030603000200000000
    => 00 A4 04 00 0C A0 00 00 03 06 03 00 02 00 00 00 ................
    00 00 ..
    jcshell: Error code: -6 (Card terminal error)
    jcshell: Communication problems: Uno de los dispositivos vinculados al

  6. #6
    Registered User
    Join Date
    Oct 2006
    Posts
    182

    Re: Problems with JCOP and OmniKey 5321

    which type of JavaCard you are using ?

  7. #7
    Registered User
    Join Date
    Sep 2011
    Posts
    1

    Re: Problems with JCOP and OmniKey 5321

    To load the applet to a real card, you need to get rid of the debug information eclipse create. You can do that by
    Right click on Project --> Java Card Settings --> Select "Do Not Generate Debugging Information"

Similar Threads

  1. Omnikey 5321 Reader & Nokia 6131 NFC 1.1 SDk
    By geri-m in forum Near Field Communication
    Replies: 4
    Last Post: 2008-10-09, 08:07

Posting Permissions

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