SIM Access Service
[Telephony Mgr]


Detailed Description

This service groups the Telephony SIM access functions.


Data Structures

struct  _AlpTelCardApdu
struct  _AlpTelCardAtr
struct  _AlpTelCardCallControlParams
struct  _AlpTelCardFile

Defines

#define ALP_TEL_CARD_FILE_MODE_GET_INFO   0x00
 Card EF access mode Get EF information.
#define ALP_TEL_CARD_FILE_MODE_READ_FILE   0x01
 Read EF body.
#define ALP_TEL_CARD_FILE_MODE_READ_PART   0x02
 Read EF part.
#define ALP_TEL_CARD_FILE_MODE_READ_REC   0x03
 Read EF record.
#define ALP_TEL_CARD_FILE_STRUCT_CYCLIC   0x03
 Cyclic File: used to keep track of data in chronological order.
#define ALP_TEL_CARD_FILE_STRUCT_LINEAR_FIXED   0x01
 Linear Fixed File: file divided into several equal-length records.
#define ALP_TEL_CARD_FILE_STRUCT_TRANSPARENT   0x00
 Card EF structure Transparent EF file: binary files.
#define ALP_TEL_CARD_GET_ATR_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0002)
#define ALP_TEL_CARD_GET_CALL_CONTROL_PARAMETERS_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0005)
#define ALP_TEL_CARD_GET_FILE_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0000)
#define ALP_TEL_CARD_GET_READER_STATUS_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0004)
#define ALP_TEL_CARD_MAX_APDU_COMMAND_SIZE   256
 the APDU command size should not exceed 256 bytes
#define ALP_TEL_CARD_MAX_APDU_RESPONSE_SIZE   256
 Card APDU and ATR MAX size the APDU response size should not exceed 256 bytes.
#define ALP_TEL_CARD_MAX_ATR_SIZE   33
 The ATR should not exceed 33 bytes (character T0 followed by a maximum of 32 characters).
#define ALP_TEL_CARD_MESSAGES_COUNT   ((ALP_TEL_CARD_GET_CALL_CONTROL_PARAMETERS_MESSAGE & ALP_TEL_MESSAGE_MASK) + 1)
 Total count of SIM Access service messages.
#define ALP_TEL_CARD_POWER_OFF   1
 Power OFF state.
#define ALP_TEL_CARD_POWER_ON   0
 Card power management Power ON state.
#define ALP_TEL_CARD_POWER_RESET   2
 Power RESET state.
#define ALP_TEL_CARD_SEND_COMMAND_APDU_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0001)
#define ALP_TEL_CARD_SET_POWER_STATE_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0003)
#define ALP_TEL_CARD_STATUS_INSERTED   0x04
 SIM card is inserted.
#define ALP_TEL_CARD_STATUS_NOT_ACCESSIBLE   0x02
 Physical contact with the SIM card is lost or the SIM card can not be powered ON.
#define ALP_TEL_CARD_STATUS_POWERED_OFF   0x07
 SIM card is present and powered OFF.
#define ALP_TEL_CARD_STATUS_POWERED_ON   0x06
 SIM card is present and powered ON.
#define ALP_TEL_CARD_STATUS_RECOVERED   0x05
 When a non-accessible card can be made accessible again.
#define ALP_TEL_CARD_STATUS_REMOVED   0x03
 No SIM is inserted or the SIM card is removed.
#define ALP_TEL_CARD_STATUS_RESET   0x01
 SIM card has been reseted.
#define ALP_TEL_CARD_STATUS_UNKNOWN_ERROR   0x00
 Card status Unknown error.
