×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    14

    Smile SATSA ,SIM card access

    Hi

    We have a requirement of ascessing SIM card using SATSA API. I am new this Smart Card or IM technology. In the document they are saying about ENVELOPE APDU commands supported for SIM access(SAT).

    Using this can i store any type of data like game level info or is there any predeifined data storage or format. Or can we ascess the FIle System of SIM card to store data.

    On the Java site they provided a sample .. In that they are sendinf an envelop command for // Update the binary file EFpuct (Price per unit and currency table).

    Also is Nokia Series 60 3rd edition devices support SIM card access .


    //The sample Code

    /*
    * Copyright © 2004 Sun Microsystems, Inc. All rights reserved.
    * Use is subject to license terms.
    */

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

    public class SATMIDlet
    extends MIDlet
    implements CommandListener, Runnable {
    private APDUConnection mSATConnection1;
    private APDUConnection mSATConnection2;

    private Display mDisplay;
    private Form mMainForm;
    private Command mExitCommand, mGoCommand, mBackCommand;
    private Form mProgressForm;

    public SATMIDlet() {
    mExitCommand = new Command("Exit", Command.EXIT, 0);
    mGoCommand = new Command("Go", Command.SCREEN, 0);
    mBackCommand = new Command("Back", Command.BACK, 0);

    mMainForm = new Form("SAT Example");
    mMainForm.append("Press Go to use the SATSA-APDU API " +
    "to connect to a SAT application.");
    mMainForm.addCommand(mExitCommand);
    mMainForm.addCommand(mGoCommand);
    mMainForm.setCommandListener(this);
    }

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

    mDisplay.setCurrent(mMainForm);
    }

    public void pauseApp() {}

    public void destroyApp(boolean unconditional) {}

    public void commandAction(Command c, Displayable s) {
    if (c == mExitCommand) {
    notifyDestroyed();
    }
    else if (c == mGoCommand) {
    mProgressForm = new Form("Working...");
    mDisplay.setCurrent(mProgressForm);

    Thread t = new Thread(this);
    t.start();
    }
    else if (c == mBackCommand) {
    mDisplay.setCurrent(mMainForm);
    }
    }

    public void run() {
    try {
    String url = "apdu:0;target=SAT";

    setProgress("Opening first SAT connection");
    mSATConnection1 = (APDUConnection)Connector.open(url);
    // The second connection demonstrates that two SAT
    // connections can be open simultaneously.
    setProgress("Opening second SAT connection");
    mSATConnection2 = (APDUConnection)Connector.open(url);

    setProgress("Sending envelopes");
    byte[] response1 = mSATConnection1.exchangeAPDU(kEnvelope);
    byte[] response2 = mSATConnection2.exchangeAPDU(kEnvelope);

    for(int i=0;i<response1.length;i++)
    System.out.println((char)response1[i]);

    setProgress("Closing first SAT connection");
    mSATConnection1.close();

    setProgress("Closing second SAT connection");
    mSATConnection2.close();

    mProgressForm.setTitle("Working...done.");
    mProgressForm.addCommand(mBackCommand);
    mProgressForm.setCommandListener(this);
    }
    catch (Exception e) {
    try { mSATConnection1.close(); } catch (Throwable t) {}
    try { mSATConnection2.close(); } catch (Throwable t) {}

    Form f = new Form("Exception");
    f.append(e.toString());
    f.addCommand(mBackCommand);
    f.setCommandListener(this);
    mDisplay.setCurrent(f);
    }
    }

    private void setProgress(String s) {
    StringItem si = new StringItem(null, s);
    si.setLayout(Item.LAYOUT_2 | Item.LAYOUT_NEWLINE_AFTER);
    mProgressForm.append(si);
    }

    // Update the binary file EFpuct (Price per unit and currency table)
    private final byte[] kEnvelope = {
    (byte)0xA0, (byte)0xC2, (byte)0x00, (byte)0x00, (byte)0x2f,
    (byte)0xD1, (byte)0x2d, (byte)0x82, (byte)0x02, (byte)0x83,
    (byte)0x81, (byte)0x06, (byte)0x05, (byte)0x80, (byte)0x11,
    (byte)0x22, (byte)0x33, (byte)0x44, (byte)0x8B, (byte)0x20,
    (byte)0x10, (byte)0x02, (byte)0x81, (byte)0x55, (byte)0x7F,
    (byte)0xF6, (byte)0x00, (byte)0x11, (byte)0x29, (byte)0x12,
    (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x14, (byte)0x10,
    (byte)0x11, (byte)0x12, (byte)0x13, (byte)0x14, (byte)0x15,
    (byte)0x16, (byte)0x17, (byte)0x18, (byte)0x19, (byte)0x1a,
    (byte)0x1b, (byte)0x1c, (byte)0x1d, (byte)0x41, (byte)0xAB,
    (byte)0xCD, (byte)0xEF
    };
    }

  2. #2
    Super Contributor
    Join Date
    Mar 2006
    Location
    Phoenix, AZ. USA
    Posts
    556

    Re: SATSA ,SIM card access

    I think you have to be signed on the java side, with a manufacturers or carriers certificate, good luck, but I may be wrong.

    I dont even think you can access it easily, or at all from the C++ side either
    Jason Glass
    http://IChiBanComputers.Com

  3. #3
    Registered User
    Join Date
    Sep 2005
    Posts
    20

    Re: SATSA ,SIM card access

    Hi


    I didn’t know about smart card but in midp u can access sim card contacts if your mobile supports jsr 75. even your working on 60 series also some mobiles are not support jsr 75.

    yours

    sudha

  4. #4
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: SATSA ,SIM card access

    APDU is not implemented in SATSA for 3rd edition (only Crypto and PKI)
    See also http://discussion.forum.nokia.com/fo...ad.php?t=77288

    Hartti

  5. #5
    Registered User
    Join Date
    Apr 2003
    Posts
    14

    Re: SATSA ,SIM card access

    Quote Originally Posted by hartti
    APDU is not implemented in SATSA for 3rd edition (only Crypto and PKI)
    See also http://discussion.forum.nokia.com/fo...ad.php?t=77288

    Hartti
    Thanks
    Guys , This info will help us in our development.

    regard
    Abhijith V R

  6. #6
    Super Contributor
    Join Date
    Mar 2006
    Location
    Phoenix, AZ. USA
    Posts
    556

    Re: SATSA ,SIM card access

    Thanks for info Hartti!
    Jason Glass
    http://IChiBanComputers.Com

  7. #7
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Delhi
    Posts
    77

    Re: SATSA ,SIM card access

    Quote Originally Posted by sudhakarv037
    Hi


    I didn’t know about smart card but in midp u can access sim card contacts if your mobile supports jsr 75. even your working on 60 series also some mobiles are not support jsr 75.

    yours

    sudha
    hi..

    I am developing an application to access phonebook using JSR 75. I am able to access the Phone contacts but not SIM Contacts. I have tested on Nokia N72 & 6630. Can anybody help me to access SIM contacts ?

    Sunil

  8. #8
    Super Contributor
    Join Date
    Mar 2006
    Location
    Phoenix, AZ. USA
    Posts
    556

    Re: SATSA ,SIM card access

    do you get any exceptions sunil_talent

    I have a 6630, and cant access sim messages using AT commands, maybe there related?
    Jason Glass
    http://IChiBanComputers.Com

Similar Threads

  1. Nokia 6101 Locked 2 TMobile Midlet can't access internet...
    By Jason Glass in forum Mobile Java Networking & Messaging & Security
    Replies: 45
    Last Post: 2007-11-14, 02:19
  2. Problem MMC+USB Connection
    By Fede81 in forum Symbian
    Replies: 1
    Last Post: 2007-06-14, 06:13
  3. Problem MMC+USB Connection
    By Fede81 in forum General Development Questions
    Replies: 3
    Last Post: 2006-07-19, 15:21
  4. access sim card from another phone
    By dex_nokia in forum Mobile Java General
    Replies: 0
    Last Post: 2006-02-18, 14:35
  5. How to access the memory card..!!
    By mayankkedia in forum Mobile Java General
    Replies: 1
    Last Post: 2004-03-24, 05:42

Posting Permissions

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