5 Replies Latest reply: Apr 15, 2011 4:02 AM by Adriaan RSS

    problem uploading applet on nokia 6131

    834734
      Hi All,

      I am using NXP Jcop tools 3.2.7


      While trying to upload a simple empty applet on the Nokia 6131 I am having problem in the upload cmd,

      upload -b 250 "C:\Workspaces\JavaWorkspace\JCOP3.2.7\Test\bin\com\javacard\demo.cap"

      The entire JCOP Shell trace is below


      cm> /term "SCComm:1"
      --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
      IOCTL().
      ATR: T=0, T=1, Hist=0073C84013009000
      => 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00 ..............
      (47447 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 39 E9 9B 5B 99 36 5D 68 00 .P*..9..[.6]h.
      (118572 usec)
      <= 00 00 71 84 60 6B CB F2 34 21 2A 02 00 02 59 8D ..q.`k..4!*...Y.
      D3 96 1B FD BC DF 8B FB 02 C9 EB A3 90 00 ..............
      Status: No Error
      cm> ext-auth enc
      => 84 82 03 00 10 76 A9 82 6A 67 AE 47 E8 10 BE 86 .....v..jg.G....
      5B BF 39 86 CB [.9..
      (41752 usec)
      <= 90 00 ..
      Status: No Error
      cm> delete -r abcd123456
      => 84 E4 00 80 10 8F 83 2A 59 A6 AB FA 6D 9C A6 7D .......*Y...m..}
      3D 07 9A 92 7B 00 =...{.
      (53942 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 -b 250 "C:\Workspaces\JavaWorkspace\JCOP3.2.7\Test\bin\com\javacard\demo.cap"
      => 84 E6 02 00 20 9E 74 0C 6F B4 1B 11 2D CA E3 08 .... .t.o...-...
      52 35 6A 41 3E AF 6E 32 B8 BE AA 6B 42 A4 A9 FA R5jA>.n2...kB...
      A2 24 53 F5 F1 00 .$S...
      (146155 usec)
      <= 00 90 00 ...
      Status: No Error
      => 84 E8 80 00 F8 8C 2E 60 75 A8 90 30 3A 4F 4B FA .......`u..0:OK.
      1D C7 0F D0 EE CC 61 CC 85 35 10 6D 41 97 A4 45 ......a..5.mA..E
      9F 8E 45 87 31 D1 5C 83 46 82 23 8D AF 40 77 FC ..E.1.\.F.#..@w.
      10 0E F3 2A 79 D3 C3 5D 7E 88 E8 09 C2 4F E5 43 ...*y..]~....O.C
      F0 BD 91 4D 20 5F D6 FE 35 65 98 E9 3C 36 E5 E6 ...M _..5e..<6..
      C3 60 34 9D 4F EB CF 2E C0 2C 88 40 83 F9 7A E6 .`4.O....,.@..z.
      5B 43 36 2A 07 D9 A9 55 09 79 C5 62 5E CB 62 17 [C6*...U.y.b^.b.
      A7 60 F5 2B 7B DF 6E A2 2D E5 FD 84 D1 35 A1 74 .`.+{.n.-....5.t
      C3 9B 6E F3 8B 15 79 CD B5 41 3F D5 03 D4 75 DD ..n...y..A?...u.
      9F 16 F5 A6 B8 20 B5 33 2C CA 40 A6 44 0D 84 9B ..... .3,.@.D...
      49 63 2B 06 16 A7 6D 19 8A AD 89 93 2E 1A 5E 26 Ic+...m.......^&
      1C 9F 50 61 0C 8D 50 F0 84 08 90 F6 41 6E 98 29 ..Pa..P.....An.)
      9D E4 9A 83 82 2D C0 97 C1 25 FA 42 3B 3E CB 08 .....-...%.B;>..
      ED 63 E0 F3 D5 92 A5 FA D1 BA 57 7E 68 54 60 9F .c........W~hT`.
      93 6D CF 4E C3 3B C3 15 07 9E 24 22 48 F7 56 5A .m.N.;....$"H.VZ
      08 E2 98 D7 04 33 40 D3 C2 57 E8 CC 28 00 .....3@..W..(.
      (799209 usec)
      <= 6A 80 j.
      Status: Wrong data
      jcshell: Error code: 6a80 (Wrong data)
      jcshell: Wrong response APDU: 6A80
      Unexpected error; aborting execution
      cm> /atr
      resetCard with timeout: 0 (ms)
      --Waiting for card...
      ATR=3B 88 80 01 00 73 C8 40 13 00 90 00 71 ;....s.@....q
      IOCTL().
      ATR: T=0, T=1, Hist=0073C84013009000
      ver
      current version is 2.0.0.2 [1]
      build timestamp is 06-07-2009 14:01:08

      Please suggest what may be the error,

      Regards,
      Dush.
        • 1. Re: problem uploading applet on nokia 6131
          safarmer
          What is your Java Card target in your JCOP tools project? Are you targeting JC 2.2.1 or 2.2.2? You may need to go to an older version of Java Card for your project.

          Cheers,
          Shane
          • 2. Re: problem uploading applet on nokia 6131
            834734
            Hi Shane,

            My current target version is java card 2.2.2.


            Now I tried installing the appl.cap file present in Nokia SDk ,
            and i was able to upload it to my Nokia 6131,

            the stack trace follows:

            cm> upload -b 250 "C:\Dush\Workspaces\JavaWorkspace\JCOP3.2.7\Test\bin\com\javacard\appl.cap"
            => 84 E6 02 00 28 3A 91 77 DA 93 DA C0 3E 83 27 A7 ....(:.w....>.'.
            8E 89 DC 4B 81 41 1E D3 F2 D5 E4 71 EE B1 93 22 ...K.A.....q..."
            0B 1A 17 65 1F 00 B7 71 40 8A C4 CD BC 00 ...e...q@.....
            (150255 usec)
            <= 00 90 00 ...
            Status: No Error
            => 84 E8 00 00 F8 24 A7 57 21 47 F0 6C 9B 91 66 50 .....$.W!G.l..fP
            EB 4D E1 64 D5 E6 6A 0F C4 A8 C8 D5 B5 E6 42 39 .M.d..j.......B9
            2F F8 36 8F 21 50 3E 2A BF 81 8B A7 18 47 2C 3D /.6.!P>*.....G,=
            85 BA 3A DA 18 8C 78 C4 23 C3 89 DF C3 0E E2 DE ..:...x.#.......
            AB 51 49 D1 48 B5 6A 86 E2 DE 54 30 41 DF 20 DE .QI.H.j...T0A. .
            93 97 82 E3 53 30 01 62 DA EC 6F 07 9E E7 BA BC ....S0.b..o.....
            85 FC CE 91 CF 2A F6 BA 59 8B A4 05 0C 80 28 DD .....*..Y.....(.
            97 08 37 C7 2B 3B E3 C8 50 F7 EB 6A FF 2C FE CD ..7.+;..P..j.,..
            C5 65 90 96 8E 93 C9 07 9A 0E D5 ED AF D3 68 E9 .e............h.
            0F 08 15 19 7E 32 D2 5D AF 05 4F 4D 39 F4 78 DD ....~2.]..OM9.x.
            A7 FA D9 DD F1 0E AF B6 00 74 5F F3 18 9F 4B F5 .........t_...K.
            F3 D2 A2 52 19 F4 03 56 10 32 2D 5F 3B 64 7F E9 ...R...V.2-_;d..
            C6 24 A4 74 F9 70 00 58 44 F5 B4 4D 06 25 86 41 .$.t.p.XD..M.%.A
            B0 C2 8F 83 6A DA E9 2D 13 3A 1D DD 5C 1A 14 3E ....j..-.:..\..>
            D4 46 2E DE 95 29 B7 DB B3 77 67 17 B7 D4 AE A0 .F...)...wg.....
            DA 5A 03 D4 E0 2E DB 8E A8 3A 70 4F 3B 00 .Z.......:pO;.
            (393523 usec)
            <= 00 90 00 ...
            Status: No Error
            => 84 E8 80 01 C8 F8 39 80 5E B0 F9 F4 B8 73 4D EC ......9.^....sM.
            B8 C9 E9 28 2D D0 6F 3C 9D D2 6A 37 EB D4 86 0B ...(-.o<..j7....
            2F C1 FB 97 4B A2 A1 D2 67 66 EC 2A 6F EC 7A B8 /...K...gf.*o.z.
            45 DB AA AE D0 36 C4 4B 41 6C 1C F6 67 47 4D 56 E....6.KAl..gGMV
            E6 47 8D BF FA B3 69 A5 F1 15 BD 89 40 BC 3B 4D .G....i.....@.;M
            A9 01 E2 43 6F CF 8A 53 8A 91 49 A2 31 99 2F 6A ...Co..S..I.1./j
            81 B3 76 36 19 C2 F9 3A C4 E3 8B 0F DF E7 67 2F ..v6...:......g/
            17 56 8E 0E 2E 7D 2A 4C 85 AB 98 19 C6 B5 28 8E .V...}*L......(.
            B5 A5 EE 2F D7 DF E5 B2 18 FF 1A EF 7C 16 8B 16 .../........|...
            71 86 9C 88 00 90 41 FB 83 68 EE 77 51 35 05 C8 q.....A..h.wQ5..
            02 A0 03 C3 49 C8 09 A1 31 2A 9B 9A EE E4 F9 52 ....I...1*.....R
            AF 48 50 A4 0C 5F 0E DB 80 0F 8C 52 C4 E8 F4 DD .HP.._.....R....
            0E D7 25 6E 44 29 50 55 82 96 9F 86 49 00 ..%nD)PU....I.
            (842748 usec)
            <= 00 90 00 ...
            Status: No Error
            Load report:
            418 bytes loaded in 1.3 seconds
            effective code size on card:
            + package AID 11
            + applet AIDs 22
            + classes 17
            + methods 158
            + statics 34
            + exports 0
            ------------------------------
            overall 242 bytes



            cm> card-info
            => 84 F2 80 00 10 15 39 FA 14 0C 7D ED 56 D1 84 B3 ......9...}.V...
            9A 09 0D E2 EF 00 ......
            (51521 usec)
            <= 08 A0 00 00 00 03 00 00 00 0F 9E 90 00 .............
            Status: No Error
            => 84 F2 40 00 10 15 39 FA 14 0C 7D ED 56 E3 81 FF ..@...9...}.V...
            DB B6 87 D6 CD 00 ......
            (59821 usec)
            <= 0C D2 76 00 00 05 AB 05 03 E0 04 01 01 07 10 0C ..v.............
            D2 76 00 00 05 AA 05 03 E0 05 01 01 07 00 90 00 .v..............
            Status: No Error
            => 84 F2 10 00 10 15 39 FA 14 0C 7D ED 56 DB 77 53 ......9...}.V.wS
            8C 67 52 F3 1F 00 .gR...
            (85428 usec)
            <= 6A 81 j.
            Status: Function not supported
            => 84 F2 20 00 10 15 39 FA 14 0C 7D ED 56 0A C3 A1 .. ...9...}.V...
            96 F5 00 C7 69 00 ....i.
            (70632 usec)
            <= 07 A0 00 00 00 03 53 50 01 00 0C D2 76 00 00 05 ......SP....v...
            AA 04 03 60 01 04 10 01 00 0B D2 76 00 00 05 AA ...`.......v....
            05 03 E0 04 01 01 00 0B D2 76 00 00 05 AA 05 03 .........v......
            E0 05 01 01 00 0B 48 65 6C 6C 6F 41 70 70 6C 65 ......HelloApple
            74 01 00 90 00 t....
            Status: No Error

            Card Manager AID : A000000003000000
            Card Manager state : SECURED

            Application: SELECTABLE (---L----) D276000005AB0503E0040101
            Application: SELECTABLE (--------) D276000005AA0503E0050101
            Load File : LOADED (--------) A0000000035350 (Security Domain)
            Load File : LOADED (--------) D276000005AA040360010410
            Load File : LOADED (--------) D276000005AA0503E00401
            Load File : LOADED (--------) D276000005AA0503E00501
            Load File : LOADED (--------) "HelloApplet"


            Ho do I try and now install this appl.cap file.


            thanks,
            • 3. Re: problem uploading applet on nokia 6131
              834734
              got it installed with javacard ver 2.1.1,

              If you have some links to reading material that may help me in designing some applets please help.

              Also can you through some insight into how applets are implemented in real life card slike master and visa cards.

              Thanks,
              • 4. Re: problem uploading applet on nokia 6131
                safarmer
                I am pretty sure the secure element in that phone will not support JC 2.2.2 (I could be wrong though). You need to use the correct version of JC in your JCOP project for the CAP file to load.

                Cheers,
                Shane
                • 5. Re: problem uploading applet on nokia 6131
                  Adriaan
                  I can confirm that - the Nokia 6131/6212 support only up to JC 2.2.1.

                  Adriaan

                  Edited by: 797894 on Apr 15, 2011 2:02 AM