#define ALP_TEL_IS_CARD_GET_ATR_SUPPORTED(iAppId)   alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_GET_ATR_MESSAGE)
#define ALP_TEL_IS_CARD_GET_CALL_CONTROL_PARAMETERS_SUPPORTED(iAppId)   alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_GET_CALL_CONTROL_PARAMETERS_MESSAGE)
#define ALP_TEL_IS_CARD_GET_FILE_SUPPORTED(iAppId)   alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_GET_FILE_MESSAGE)
#define ALP_TEL_IS_CARD_GET_READER_STATUS_SUPPORTED(iAppId)   alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_GET_READER_STATUS_MESSAGE)
#define ALP_TEL_IS_CARD_SEND_COMMAND_APDU_SUPPORTED(iAppId)   alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_SEND_COMMAND_APDU_MESSAGE)
#define ALP_TEL_IS_CARD_SET_POWER_STATE_SUPPORTED(iAppId)   alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_SET_POWER_STATE_MESSAGE)

Typedefs

typedef _AlpTelCardApdu AlpTelCardApdu
typedef _AlpTelCardAtr AlpTelCardAtr
typedef _AlpTelCardCallControlParams AlpTelCardCallControlParams
 Parameters contained in the call control requested action.
typedef _AlpTelCardFile AlpTelCardFile

Functions

alp_status_t alp_tel_card_get_atr (AlpTelApplicationId iAppId, AlpTelCardAtr *ioAtrP, AlpTelTransId *ioTransIdP)
alp_status_t alp_tel_card_get_call_control_parameters (AlpTelApplicationId iAppId, AlpTelCardCallControlParams *ioParamsP, AlpTelTransId *ioTransIdP)
alp_status_t alp_tel_card_get_file (AlpTelApplicationId iAppId, AlpTelCardFile *ioFileP, AlpTelTransId *ioTransIdP)
alp_status_t alp_tel_card_get_reader_status (AlpTelApplicationId iAppId, uint8_t *oReaderStatus, AlpTelTransId *ioTransIdP)
alp_status_t alp_tel_card_send_command_apdu (AlpTelApplicationId iAppId, AlpTelCardApdu *ioApduP, AlpTelTransId *ioTransIdP)
alp_status_t alp_tel_card_set_power_state (AlpTelApplicationId iAppId, uint8_t iPowerState, AlpTelTransId *ioTransIdP)


Define Documentation

#define ALP_TEL_CARD_FILE_MODE_GET_INFO   0x00
 

Card EF access mode Get EF information.

#define ALP_TEL_CARD_FILE_MODE_READ_FILE   0x01
 

Read EF body.

#define ALP_TEL_CARD_FILE_MODE_READ_PART   0x02
 

Read EF part.

#define ALP_TEL_CARD_FILE_MODE_READ_REC   0x03
 

Read EF record.

#define ALP_TEL_CARD_FILE_STRUCT_CYCLIC   0x03
 

Cyclic File: used to keep track of data in chronological order.

#define ALP_TEL_CARD_FILE_STRUCT_LINEAR_FIXED   0x01
 

Linear Fixed File: file divided into several equal-length records.

#define ALP_TEL_CARD_FILE_STRUCT_TRANSPARENT   0x00
 

Card EF structure Transparent EF file: binary files.

#define ALP_TEL_CARD_GET_ATR_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0002)
 

#define ALP_TEL_CARD_GET_CALL_CONTROL_PARAMETERS_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0005)
 

#define ALP_TEL_CARD_GET_FILE_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0000)
 

#define ALP_TEL_CARD_GET_READER_STATUS_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0004)
 

#define ALP_TEL_CARD_MAX_APDU_COMMAND_SIZE   256
 

the APDU command size should not exceed 256 bytes

#define ALP_TEL_CARD_MAX_APDU_RESPONSE_SIZE   256
 

Card APDU and ATR MAX size the APDU response size should not exceed 256 bytes.

#define ALP_TEL_CARD_MAX_ATR_SIZE   33
 

The ATR should not exceed 33 bytes (character T0 followed by a maximum of 32 characters).

#define ALP_TEL_CARD_MESSAGES_COUNT   ((ALP_TEL_CARD_GET_CALL_CONTROL_PARAMETERS_MESSAGE & ALP_TEL_MESSAGE_MASK) + 1)
 

