Go to the source code of this file.
Macros | |
#define | LE_SIM_PIN_MIN_LEN 4 |
#define | LE_SIM_PIN_MAX_LEN 8 |
#define | LE_SIM_PIN_MAX_BYTES 9 |
#define | LE_SIM_PUK_MAX_LEN 8 |
#define | LE_SIM_PUK_MAX_BYTES 9 |
#define | LE_SIM_ICCID_LEN 20 |
#define | LE_SIM_ICCID_BYTES 21 |
#define | LE_SIM_IMSI_LEN 15 |
#define | LE_SIM_IMSI_BYTES 16 |
Typedefs | |
typedef struct le_sim_NewStateHandler * | le_sim_NewStateHandlerRef_t |
typedef struct le_sim_SimToolkitEventHandler * | le_sim_SimToolkitEventHandlerRef_t |
typedef void(* | le_sim_NewStateHandlerFunc_t) (le_sim_Id_t simId, le_sim_States_t simState, void *contextPtr) |
typedef void(* | le_sim_SimToolkitEventHandlerFunc_t) (le_sim_Id_t simId, le_sim_StkEvent_t stkEvent, void *contextPtr) |
Enumerations | |
enum | le_sim_States_t { LE_SIM_INSERTED, LE_SIM_ABSENT, LE_SIM_READY, LE_SIM_BLOCKED, LE_SIM_BUSY, LE_SIM_STATE_UNKNOWN } |
enum | le_sim_Id_t { LE_SIM_EMBEDDED, LE_SIM_EXTERNAL_SLOT_1, LE_SIM_EXTERNAL_SLOT_2, LE_SIM_REMOTE, LE_SIM_ID_MAX } |
enum | le_sim_Manufacturer_t { LE_SIM_OBERTHUR, LE_SIM_GEMALTO, LE_SIM_G_AND_D, LE_SIM_MORPHO, LE_SIM_MANUFACTURER_MAX } |
enum | le_sim_StkEvent_t { LE_SIM_OPEN_CHANNEL, LE_SIM_REFRESH, LE_SIM_STK_EVENT_MAX } |
Legato SIM include file.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
#define LE_SIM_ICCID_BYTES 21 |
ICCID length One extra byte is added for the null character.
#define LE_SIM_ICCID_LEN 20 |
ICCID length According to GSM Phase 1
#define LE_SIM_IMSI_BYTES 16 |
IMSI length One extra byte is added for the null character.
#define LE_SIM_IMSI_LEN 15 |
IMSI length
#define LE_SIM_PIN_MAX_BYTES 9 |
Maximum PIN length (8 digits) One extra byte is added for the null character.
#define LE_SIM_PIN_MAX_LEN 8 |
Maximum PIN length (8 digits)
#define LE_SIM_PIN_MIN_LEN 4 |
Minimum PIN length (4 digits)
#define LE_SIM_PUK_MAX_BYTES 9 |
PUK length (8 digits) One extra byte is added for the null character.
#define LE_SIM_PUK_MAX_LEN 8 |
PUK length (8 digits)
typedef void(* le_sim_NewStateHandlerFunc_t) (le_sim_Id_t simId, le_sim_States_t simState, void *contextPtr) |
Handler for sim state changes.
simId | The SIM identifier. |
simState | The SIM state. |
contextPtr |
typedef struct le_sim_NewStateHandler* le_sim_NewStateHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_sim_NewState'
typedef void(* le_sim_SimToolkitEventHandlerFunc_t) (le_sim_Id_t simId, le_sim_StkEvent_t stkEvent, void *contextPtr) |
Handler for Sim Toolkit Events.
simId | The SIM identifier. |
stkEvent | The SIM state. |
contextPtr |
typedef struct le_sim_SimToolkitEventHandler* le_sim_SimToolkitEventHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_sim_SimToolkitEvent'
enum le_sim_Id_t |
enum le_sim_States_t |
enum le_sim_StkEvent_t |
le_result_t le_sim_AcceptSimToolkitCommand | ( | le_sim_Id_t | simId | ) |
Accept the last SIM Toolkit command.
[in] | simId | The SIM identifier. |
le_sim_NewStateHandlerRef_t le_sim_AddNewStateHandler | ( | le_sim_NewStateHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_sim_NewState'
This event provides information on sim state changes.
[in] | handlerPtr | |
[in] | contextPtr |
le_sim_SimToolkitEventHandlerRef_t le_sim_AddSimToolkitEventHandler | ( | le_sim_SimToolkitEventHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_sim_SimToolkitEvent'
This event provides information on Sim Toolkit application.
[in] | handlerPtr | |
[in] | contextPtr |
le_result_t le_sim_ChangePIN | ( | le_sim_Id_t | simId, |
const char * | oldpin, | ||
const char * | newpin | ||
) |
Change the PIN code.
[in] | simId | The SIM identifier. |
[in] | oldpin | The old PIN code. |
[in] | newpin | The new PIN code. |
void le_sim_ConnectService | ( | void | ) |
Connect the client to the service
void le_sim_DisconnectService | ( | void | ) |
Disconnect the client from the service
le_result_t le_sim_EnterPIN | ( | le_sim_Id_t | simId, |
const char * | pin | ||
) |
This function must be called to enter the PIN code.
[in] | simId | The SIM identifier. |
[in] | pin | The PIN code. |
le_result_t le_sim_GetHomeNetworkMccMnc | ( | le_sim_Id_t | simId, |
char * | mccPtr, | ||
size_t | mccPtrNumElements, | ||
char * | mncPtr, | ||
size_t | mncPtrNumElements | ||
) |
This function must be called to get the Home Network MCC MNC.
[in] | simId | The SIM identifier. |
[out] | mccPtr | Mobile Country Code |
[in] | mccPtrNumElements | |
[out] | mncPtr | Mobile Network Code |
[in] | mncPtrNumElements |
le_result_t le_sim_GetHomeNetworkOperator | ( | le_sim_Id_t | simId, |
char * | nameStr, | ||
size_t | nameStrNumElements | ||
) |
This function must be called to get the Home Network Name information.
[in] | simId | The SIM identifier. |
[out] | nameStr | the home network Name |
[in] | nameStrNumElements |
le_result_t le_sim_GetICCID | ( | le_sim_Id_t | simId, |
char * | iccid, | ||
size_t | iccidNumElements | ||
) |
Retrieves the integrated circuit card identifier (ICCID) of the SIM card (20 digits)
[in] | simId | The SIM identifier. |
[out] | iccid | ICCID |
[in] | iccidNumElements |
le_result_t le_sim_GetIMSI | ( | le_sim_Id_t | simId, |
char * | imsi, | ||
size_t | imsiNumElements | ||
) |
Retrieves the identification number (IMSI) of the SIM card. (max 15 digits)
[in] | simId | The SIM identifier. |
[out] | imsi | IMSI |
[in] | imsiNumElements |
int32_t le_sim_GetRemainingPINTries | ( | le_sim_Id_t | simId | ) |
Get the number of remaining PIN insertion tries.
[in] | simId | The SIM identifier. |
le_sim_Id_t le_sim_GetSelectedCard | ( | void | ) |
Get the current selected card.
le_sim_States_t le_sim_GetState | ( | le_sim_Id_t | simId | ) |
Get the SIM state.
[in] | simId | The SIM identifier. |
le_result_t le_sim_GetSubscriberPhoneNumber | ( | le_sim_Id_t | simId, |
char * | phoneNumberStr, | ||
size_t | phoneNumberStrNumElements | ||
) |
Get the SIM Phone Number.
[in] | simId | The SIM identifier. |
[out] | phoneNumberStr | The phone Number. |
[in] | phoneNumberStrNumElements |
le_result_t le_sim_IsEmergencyCallSubscriptionSelected | ( | le_sim_Id_t | simId, |
bool * | isEcsPtr | ||
) |
This function must be called to get the current subscription.
[in] | simId | The SIM identifier |
[out] | isEcsPtr | true if Emergency Call Subscription (ECS) is selected, false if Commercial Subscription is selected |
bool le_sim_IsPresent | ( | le_sim_Id_t | simId | ) |
Verify if the SIM card is present or not.
[in] | simId | The SIM identifier. |
bool le_sim_IsReady | ( | le_sim_Id_t | simId | ) |
Verify if the SIM is ready (PIN code correctly inserted or not required).
[in] | simId | The SIM identifier. |
le_result_t le_sim_LocalSwapToCommercialSubscription | ( | le_sim_Id_t | simId, |
le_sim_Manufacturer_t | manufacturer | ||
) |
This function must be called to request the multi-profile eUICC to swap back to commercial subscription and to refresh. The User's application must wait for eUICC reboot to be finished and network connection available.
[in] | simId | The SIM identifier. |
[in] | manufacturer | The card manufacturer. |
le_result_t le_sim_LocalSwapToEmergencyCallSubscription | ( | le_sim_Id_t | simId, |
le_sim_Manufacturer_t | manufacturer | ||
) |
This function must be called to request the multi-profile eUICC to swap to ECS and to refresh. The User's application must wait for eUICC reboot to be finished and network connection available.
[in] | simId | The SIM identifier. |
[in] | manufacturer | The card manufacturer. |
le_result_t le_sim_Lock | ( | le_sim_Id_t | simId, |
const char * | pin | ||
) |
Lock the SIM card: it enables the request of the PIN code.
[in] | simId | The SIM identifier. |
[in] | pin | The PIN code. |
le_result_t le_sim_RejectSimToolkitCommand | ( | le_sim_Id_t | simId | ) |
Reject the last SIM Toolkit command.
[in] | simId | The SIM identifier. |
void le_sim_RemoveNewStateHandler | ( | le_sim_NewStateHandlerRef_t | addHandlerRef | ) |
Remove handler function for EVENT 'le_sim_NewState'
[in] | addHandlerRef |
void le_sim_RemoveSimToolkitEventHandler | ( | le_sim_SimToolkitEventHandlerRef_t | addHandlerRef | ) |
Remove handler function for EVENT 'le_sim_SimToolkitEvent'
[in] | addHandlerRef |
le_result_t le_sim_SelectCard | ( | le_sim_Id_t | simId | ) |
Select a SIM.
[in] | simId | The SIM identifier. |
le_result_t le_sim_Unblock | ( | le_sim_Id_t | simId, |
const char * | puk, | ||
const char * | newpin | ||
) |
Unblock the SIM card.
[in] | simId | The SIM identifier. |
[in] | puk | The PUK code. |
[in] | newpin | The PIN code. |
le_result_t le_sim_Unlock | ( | le_sim_Id_t | simId, |
const char * | pin | ||
) |
Unlock the SIM card: it disables the request of the PIN code.
[in] | simId | The SIM identifier. |
[in] | pin | The PIN code. |