219 lines
16 KiB
C
219 lines
16 KiB
C
/******************************************************************************
|
|
|
|
*(C) Copyright 2007 Marvell International Ltd.
|
|
|
|
* All Rights Reserved
|
|
|
|
******************************************************************************
|
|
* Filename: telSIM.h
|
|
|
|
* Description: Process MM related AT commands
|
|
*
|
|
* History:
|
|
* May 31, 2008 - Johnny He, Creation of file
|
|
* Oct 16, 2008 - Qiang XU, Modification for optimization
|
|
*
|
|
******************************************************************************/
|
|
#ifndef TELSIM_H
|
|
#define TELSIM_H
|
|
|
|
#include "ci_api_types.h"
|
|
|
|
#define MAX_DFNAME_LEN 34
|
|
typedef enum SimFileDirTag
|
|
{
|
|
SIM_FILE_DIR_MF = 0x3f00,
|
|
SIM_FILE_DIR_DF_MEXE = 0x5f3c,
|
|
SIM_FILE_DIR_DF_GRAPHICS = 0x5f50,
|
|
SIM_FILE_DIR_DF_SOLSA = 0x5f70,/* Added by Michal Bukai*/
|
|
SIM_FILE_DIR_DF_GSM = 0x7f20,
|
|
SIM_FILE_DIR_DF_DCS1800 = 0x7f21,
|
|
SIM_FILE_DIR_DF_TELECOM = 0x7f10,
|
|
|
|
SIM_FILE_DIR_DF_ENS = 0x7f66,
|
|
SIM_FILE_DIR_DF_IRIDIUM = 0x5f30,
|
|
|
|
|
|
SIM_FILE_DIR_DF_PHONEBOOK = 0x5f3a,
|
|
SIM_FILE_DIR_DF_GSM_ACCESS = 0x5f3b,
|
|
SIM_FILE_DIR_ADF_USIM = 0x7fff,
|
|
|
|
SIM_FILE_DIR_INVALID = 0x0000
|
|
}SimFileDir;
|
|
|
|
typedef enum SimEfFileIdTag
|
|
{
|
|
SIM_EF_FILEIDARR_MF = 0x2f06,
|
|
SIM_EF_FILEIDDIR = 0x2f00,
|
|
|
|
SIM_EF_FILEIDICCID = 0x2fe2,
|
|
SIM_EF_FILEIDPL = 0x2f05,
|
|
SIM_EF_FILEIDARR_TELECOM = 0x6f06,
|
|
|
|
SIM_EF_FILEIDIMG = 0x4f20,
|
|
/* Start - Added by Michal Bukai*/
|
|
SIM_EF_FILEIDSAI = 0x4f30,
|
|
SIM_EF_FILEKCGPRS = 0x4f52,
|
|
SIM_EF_FILECPBCCH = 0x4f63,
|
|
SIM_EF_FILEINVSCAN = 0x4f64,
|
|
SIM_EF_FILEIDLP = 0x6f05,
|
|
SIM_EF_FILEIDIMSI = 0x6f07,
|
|
SIM_EF_FILEIDKC = 0x6f20,
|
|
SIM_EF_FILEIDPLMN_SEL = 0x6f30,
|
|
SIM_EF_FILEIDHPLMN = 0x6f31,
|
|
SIM_EF_FILEIDACM_MAX = 0x6f37,
|
|
SIM_EF_FILEIDSST = 0x6f38,
|
|
SIM_EF_FILEIDACM = 0x6f39,
|
|
SIM_EF_FILEIDGID1 = 0x6f3e,
|
|
SIM_EF_FILEIDGID2 = 0x6f3f,
|
|
SIM_EF_FILEIDSPN = 0x6f46,
|
|
SIM_EF_FILEIDPUCT = 0x6f41,
|
|
SIM_EF_FILEIDCBMI = 0x6f45,
|
|
SIM_EF_FILEIDBCCH = 0x6f74,
|
|
SIM_EF_FILEIDACC = 0x6f78,
|
|
SIM_EF_FILEIDFPLMN = 0x6f7b,
|
|
SIM_EF_FILEIDLOCI = 0x6f7e,
|
|
SIM_EF_FILEIDAD = 0x6fad,
|
|
SIM_EF_FILEIDPHASE = 0x6fae,
|
|
SIM_EF_FILEIDADN = 0x6f3a,
|
|
SIM_EF_FILEIDFDN = 0x6f3b,
|
|
SIM_EF_FILEIDSMS = 0x6f3c,
|
|
SIM_EF_FILEIDCCP = 0x6f3d,
|
|
SIM_EF_FILEIDMSISDN = 0x6f40,
|
|
SIM_EF_FILEIDSMSP = 0x6f42,
|
|
SIM_EF_FILEIDSMSS = 0x6f43,
|
|
SIM_EF_FILEIDLND = 0x6f44,
|
|
SIM_EF_FILEIDEXT1 = 0x6f4a,
|
|
SIM_EF_FILEIDEXT2 = 0x6f4b,
|
|
SIM_EF_FILEIDSUME = 0x6f54,
|
|
|
|
SIM_EF_FILEIDCPS = 0x6f3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,
|
|
SIM_EF_FILEIDLOCI_GPRS = 0x6f53,
|
|
|
|
|
|
SIM_EF_FILEIDPNN = 0x6fc5,
|
|
SIM_EF_FILEIDOPL = 0x6fc6,
|
|
|
|
SIM_EF_FILEIDTST = 0x6fd2,
|
|
SIM_EF_FILEIDACT_HPLMN = 0x4F34,
|
|
|
|
SIM_EF_FILEIDINVALID = 0x0000
|
|
}SimEfFileId;
|
|
|
|
|
|
#define EF_FILE_SIZE_BYTE1 2
|
|
#define EF_FILE_SIZE_BYTE2 3
|
|
#define EF_FILE_ID1 4
|
|
#define EF_FILE_ID2 5
|
|
#define EF_TYPE_OF_FILE 6
|
|
#define EF_FILE_STATUS 11
|
|
#define EF_FOLLOWING_DATA_LEN 12
|
|
#define EF_STRUCTURE_OF_FILE 13
|
|
#define EF_RECORD_LENGTH 14
|
|
|
|
|
|
RETURNCODE_T ciEnterPin(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciEnterPin2(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciDetectSIM(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciAPPPIN(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
|
|
RETURNCODE_T ciGetPinRetryTimes(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciGetMEPPinRetryTimes(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciRemainPinRetries(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
|
|
RETURNCODE_T ciGenericAccessSim(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciRestrictedAccessSIM(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciGetImsi(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciSTK(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciGetCardMode(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciGetSpn(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
/* Michal Bukai*/
|
|
//Michal Bukai - ISIM/NFC support - START
|
|
RETURNCODE_T ciCCHO(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciCCHC(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciCRLA(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciCGLA(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
//Michal Bukai - ISIM/NFC support - END
|
|
RETURNCODE_T ciMEPCLCK(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciMEPCG(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciULCK(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciUCPWD(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciUASLM(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciEnVsim(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
|
|
BOOL isCHVOper(char* dialDigits);
|
|
CiReturnCode ciUnblockPin(UINT32 atHandle, const char *command_name_p);
|
|
RETURNCODE_T ciEUICC(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciRunGSMAlgorithm(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciRunTContextAuth(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciGetATR(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
#ifdef PLATFORM_FOR_PS_LW
|
|
RETURNCODE_T ciBTSConnect(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciBTSDisconnect(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciBTSTransferAPDU(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciBTSTATR(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciBTSSimControl(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciBTSCardStatus(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciBTSTransportProtocol(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
|
|
|
|
#endif
|
|
|
|
RETURNCODE_T ciEccList(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
|
|
RETURNCODE_T ciISIMAID(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
|
|
RETURNCODE_T ciICCID(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciSimPoll(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
#ifdef LWIP_IPNETBUF_SUPPORT
|
|
RETURNCODE_T ciSwitchSim(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciSetDualSimType(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
RETURNCODE_T ciBindSimId(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
#endif
|
|
RETURNCODE_T ATCWRITESIM(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciPACSP(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciCUAD(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
#ifndef NO_AUDIO
|
|
RETURNCODE_T ciEcallOnlySim(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
#endif
|
|
|
|
RETURNCODE_T ciADMINDATA(const utlAtParameterOp_T op, const char *command_name_p, const utlAtParameterValue_P2c parameter_values_p, const size_t num_parameters, const char *info_text_p, unsigned int *xid_p, void *arg_p);
|
|
RETURNCODE_T ciSwitchSingleSim(const utlAtParameterOp_T op,const char *command_name_p,const utlAtParameterValue_P2c parameter_values_p,const size_t num_parameters,const char *info_text_p, unsigned int *xid_p,void *arg_p);
|
|
#endif
|