Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to send SET_UP_MENU command

4292097Aug 31 2020

I developed my own STK applet and install in SIM card.

But, as I insert SIM card in smartphone, SET_UP_MENU proactive command is not sent to terminal.

My applet's codes are below.

ToolkitAppletExample
package com.example.ToolkitAppletExample;

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

public class MyToolkitApplet extends javacard.framework.Applet implements ToolkitInterface, uicc.toolkit.ToolkitConstants
{
  
public static final byte MY_INSTRUCTION  = (byte)0x46;
  
public static final byte SERVER_OPERATION  = (byte)0x0F;
  
public static final byte CMD_QUALIFIER  = (byte)0x80;
  
public static final byte EXIT_REQUESTED_BY_USER = (byte)0x10;

  
private byte[] menuEntry =   {(byte)'0',(byte)'3',(byte)'.',(byte)'1',(byte)'9',(byte)' ',(byte)'A',(byte)'p',(byte)'p',(byte)'l',(byte)'e',(byte)'t'};
  
  
private byte[] menuTitle=   {(byte)'M',(byte)'y',(byte)'M',(byte)'e',(byte)'n' ,(byte)'u'};
  
private byte[] item1 =   {(byte)'I',(byte)'T',(byte)'E',(byte)'M',(byte)'1' };
  
private byte[] item2 =   {(byte)'I',(byte)'T',(byte)'E',(byte)'M',(byte)'2' };
  
private byte[] item3 =   {(byte)'I',(byte)'T',(byte)'E',(byte)'M',(byte)'3' };
  
private byte[] item4 =   {(byte)'I',(byte)'T',(byte)'E',(byte)'M',(byte)'4' };
  
private Object[] ItemList =   { item1, item2, item3, item4 };
  
private byte[] textDText =   {(byte)'H',(byte)'e',(byte)'l',(byte)'l',(byte)'o',(byte)' ',
  
(byte)'w',(byte)'o',(byte)'r',(byte)'l',(byte)'d',(byte)'2'};
  
private byte[] textGInput =   {(byte)'Y',(byte)'o',(byte)'u',(byte)'r',(byte)' ',(byte)'n',
  
(byte)'a',(byte)'m',(byte)'e',(byte)'?'};

  
private byte[]  baGSMAID =   {(byte)0xA0, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x09, (byte)0x00, (byte)0x01};
  
private ToolkitRegistry reg;
  
private <

Comments

Post Details

Added on Aug 31 2020
0 comments
179 views