Total count of SIM Access service messages.

#define ALP_TEL_CARD_POWER_OFF   1
 

Power OFF state.

#define ALP_TEL_CARD_POWER_ON   0
 

Card power management Power ON state.

#define ALP_TEL_CARD_POWER_RESET   2
 

Power RESET state.

#define ALP_TEL_CARD_SEND_COMMAND_APDU_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0001)
 

#define ALP_TEL_CARD_SET_POWER_STATE_MESSAGE   ((ALP_TEL_CARD_SERVICE_ID << 8) | 0x0003)
 

#define ALP_TEL_CARD_STATUS_INSERTED   0x04
 

SIM card is inserted.

#define ALP_TEL_CARD_STATUS_NOT_ACCESSIBLE   0x02
 

Physical contact with the SIM card is lost or the SIM card can not be powered ON.

#define ALP_TEL_CARD_STATUS_POWERED_OFF   0x07
 

SIM card is present and powered OFF.

#define ALP_TEL_CARD_STATUS_POWERED_ON   0x06
 

SIM card is present and powered ON.

#define ALP_TEL_CARD_STATUS_RECOVERED   0x05
 

When a non-accessible card can be made accessible again.

#define ALP_TEL_CARD_STATUS_REMOVED   0x03
 

No SIM is inserted or the SIM card is removed.

#define ALP_TEL_CARD_STATUS_RESET   0x01
 

SIM card has been reseted.

#define ALP_TEL_CARD_STATUS_UNKNOWN_ERROR   0x00
 

Card status Unknown error.

#define ALP_TEL_IS_CARD_GET_ATR_SUPPORTED iAppId   )     alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_GET_ATR_MESSAGE)
 

#define ALP_TEL_IS_CARD_GET_CALL_CONTROL_PARAMETERS_SUPPORTED iAppId   )     alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_GET_CALL_CONTROL_PARAMETERS_MESSAGE)
 

#define ALP_TEL_IS_CARD_GET_FILE_SUPPORTED iAppId   )     alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_GET_FILE_MESSAGE)
 

#define ALP_TEL_IS_CARD_GET_READER_STATUS_SUPPORTED iAppId   )     alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_GET_READER_STATUS_MESSAGE)
 

#define ALP_TEL_IS_CARD_SEND_COMMAND_APDU_SUPPORTED iAppId   )     alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_SEND_COMMAND_APDU_MESSAGE)
 

#define ALP_TEL_IS_CARD_SET_POWER_STATE_SUPPORTED iAppId   )     alp_tel_is_function_supported(iAppId, ALP_TEL_CARD_SET_POWER_STATE_MESSAGE)
 


Typedef Documentation

typedef struct _AlpTelCardApdu AlpTelCardApdu
 

typedef struct _AlpTelCardAtr AlpTelCardAtr
 

typedef struct _AlpTelCardCallControlParams AlpTelCardCallControlParams
 

Parameters contained in the call control requested action.

typedef struct _AlpTelCardFile AlpTelCardFile
 


Function Documentation

alp_status_t alp_tel_card_get_atr AlpTelApplicationId  iAppId,
AlpTelCardAtr ioAtrP,
AlpTelTransId ioTransIdP
 

To get the Answer To Reset from the SIM card.

Parameters:
[in] iAppId The telephone application attachement identifier for your application.
[in,out] ioAtrP Pointer to a AlpTelCardAtr structure that contains the phse and the ATR answer retrieved from the card.
[in,out] ioTransIdP Set the value of this parameter to NULL to cause the function to execute synchronously. If this parameter is not NULL, the call executes asynchronously. Upon return from this function, this points to the transaction identifier associated with the asynchronous operation.
Returns:
ALP_STATUS_OK The Answer To Reset has been retrieved successfully
Since:
ALP iSDK 1.0

