1

i am new to java card development.i have jcop 31(36k) card and scl010 reader.i have install jcop plugin for eclipse.when i run my helloworld java applet in simulater(using jcop shell) it works fine.now i want to upload .cap file in to my card.i thought the way is uploading .cap file in to card run the applet in reader.(i don't know it is the best way i have attached the process i followed). when i load cap file it gives this error

 **upload -b 250 "C:\Projects\Javacard\MytestThree\bin\hms\javacard\testthree\javacard\testthree.cap"
 => 80 E6 02 00 15 08 6D 79 61 70 70 6C 65 74 08 A0    ......myapplet..
    00 00 00 03 00 00 00 00 00 00 00                   ...........
 (26209 usec)
 <= 00 90 00                                           ...
Status: No Error
 => 80 E8 00 00 FA C4 82 01 65 01 00 29 DE CA FF ED    ........e..)....
    02 02 04 00 01 08 6D 79 61 70 70 6C 65 74 16 68    ......myapplet.h
    6D 73 2F 6A 61 76 61 63 61 72 64 2F 74 65 73 74    ms/javacard/test
    74 68 72 65 65 02 00 21 00 29 00 21 00 10 00 0B    three..!.).!....
    00 2E 00 0E 00 7F 00 18 00 12 00 00 00 71 02 F0    .............q..
    00 02 00 01 00 0B 01 01 00 04 00 0B 01 02 01 07    ................
    A0 00 00 00 62 01 01 03 00 10 01 0C 6D 79 61 70    ....b.......myap
    70 6C 65 74 2E 61 70 70 00 08 06 00 0E 00 00 00    plet.app........
    80 03 00 FF 00 07 01 00 00 00 1C 07 00 7F 00 01    ................
    10 18 8C 00 03 7A 05 30 8F 00 09 3D 8C 00 06 18    .....z.0...=....
    1D 04 41 18 1D 25 8B 00 02 7A 02 23 18 8B 00 01    ..A..%...z.#....
    60 03 7A 19 8B 00 05 2D 1A 03 25 11 00 FF 53 5B    `.z....-..%...S[
    32 1A 04 25 11 00 FF 53 5B 29 04 1F 10 80 6A 08    2..%...S[)....j.
    11 6E 00 8D 00 00 16 04 73 00 10 FF 80 FF 80 00    .n......s.......
    09 18 19 8C 00 07 70 08 11 6D 00 8D 00 00 7A 05    ......p..m....z.
    22 19 8B 00 05 2D 7B 00 0A 92 32 7B 00 0A 03 00    "....-{...2{....
 (779869 usec)
 <= 6A 80                                              j.
Status: Wrong data
jcshell: Error code: 6a80 (Wrong data)
jcshell: Wrong response APDU: 6A80
Unexpected error; aborting execution**

can anyone tell me what is wrong and it is help to give me some reference!

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263
Need
  • 97
  • 1
  • 11
  • Isn't this the same question as http://stackoverflow.com/q/17400053/27190? – martijno Jul 02 '13 at 19:47
  • @martijno Whoops, already closed and flagged it, but it isn't. Other status word at another time. Strange fact with similar titles at about the same time though. – Maarten Bodewes Jul 03 '13 at 22:00

1 Answers1

1

Try with -b 230 instead. -b 250 could work if the Global Platform channel was fully plain, but if it contains a 8 byte MAC over the command data then you would get a total command data size of 250 + 8 = 258, which is over the maximum of 255 bytes that is supported.

Note that 6A80 wrong data can mean a whole lot of things. You can get the same message if you have compiled/converted against the wrong target platform, for instance. ISO 7816-4 status words are not very helpful in that regard. They may show some syntax errors, but normally semantic errors are shoe-horned into these syntax errors as well.

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263
  • Thanks owlstead.i tried with -b 230.it gives same error when installing app in to java card.i don't know why after uploading they send other byte array start with 80 E8 00 00..... – Need Jul 03 '13 at 06:33
  • To understand the uploading process, check out the `LOAD` commands within the publicly downloadable Global Platform specifications. Note that you need to find out *exactly* what your card supports. If your card is compiled against Java Card 2.2.1 and the card supports 2.2.2 then it may already trigger this issue. Same goes if you don't adhere to the restrictions set for Java Card (e.g. access of static byte arrays). – Maarten Bodewes Jul 03 '13 at 07:43
  • Thanks.my card is jcop 31.it supports java card 2.2.1 and gcs 2.1.1. – Need Jul 03 '13 at 10:59
  • So you are absolutely possitive that you configured these libs correctly in JCOP dev. environment? – Maarten Bodewes Jul 03 '13 at 11:37
  • Thanks owlstead .my answer is i am done it correctly because when i used jcop contact card it works fine. – Need Jul 08 '13 at 06:21