Functions | |
SWI_API SWI_RCODE | SwiGetGsmIMSI (LPTSTR szMSIN, U32 sizeBuffer, U32 *pMCC, U32 *pMNC, U32 timeout) |
SWI_API SWI_RCODE | SwiSetSimVerify (const SWI_STRUCT_SIM_Verify *pSim, U32 timeout) |
SWI_API SWI_RCODE | SwiSetSimLock (const SWI_STRUCT_SIM_EnableLock *pSim, U32 timeout) |
SWI_API SWI_RCODE | SwiGetSimLock (SWI_STRUCT_SIM_LockStatus *pSim, U32 timeout) |
SWI_API SWI_RCODE | SwiSetSimPassword (const SWI_STRUCT_SIM_Password *pSim, U32 timeout) |
SWI_API SWI_RCODE | SwiSetMEPUnlock (const SWI_STRUCT_MEP_Unlock *pMEP, U32 timeout) |
SWI_API SWI_RCODE | SwiGetIccId (SWI_STRUCT_IccId &sIddId, U32 timeout) |
SWI_API SWI_RCODE | SwiSetSimAuthentication (SWI_STRUCT_SimAuth *pSimAuth, U32 timeout) |
SWI_API SWI_RCODE SwiGetGsmIMSI | ( | LPTSTR | szMSIN, | |
U32 | sizeBuffer, | |||
U32 * | pMCC, | |||
U32 * | pMNC, | |||
U32 | timeout | |||
) |
This function is used to retrieve the IMSI from the SIM.
The IMSI is comprised of three elements: the MSIN, the MCC and the MNC.
[OUT] | szMSIN: MSIN (NULL terminated) | |
[IN] | sizeBuffer: The size of the buffer provided for the MSIN. | |
[OUT] | pMCC: Mobile country code | |
[OUT] | pMNC: Mobile network code | |
[IN] | timeout: Response timeout value in milliseconds. |
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiGetIccId | ( | SWI_STRUCT_IccId & | sIddId, | |
U32 | timeout | |||
) |
This function is used to retrieve the ICC ID of the SIM.
This function should not be called until the SWI_NOTIFY_SimStatusExp has been received indicating the SIM is ready.
[OUT] | sIddId: ICC ID | |
[IN] | timeout: Response timeout value in milliseconds |
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiGetSimLock | ( | SWI_STRUCT_SIM_LockStatus * | pSim, | |
U32 | timeout | |||
) |
This function is used to determine whether CHV1 is enabled.
SIM API functions can not be called until a SWI_NOTIFY_SimStatusExp notification is received. This indicates that the SIM is ready to process user requests.
[OUT] | pSim: SIM CHV1 lock status | |
[IN] | timeout: Response timeout value in milliseconds |
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiSetMEPUnlock | ( | const SWI_STRUCT_MEP_Unlock * | pMEP, | |
U32 | timeout | |||
) |
This function is used to enter the MEP code and disable the mechanism that restricts which SIMs can be used with the modem.
SIM API functions can not be called until a SWI_NOTIFY_SimStatusExp notification is received. This indicates that the SIM is ready to process user requests.
Once this function is called do not call it again until the result from the current request has been received in the next SWI_NOTIFY_SimStatusExp notification.
The first time that this function is called, there is a 30 second delay before the SWI_NOTIFY_SimStatusExp notification responds. This delay is doubled with each attempt. (That is, the second time the function is called, there is a one minute delay. The third time it is called, there is a two minute delay.) The delay is intended to discourage users from trying new codes until the SIM becomes blocked.
[IN] | pMEP: MEP unlocking code | |
[IN] | timeout: Response timeout value in milliseconds |
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiSetSimAuthentication | ( | SWI_STRUCT_SimAuth * | pSimAuth, | |
U32 | timeout | |||
) |
This function is used to send a sixteen byte random number to the SIM. The SIM will run its algorithm on the provided random number and it will output a thirty two bit SIM response and eight byte ciphering key.
SIM API functions can not be called until a SWI_NOTIFY_SimStatusExp notification is received. This indicates that the SIM is ready to process user requests.
[IN/OUT] | pSimAuth: SIM authentication information. The size of the structure and random number must be provided by the caller. The response will contain the 32-bit SIM response and ciphering key. | |
[IN] | timeout: Response timeout value in milliseconds |
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiSetSimLock | ( | const SWI_STRUCT_SIM_EnableLock * | pSim, | |
U32 | timeout | |||
) |
This function is used to enable or disable CHV1.
SIM API functions can not be called until a SWI_NOTIFY_SimStatusExp notification is received. This indicates that the SIM is ready to process user requests.
[IN] | pSim: SIM CHV1 lock information. The caller must provide the password required to enable/disable CHV1. | |
[IN] | timeout: Response timeout value in milliseconds |
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiSetSimPassword | ( | const SWI_STRUCT_SIM_Password * | pSim, | |
U32 | timeout | |||
) |
This function is used to change CHV1 or CHV2 codes.
SIM API functions can not be called until a SWI_NOTIFY_SimStatusExp notification is received. This indicates that the SIM is ready to process user requests.
The CHV1 code can only be changed when enabled (using SwiSetSimLock). Emergency numbers cannot be used as CHV1 codes, or as the beginning of CHV1 codes. PUK1 and PUK2 are not valid parameters, although the data structure includes them.
[IN] | pSim: SIM password information | |
[IN] | timeout: Response timeout value in milliseconds |
See SWI_RCODE for other error return codes.
SWI_API SWI_RCODE SwiSetSimVerify | ( | const SWI_STRUCT_SIM_Verify * | pSim, | |
U32 | timeout | |||
) |
This function is used to enter a SIM requested code.
SIM API functions can not be called until a SWI_NOTIFY_SimStatusExp notification is received. This indicates that the SIM is ready to process user requests.
The SIM can request the user to enter any one of the following four codes: CHV1, CHV2, unblocking CHV1 and unblocking CHV2. The SIM uses this to verify the identify of the user. This function allows the caller to pass the user entered code to the SIM on the modem. A request containing the code is sent to the modem. The modem will respond to the request to indicate that the code is being verified by the SIM. The result of the SIM verification will be reflected in the SWI_NOTIFY_SimStatusExp notification.
If three failures in entering a correct CHV1 or CHV2 occur, this notification shows that the SIM has become blocked (CHV1) or the CHV2 features have become blocked.
GSM standards designate 10 as the number of permitted attempts at correctly entering PUK codes. This number is SIM dependent and carriers do not necessarily adhere to this standard. If 10 failures in entering the PUK occur, this notification shows the SIM has become permanently blocked or the CHV2 features have become permanently blocked.
[IN] | pSim: SIM requested code. | |
[IN] | timeout: Response timeout value in milliseconds |
See SWI_RCODE for other error return codes.