alp_status_t alp_tel_card_get_call_control_parameters AlpTelApplicationId  iAppId,
AlpTelCardCallControlParams ioParamsP,
AlpTelTransId ioTransIdP
 

Get the parameters of the Call Control requested action.

Parameters:
[in] iAppId The telephone application attachement identifier for your application.
[in,out] ioParamsP Pointer to a AlpTelCardCallControlParams structure that contains all the parameters associated with the Call control requested action (address, SS string, USSD string...).
[in,out] ioTransIdP Set the value of this parameter to NULL to cause the function to execute synchronously. If this parameter is not NULL, the call executes asynchronously. Upon return from this function, this points to the transaction identifier associated with the asynchronous operation.
Returns:
ALP_STATUS_OK The parameters has been retrieved successfuly.
Since:
ALP iSDK 2.3

alp_status_t alp_tel_card_get_file AlpTelApplicationId  iAppId,
AlpTelCardFile ioFileP,
AlpTelTransId ioTransIdP
 

Gets information about an Elementary File.

Parameters:
[in] iAppId The telephone application attachement identifier for your application.
[in,out] ioFileP Pointer to a AlpTelCardFile structure that identifies the Elementary File to read.
[in,out] ioTransIdP Set the value of this parameter to NULL to cause the function to execute synchronously. If this parameter is not NULL, the call executes asynchronously. Upon return from this function, this points to the transaction identifier associated with the asynchronous operation.
Returns:
ALP_STATUS_OK The Elementary File has been retrieved successfuly and the requested information (header file, data file) are available.
Since:
ALP iSDK 1.0

alp_status_t alp_tel_card_get_reader_status AlpTelApplicationId  iAppId,
uint8_t *  oReaderStatus,
AlpTelTransId ioTransIdP
 

To get the card reader status.

Parameters:
[in] iAppId The telephone application attachement identifier for your application.
[in,out] oReaderStatus Pointer to the card reader status value (see GSM 11.14).
[in,out] ioTransIdP Set the value of this parameter to NULL to cause the function to execute synchronously. If this parameter is not NULL, the call executes asynchronously. Upon return from this function, this points to the transaction identifier associated with the asynchronous operation.
Returns:
ALP_STATUS_OK The card reader status is retrieved successfully
Since:
ALP iSDK 1.0

alp_status_t alp_tel_card_send_command_apdu AlpTelApplicationId  iAppId,
AlpTelCardApdu ioApduP,
AlpTelTransId ioTransIdP
 

To exchange APDUs command with the SIM card.

Parameters:
[in] iAppId The telephone application attachement identifier for your application.
[in,out] ioApduP Pointer to a AlpTelCardApdu structure that contain the APDU to send and the answer to get from the card.
[in,out] ioTransIdP Set the value of this parameter to NULL to cause the function to execute synchronously. If this parameter is not NULL, the call executes asynchronously. Upon return from this function, this points to the transaction identifier associated with the asynchronous operation.
Returns:
ALP_STATUS_OK The operation is executed successfuly but the command APDU can fail (see the content of the APDU response and particularly the status word SW1,SW2).
Since:
ALP iSDK 1.0

alp_status_t alp_tel_card_set_power_state AlpTelApplicationId  iAppId,
uint8_t  iPowerState,
AlpTelTransId ioTransIdP
 

To set the power state of the SIM card.

Parameters:
[in] iAppId The telephone application attachement identifier for your application.
[in,out] iPowerState Power state to set to the SIM card (see ALP_TEL_CARD_POWER_X).
[in,out] ioTransIdP Set the value of this parameter to NULL to cause the function to execute synchronously. If this parameter is not NULL, the call executes asynchronously. Upon return from this function, this points to the transaction identifier associated with the asynchronous operation.
Returns:
ALP_STATUS_OK The power state is set successfully
Since:
ALP iSDK 1.0


Generated on Wed Jul 30 07:06:44 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.