Loading .cap file in SmartCard

686 views
Skip to first unread message

Mohammed Alsadi

unread,
Oct 1, 2012, 2:43:56 AM10/1/12
to seek-for...@googlegroups.com
Hello everybody,,

I am new to this topic,, I have read alot about it and really like it. Now I am using jcManager program to load .cap file to an external java card and it work without any problem.
My question is : How to load .cap file to SD embedded card to make it accessible for android __???

iankits

unread,
Oct 1, 2012, 4:44:11 AM10/1/12
to seek-for...@googlegroups.com
Hi,

If I consider you mean by refering SD embedded card as MSC SD card with secure elements by G&D, Germany, then  it is very easy to load .cap file into it.

You have to use their provided tools which come with the MSC sdcard i.e JLoad. 

You have install the drivers and JLoad on the Windows XP operating system (unfortunetly, this software only works on Windows XP which may be a bottleneck for few people including me).

I hope, this is what you wanted to know. 

Mohammed Alsadi

unread,
Oct 1, 2012, 5:42:41 AM10/1/12
to seek-for...@googlegroups.com
What I mean exactly is what you said,, but the problem is that i am not able to load the .cap file to the SD card with secure element in order to be used later in by Android applications. By using an external java card i am to install .cap files using some tools such as Jload or jcManager.

iankits

unread,
Oct 1, 2012, 7:32:53 AM10/1/12
to seek-for...@googlegroups.com
Sorry. Not able to understand, where exactly you are facing the problem in the installation process. Its a straight forward approach. I installed cap files of performance tester and smartcardHelloWorld example into the MSC sdcard. It installed without any problem for me. Do you have any log of that error or message it shows when you try to load and save the applet.

What I did is explained below just for your information:

1. I used external usb sdcard reader (normal cardreader available in any hardware shop.), 
2. connect the card reader in the win xp machine,
3. open JLoad (drivers and Jload are already installed), 
4. connect to MSC, After performing a Connect with MSC inserted, the JLoad 3.1 automatically performs authentication with the default Card Manager Keys. (if this works, then go ahead)
5. Load and Save Applet from select wizard. The applet will be loaded and Certain parameters such as AIDs are read from the CAP file.

Rest you can read the documentation given with MSC sdcard.

Mohammed Alsadi

unread,
Oct 1, 2012, 8:51:22 AM10/1/12
to seek-for...@googlegroups.com
My problem is in the fourth step .. I am not able to access the MSC

Johannes Start

unread,
Oct 1, 2012, 9:19:21 AM10/1/12
to seek-for...@googlegroups.com
Hello,

did you install the Secure Mobile Driver from the applications directory of the DevKit?

-
Johannes

2012/10/1 Mohammed Alsadi <mehmet...@gmail.com>

Mohammed Alsadi

unread,
Oct 2, 2012, 1:53:35 AM10/2/12
to seek-for...@googlegroups.com
The picture below contains the devices which I have

There is an OMNIKEY card reader and an external java card (AUSTRIACARD 90998/009) and also a mobile with ANDROID operating system.
bu using JLoad 3.1.0 i was able to load .cap files to the card showed in the picture above. But I want to do is to load that .cap file to the M'croSD which is inside the mobile.

Mohammed Alsadi

unread,
Oct 2, 2012, 4:02:22 AM10/2/12
to seek-for...@googlegroups.com, johanne...@googlemail.com
Johannes Start,, 
I am using Windows 7 so that i could not download the Mobile Secure element driver.. I am now searching for a version that works on Windows7

James Frank

unread,
Jan 25, 2017, 9:07:34 AM1/25/17
to seek-for-android
Hello I have a problem installing a menu based application on my smart card. I am using JLoad. When I load and install an application that do not require a menu. It installs successfully.

Below is my code

package kaka.co.ke;

import javacard.framework.*;
import sim.access.*;
import sim.toolkit.*;

public class kakaApplet extends Applet implements ToolkitConstants, ToolkitInterface
{


 private static final byte CMD_QUALIFIER = (byte)0x80;

  private byte[] menuEntry = {'M','y','M','e','n','u'};
  private byte[] textBuf = {'H','e','l','l','o'};

  private ToolkitRegistry reg;
  private SIMView gsmFile;
  
  public kakaApplet(){
 
//Get the GSM application reference
    gsmFile = SIMSystem.getTheSIMView();

    reg = ToolkitRegistry.getEntry();

    reg.initMenuEntry(menuEntry,
                      (short) 0, 
                      (short) menuEntry.length,
                      PRO_CMD_DISPLAY_TEXT,
                      false,
                      (byte) 0,
                      (short) 0); 
 
  }
  
public static void install(byte[] bArray, short bOffset, byte bLength) 
{
new kakaApplet().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
}

public void processToolkit(byte event)
    throws ToolkitException
  {
    ProactiveHandler ph = ProactiveHandler.getTheHandler();

    if (event == EVENT_MENU_SELECTION) {


       ph.init((byte) PRO_CMD_DISPLAY_TEXT, (byte) CMD_QUALIFIER, DEV_ID_DISPLAY);
       ph.appendTLV((byte)(TAG_TEXT_STRING | TAG_SET_CR),
                    textBuf,
                    (short) 0, 
                    (short) textBuf.length);
      ph.send();
    }
  }
public void process(APDU apdu)
{
if (selectingApplet())
{
return;
}

byte[] buf = apdu.getBuffer();
switch (buf[ISO7816.OFFSET_INS])
{
case (byte)0x00:
break;
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
}
}





}

Capture1.PNG
Reply all
Reply to author
Forward
0 new messages