Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

SIM functions


Detailed Description

API for direct access to SIM card.

Defines

Functions


Define Documentation

#define ME_CMD_AKEY_VALIDATION
 

APDU INS AKEY VALIDATION command. Ref. 11.11

#define ME_CMD_ASK_RANDOM
 

APDU INS ASK RANDOM command. Ref. 11.11

#define ME_CMD_CHANGE_CHV
 

APDU INS CHANGE CHV command. Ref. 11.11

#define ME_CMD_CMEA_ENCRYPT
 

APDU INS CMEA ENCRYPT command. Ref. 11.11

#define ME_CMD_CONFIRM_SSD
 

APDU INS CONFIRM SSD command. Ref. 11.11

#define ME_CMD_DISABLE_CHV
 

APDU INS DISABLE CHV command. Ref. 11.11

#define ME_CMD_ENABLE_CHV
 

APDU INS ENABLE CHV command. Ref. 11.11

#define ME_CMD_ENVELOPE
 

APDU INS ENVELOPE command. Ref. 11.11, Ref. 11.14

#define ME_CMD_FETCH
 

APDU INS FETCH command. Ref. 11.11, Ref. 11.14

#define ME_CMD_GET_RESPONSE
 

APDU INS GET RESPONSE command. Ref. 11.11

#define ME_CMD_INCREASE
 

APDU INS INCREASE command. Ref. 11.11

#define ME_CMD_INTERNAL_AUTH
 

APDU INS INTERNAL AUTH command. Ref. 11.11

#define ME_CMD_INVALIDATE
 

APDU INS INVALIDATE command. Ref. 11.11

#define ME_CMD_READ_BINARY
 

APDU INS READ BINARY command. Ref. 11.11

#define ME_CMD_READ_RECORD
 

APDU INS READ RECORD command. Ref. 11.11

#define ME_CMD_REHABILITATE
 

APDU INS REHABILITATE command. Ref. 11.11

#define ME_CMD_RUN_GSM_ALGORITHM
 

APDU INS RUN GSM ALGORITHM command. Ref. 11.11

#define ME_CMD_SEEK
 

APDU INS SEEK command. Ref. 11.11

#define ME_CMD_SELECT
 

APDU INS SELECT command. Ref. 11.11

#define ME_CMD_SLEEP
 

APDU INS SLEEP command. Deprecated, do not use. Ref. 11.11, Ref. 11.14

#define ME_CMD_STATUS
 

APDU INS STATUS command. Ref. 11.11

#define ME_CMD_TERMINAL_PROFILE
 

APDU INS TERMINAL PROFILE command. Ref. 11.11, Ref. 11.14

#define ME_CMD_TERMINAL_RESPONSE
 

APDU INS TERMINAL RESPONSE command. Ref. 11.11, Ref. 11.14

#define ME_CMD_UNBLOCK_CHV
 

APDU INS UNBLOCK CHV command. Ref. 11.11

#define ME_CMD_UNKNOWN
 

Unknown APDU INS.

#define ME_CMD_UPDATE_BINARY
 

APDU INS UPDATE BINARY command. Ref. 11.11

#define ME_CMD_UPDATE_RECORD
 

APDU INS UPDATE RECORD command. Ref. 11.11

#define ME_CMD_UPDATE_SSD
 

APDU INS UPDATE SSD command. Ref. 11.11

#define ME_CMD_VERIFY_CHV
 

APDU INS VERIFY CHV command. Ref. 11.11


Function Documentation

u8 adn_ready void   ) 
 

Checks if all EF_ADN records were read by ME (i.e. Turbo knows them) and get_adn() returns valid value.

u16 read_binary u8 path,
u8  path_len,
u8 buf,
u8  len
 

SIM READ BINARY.

Parameters:
path MEM_R
path_len 
buf 
len 

u8 reg_file const u16 file,
u8  len
 

Register SIM file.

u8 PROGMEM ef_sms_path[] = { 0x3f, 0x00, 0x7f, 0x10, 0x6f, 0x3c };

... (usually ACTION_APP_INIT handling code)
reg_file (ef_sms_path, 3);
...

Parameters:
file Pointer on path, PROGMEM only.
len Number of elementes in path.
Returns:
NO_ERROR or ERR_NO_RAM, ERR_RESOURCE_BUSY if error.
See also:
unreg_file()
Examples:
fake_sim.c.

u16 select u8 path,
u8  path_len
 

SIM SELECT.

Attention:
once ready with SIM use select(0,0) to reset SIM to the state konwn by ME
Parameters:
path MEM_R
path_len 

u16 sim u8  ins,
u8  p1,
u8  p2,
u8  p3,
u8 buf
 

Send command to SIM and receive answer.

Parameters:
ins 
p1 
p2 
p3 
buf 
Returns:
stored in buf

const u8* sim_atr void   ) 
 

sim_atr() Returns SIM ATR, ref. ISO 7816, Ref. 11.11. First byte is the length of the following array.

Examples:
sysinfo.c.

const u8* sim_sst void   ) 
 

sim_sst() Returns content of EF_SST - SIM Service Table Ref. 11.11. First byte is the length of the following array.

Examples:
sysinfo.c.

void store_sms_2_sim void   ) 
 

This function can be used if appliaction has ACTION_SMS registered. In the case that SMS is received and the ACTION_SMS invoked the incoming SMS is not stored to SIM by default (it is up to the application to store it to SIM). Calling this function in the ACTION_SMS handling code causes that SIM is stored to SIM.

See also:
ACTION_SMS

void unreg_file const u16 file,
u8  len
 

Unregister SIM file.

Parameters:
file Pointer on path, PROGMEM only.
len Number of elementes in path.
See also:
reg_file()
Examples:
fake_sim.c.


Copyright © 2004-2006 BLADOX
Turbo version 1.2