2

I have been working on a java card project for the last couple of days, and today I was given a card reader and a couple of cards, and was asked to deploy the applet on them and test them, I've basically no idea about how to deploy the app on the card, so far I've been workign with the CREF emulator, and all have been working great, now I'd like some guidance or advice from people who have already worked with this technology before, I've an Omnikey 3821 Reader, the cards I've are white and blank, I've no more information about them, I tried testing them with apps like:

  • JSmartCard Explorer
  • JSmex
  • APDUScanner

they are detected, in JSmex it's detected as an unkown card (not as a java card), can anyone show me any other way to interact with the cards? Get more information about them? Or how to deploy the .cap file on them and get the other apps to interact with them?

Thank you

PS : i'm workign with eclipse and javacard 2.2.2

EDIT :

  • I think i found a promising lead, the global plateform solution, but now i'm getting an error when trying to install the .cap file on the card, and according to the ATR i got from the card this is my Card Model

EDIT (1) :

I'm Using GPShell now, and i installed a sample hello world cap file successfuly, but when i try to install a simple counter applet which i already tried on CREF the same way i installed the hello word applet i get the following error : ( 6985 : Command not allowed - Conditions of use not satisfied ) I read the it might be version related, I usef an eclipse cap navigator plugin, and i got the following results : Major version = 2 , Minor version = 1, does that mean that the version is 2.0 - 2.1 ? but when i tried running the same navigator on the counter cap file i generated, I got the same results even though i'm using JCDK 2.2.2

btw, when i try to download the hello world source and compile it into a .cap and install it i get the same error, is it my environmenent then ?

MrNoober
  • 133
  • 1
  • 1
  • 11
  • [The error](http://cdn.imghack.se/images/0c967b7a603c35c25c5b751f0a1db6a0.png) – MrNoober May 11 '14 at 21:09
  • Instead of locking / unlocking it , you may want to authenticate using INITIALIZE UPDATE / EXTERNAL AUTHENTICATE. Note that the Global Platform specs are freely available. – Maarten Bodewes May 11 '14 at 22:19

1 Answers1

1

Try to get more info about your card using the "NFC Taginfo" Android app by NXP. It's been quite helpful for me when developing for Javacard. It will show a lot of information about your smartcard. If you can, please show here the data you get from this app when scanning your card.

Assuming it is a JCOP Javacard, you can always use JCOP Tools to load the .cap file. It's a pretty straightforward process. You must first have a NXP Docstore account and then send an email to tools.jcop@nxp.com asking for the JCOP Tool. Once you install the JCOP tools you can use the plugin for Eclipse to load and install the applet into the javacard.

About INITIALIZE UPDATE/EXTERNAL AUTHENTICATE

If your Javacard is GlobalPlatform compliant (you will know it using NFC Taginfo), it means that you will have to use GlobalPlatform commands to load and install the applet. One of the first steps is to create a secure channel between the off-card application (your omnikey reader) and the card. This is made through the INITIALIZE UPDATE and EXTERNAL AUTHENTICATE.

Carlos Roso
  • 1,435
  • 1
  • 11
  • 14
  • "Your registration at NXP DocStore cannot be executed. The account will not be activated due to the rejection reason shown below: no registration without NDA: please contact your local NXP support team" have any idea what this is about ? – MrNoober May 12 '14 at 09:36
  • I'm Using GPShell now, and i installed a sample hello world cap file, but when i try to install a simple counter applet i already tried on CREF the same way i installed the hello word applet i get the following error : ( 6985 : Command not allowed - Conditions of use not satisfied ) – MrNoober May 12 '14 at 12:29
  • A 6985 response means that you are trying to load an applet without previously opening a Secure Channel (This is where initialize update/external authentication come to action). 1. Did you install the helloworld.cap into the card, or using the CREF? 2. Try installing the helloworld.cap into the card (not using cref) using some of the scripts they provide according to the specs of your card (e.g. helloinstall211.txt, helloinstallGP211.txt). Please provide more information about your card (Global Platform version, Javacard version, is it a JCOP card?). – Carlos Roso May 12 '14 at 22:55
  • I installed the HelloWorld.cap using a provided script then i used the same script with my file and it gave me this error, here are the used [scripts](http://pastebin.com/khqZ9nH6) – MrNoober May 13 '14 at 06:16
  • if i installed it with the HelloInstall.txt shouldn't i be able to install my cap file with the exact same script ? – MrNoober May 13 '14 at 16:11
  • Try installing it step by step (establish_context, connect_card, open_sc, etc) without using the script and show here the output. I still don't get why you can install the HelloWorld.cap using the script but not your own .cap file. It seems that you're not capable of opening a Secure Channel. Try the "open_sc" command with the same parameters of the script and show the tell us what happen. – Carlos Roso May 14 '14 at 19:12