|
LinuxSDK
V1.4.0.5
|
This file contains definitions, enumerations, structures and forward declarations for SwiApiGsmSim.c file. More...
Go to the source code of this file.
Data Structures | |
| struct | SWI_STRUCT_SIM_Verify |
| struct | SWI_STRUCT_SIM_Password |
| struct | SWI_STRUCT_SIM_EnableLock |
| struct | SWI_STRUCT_SIM_LockStatus |
| struct | SWI_STRUCT_SIM_StatusExp |
| struct | SWI_STRUCT_MEP_Unlock |
| struct | SWI_STRUCT_IccId |
| struct | SWI_STRUCT_SimAuth |
Macros | |
| #define | LENGTH_MaxCHV 9 |
| #define | LENGTH_MEPCode 13 |
| #define | LENGTH_IccId 10 |
| #define | LENGTH_RandNum 16 |
| #define | LENGTH_Kc 8 |
This file contains definitions, enumerations, structures and forward declarations for SwiApiGsmSim.c file.
Copyright (c) 2011 Sierra Wireless, Inc. All rights reserved
| #define LENGTH_IccId 10 |
| #define LENGTH_Kc 8 |
| #define LENGTH_MaxCHV 9 |
| #define LENGTH_MEPCode 13 |
| #define LENGTH_RandNum 16 |
An enumeration of PIN2 kick types.
| Enumerator | |
|---|---|
| SWI_TYPE_CHV2KICKTYPE_Verify |
Verifying PIN2. |
| SWI_TYPE_CHV2KICKTYPE_Change |
Changing PIN2. |
An enumeration of SIM password types.
An enumeration of SIM previous operation results.
An enumeration of previous SIM operations.
An enumeration of required SIM operations.
An enumeration of SIM code retry information types.
An enumeration of SIM status codes.
| SWI_API SWI_RCODE SwiChv2StatusKick | ( | enum SWI_TYPE_SIM_Chv2KickType | eKickType, |
| swi_uint32 | timeout | ||
| ) |
This function is used to get CHV2 status from the modem.
SIM API functions can not be called until a SWI_NOTIFY_SimsStatusExp notification is received. This indicates that the SIM is ready to process user requests.
The kick type determines if the user is prompted to enter the CHV2. For example, if the card is kicked for CHV2 verify, then SWI_NOTIFY_SimsStatusExp will contain a user prompt to enter CHV2. If the card is kicked for CHV2 change, SWI_NOTIFY_SimsStatusExp will not contain user prompts.
| eKickType,: | [IN] CHV2 kick type |
| timeout,: | [IN] Response timeout value in milliseconds |
| SWI_API SWI_RCODE SwiGetGsmIMSI | ( | swi_charp | szMSIN, |
| swi_uint32 | sizeBuffer, | ||
| swi_uint32 * | pMCC, | ||
| swi_uint32 * | pMNC, | ||
| swi_uint32 | 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.
| szMSIN,: | [OUT] MSIN (NULL terminated) |
| sizeBuffer,: | [IN] The size of the buffer provided for the MSIN. |
| pMCC,: | [OUT] Mobile country code |
| pMNC,: | [OUT] Mobile network code |
| timeout,: | [IN] Response timeout value in milliseconds. |
| SWI_API SWI_RCODE SwiGetIccId | ( | struct SWI_STRUCT_IccId * | sIccId, |
| swi_uint32 | 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.
| sIddId,: | [OUT] ICC ID |
| timeout,: | [IN] Response timeout value in milliseconds |
| SWI_API SWI_RCODE SwiGetNetworkProviderID | ( | swi_charp | szName, |
| swi_uint32 | sizeBuffer, | ||
| swi_uint32 | timeout | ||
| ) |
This function reports the current service provider's identification code.
The provider ID for GSM is a string provided by the carrier on the SIM.
| szName,: | [OUT] Network provider name (NULL terminated) |
| sizeBuffer,: | [IN] Size of buffer provided for the network provider name |
| timeout,: | [IN] Response timeout value in milliseconds |
| SWI_API SWI_RCODE SwiGetSimLock | ( | struct SWI_STRUCT_SIM_LockStatus * | pSim, |
| swi_uint32 | timeout | ||
| ) |
This function is used to determine whether CHV1 is enabled.
SIM API functions can not be called until a SWI_NOTIFY_SimsStatusExp notification is received. This indicates that the SIM is ready to process user requests.
| pSim,: | [OUT] SIM CHV1 lock status |
| timeout,: | [IN] Response timeout value in milliseconds |
| SWI_API SWI_RCODE SwiSetMEPUnlock | ( | const struct SWI_STRUCT_MEP_Unlock * | pMEP, |
| swi_uint32 | 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_SimsStatusExp 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.
| pMEP,: | [IN] MEP unlocking code |
| timeout,: | [IN] Response timeout value in milliseconds |
| SWI_API SWI_RCODE SwiSetSimAuthentication | ( | struct SWI_STRUCT_SimAuth * | pSimAuth, |
| swi_uint32 | 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_SimsStatusExp notification is received. This indicates that the SIM is ready to process user requests.
| pSimAuth,: | [IN/OUT] 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. |
| timeout,: | [IN] Response timeout value in milliseconds |
| SWI_API SWI_RCODE SwiSetSimLock | ( | const struct SWI_STRUCT_SIM_EnableLock * | pSim, |
| swi_uint32 | timeout | ||
| ) |
This function is used to enable or disable CHV1.
SIM API functions can not be called until a SWI_NOTIFY_SimsStatusExp notification is received. This indicates that the SIM is ready to process user requests.
| pSim,: | [IN] SIM CHV1 lock information. The caller must provide the password required to enable/disable CHV1. |
| timeout,: | [IN] Response timeout value in milliseconds |
| SWI_API SWI_RCODE SwiSetSimPassword | ( | const struct SWI_STRUCT_SIM_Password * | pSim, |
| swi_uint32 | timeout | ||
| ) |
This function is used to change CHV1 or CHV2 codes.
SIM API functions can not be called until a SWI_NOTIFY_SimsStatusExp 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.
| pSim,: | [IN] SIM password information |
| timeout,: | [IN] Response timeout value in milliseconds |
| SWI_API SWI_RCODE SwiSetSimVerify | ( | const struct SWI_STRUCT_SIM_Verify * | pSim, |
| swi_uint32 | timeout | ||
| ) |
This function is used to enter a SIM requested code.
SIM API functions can not be called until a SWI_NOTIFY_SimsStatusExp 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.
| pSim,: | [IN] SIM requested code. |
| timeout,: | [IN] Response timeout value in milliseconds |