Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
itsystems
Posts: 2
Registered: ‎04-07-2009

APDU Connection problem

As per ISO/IEC 7816-4 specifications, various APDU commands can be executed to get data (SELECT, READ BINARY, READ RECORD, GET RESPONSE etc.) from the SIM. But, if I am not wrong, Application IDs (like

a0.00.00.00.62.03.01.0c.02.01

) are required to execute the commands.

Ex 

"apdu:0;target=a0.00.00.00.62.03.01.0c.02.01"; 

How can we get these AIDs?

I don't need to install any application on the SIM: I need only to read informations in the SIM's ElementaryFile.
Is there any other way to access SIM resources or it can be accomplished using APDU commands but without requiring Application ID? Or are there any wrappers above APDU, which can be used for this purpose.

Thanks in advance!

 

Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: APDU Connection problem

You can communicate with an application installed on the SIM card.  Reading arbitrary data from a SIM card is not supported.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
New Developer
bbguru_2009
Posts: 6
Registered: ‎11-15-2009

Re: APDU Connection problem

> You can communicate with an application installed on the SIM card.

 

< What do you mean please.

 

Thks.

Please use plain text.
New Developer
bbguru_2009
Posts: 6
Registered: ‎11-15-2009

Re: APDU Connection problem

> You can communicate with an application installed on the SIM card.

 

< Can I execute the "RUN GSM ALGORITHM" described in the specification of GSM 11.11 (specification of the interface between the Mobile equipment and the SIM card).

 

Here is the definition of the RUN GSM ALGORITHM provided by the GSM 11.11 specification:

 

8.16 RUN GSM ALGORITHM
This function is used during the procedure for authenticating the SIM to a GSM network and to calculate a
cipher key. The card runs the specified algorithms A3 and A8 using a 16 byte random number and the
subscriber authentication key Ki, which is stored in the SIM. The function returns the calculated response
SRES and the cipher key Kc.
The function shall not be executable unless DFGSM has been selected as the Current Directory and a
successful CHV1 verification procedure has been performed (see 11.3.1).
Input:
- RAND.
Output:
- SRES, Kc.
The contents of Kc shall be presented to algorithm A5 by the ME in its full 64 bit format as delivered by the
SIM.

 

Please help.

 

Thsnks in advance.

Please use plain text.
New Developer
Shekhar_H
Posts: 122
Registered: ‎09-04-2008
My Carrier: Developer

Re: APDU Connection problem

Hello All,

 

I need to get two parameters from the SIM, XRES or SRES.

 

is it possible to get these two values?

 

As Mark said, we can not read raw data from SIM but we can communicate with the Application on SIM. So in this case, can we write SIM app in any langauge and then can we communicate with BB app?

 

-Shekhar.

Please use plain text.
Contributor
kims
Posts: 10
Registered: ‎05-31-2010
My Carrier: vodafone

Re: APDU Connection problem

Hi MSohm,

 

I have the same requirement as discussed above. I want to know the commandAPDU available in net.rim.device.api.smartcard package can be used for communicating with GSM SIM card?

 

If we need to write an application on SIM card, is it related to Java card application?

 

If this is doable then how the final deployment will be done?

 

Please let me know your view on this.

 

Thanks in Advance,

Kims

Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: APDU Connection problem

You will need to work with your carrier in order to get an application onto their SIM card.

 

RIM does not provide any tools for creating such an application.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Visitor
azayed55
Posts: 1
Registered: ‎11-06-2010

APDU Connection problem

Hello,

 

I have The AID of custom application in the sim , when I try to open the apduConnection it throws IO Exception with no error message. I Debug on 8520 with 4.6.1  device with signed application. 

 

What could be the problem? 

 

Thank you so much

Please use plain text.