0
votes

Currently, I am trying to learn and develop Sim card applications using JCDK 3.0.4, a Sim reader IDBridge CT30 and two different Sim card one is a sysmoSIM-SJS1-4FF and a Taisys SIMoME and I am using JavaCardOs as my IDE and to install the applet on the Sim card. However, I am facing an issue because when I verify is GP work with my Sim card I am getting the next error "GP Verify begin ... GP Verify error: GP init update failed. recv: 6D 00". For that reason, I downloaded the gp.exe for windows7 to verified if the reader was detected by the computer and when I type the command

java -jar gp.jar -i

I get the next back:

Reader: Gemalto USB Smart Card Reader 0
ATR: 3B9F96801FC38031E073FA2100673101460FAC18F8FE
More information about your card:
http://smartcard-atr.appspot.com/parse?
ATR=3B9F96801FC38031E073FA2100673101460FAC18F8FE

***** Card info:
NO CPLC
***** CARD DATA
NO CARD DATA
***** KEY INFO
[main] WARN pro.javacard.gp.GlobalPlatform - GET DATA(Key Information Template) not supported
Exception in thread "main" java.lang.NullPointerException
    at java.io.ByteArrayInputStream.<init>(Unknown Source)
    at org.bouncycastle.asn1.ASN1InputStream.<init>(Unknown Source)
    at pro.javacard.gp.GPData.get_key_template_list(GPData.java:155)
    at 
pro.javacard.gp.GlobalPlatform.getKeyInfoTemplate(GlobalPlatform.java:369)
    at pro.javacard.gp.GPData.print_card_info(GPData.java:318)
    at pro.javacard.gp.GPTool.main(GPTool.java:443)

I researched for the answer and according to many links it said that I needed to set a key (that I don't know at all) and I found some people that for the Gemalto reader where using the next command to set the key:

java -jar gp.jar -ldvi -sdaid A000000003000000

According to the post that should fix the issue and to verified that it works I had to type the next command to verify that the reader works perfectly:

java -jar gp.jar -l -v -d

But instead, I get an error "java.lang.IllegalStateException: No selected ISD! ", that many people related with sim card pre-personalization and it is a brand specific thing. I checked the manual but it doesn't say anything about it. Can someone guide me to pre-personalize the sim card? Am I missing something else?

Thank you in advance.

1
First of all, the AID of the security domain is not a key, it is an application identifier of an application on the card, in this case the card manager (a security domain or sd, so sdaid. For later cards you may use the AID of Global Platform itself (A0000001510000) instead of the older one indicating Open Platform by VISA/Mastercard.Maarten Bodewes
You need a card with ADM keys, citing the manual: In order to install and/or manage Java Card applets on your card, you need to purchase a variant of the card that provides the ADM keys to you...Good luck!vlp

1 Answers

0
votes

I am assuming that you are trying to use a JavaCard as SIM card in cellular phone.

First of all SIM follows various specifications, such as ETSI, 3GPP, ISO and JavaCard specifications.

The crucial difference between JavaCard and SIM is the file-system (and not to forget authentication commands). Any cellular phone, accesses certain files (but not limited to) and asserts if this card is SIM card or not.

Once cellular phone finds these files (which differ from each phone developer to another one), then it gets the available applications by means of their AIDs, and if AID for USIM is found, then it tries to find another set of files.

So, I would suggest, pickup a source code of Android phone and see which all things are required, or may be to sniff a SIM communication with the phone and populate / handle those commands in your JavaCard.

This Android source code might be a good starting point for your analysis.