Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2008

    Question [moved] Problem with Access to SIM Card Application

    I developed a SIM Card application and loaded that into a SIM Card. I access that without problem by a PC Java application using PC/SC.
    I develop a very simple application to Nokia 5200 J2ME, this application should send a command to my SIM Card Applet.
    At first I had problem with the Application signature, it returned "java.lang.SecurityException" error, then I signed it with a Verisign certificate.
    Now the mobile is asking for a authorization to access the SIM Card, when I say OK, there is a "Java.io.IOException" error.
    What I should do to solve this problem?

    Follow my mobile application.

    import java.io.*;

    import javax.microedition.apdu.*;
    import javax.microedition.io.Connector;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;

    public class Versao1 extends MIDlet implements Runnable {
    private APDUConnection connection;
    private Display mDisplay;
    private final byte[][] APDUs = {
    { //envia o número para cálculo
    (byte)0xA0, (byte)0x50, (byte)0x49, (byte)0x4E, (byte)0x01, (byte)0x02
    } //, {...}, {...}

    public void startApp() {
    mDisplay = Display.getDisplay(this);

    public void pauseApp() {

    public void destroyApp(boolean unconditional) {

    public void run() {
    try {
    connection = (APDUConnection)Connector.open("apdu:0;target=A0.");
    for (int i = 0; i < APDUs.length; i++) {
    byte[] apdu = APDUs[i];
    byte[] response2 = connection.exchangeAPDU(apdu);
    } catch (Exception e) {
    Form f = new Form("Exception");

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    USA, CA

    Re: [moved] Problem with Access to SIM Card Application

    The Appendix A in the JSR-177 spec defines all the security requirements for SIM card access. (In short: In addition to signing, you need to also have the APDUs listed on the Access Control List on the SIM card.)


Similar Threads

  1. Replies: 3
    Last Post: 2008-06-23, 10:25
  2. Replies: 1
    Last Post: 2008-06-23, 09:37
  3. Problem MMC+USB Connection
    By Fede81 in forum Symbian
    Replies: 1
    Last Post: 2007-06-14, 06:13
  4. how to access sim card
    By qiuhuimin in forum Symbian
    Replies: 2
    Last Post: 2004-08-02, 06:11
  5. Replies: 1
    Last Post: 2003-02-28, 16:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts