Embedded Wireless Framework
Functions
Modem adapter simcard utility API

The sim card utility functions. More...

Functions

ewf_result ewf_adapter_modem_sim_pin_enter (ewf_adapter *adapter_ptr, const char *pin_str)
 Enter the modem SIM PIN (+cpin) More...
 
ewf_result ewf_adapter_modem_sim_pin_status_read (ewf_adapter *adapter_ptr, char *code_str, uint32_t *code_str_len)
 Read the modem SIM PIN status (+cpin?) More...
 
ewf_result ewf_adapter_modem_sim_pin_change (ewf_adapter *adapter_ptr, const char *pin_str, const char *new_pin_str)
 Set the modem SIM new PIN (+cpin) More...
 
ewf_result ewf_adapter_modem_sim_pin_retries_read (ewf_adapter *adapter_ptr, const char *sel_code_str, uint32_t *retries_ptr, uint32_t *default_retries_ptr)
 Remaining PIN retries (+cpinr) More...
 
ewf_result ewf_adapter_modem_sim_generic_access_set (ewf_adapter *adapter_ptr, uint32_t lenght, const char *command_str)
 Generic SIM access (+csim) More...
 
ewf_result ewf_adapter_modem_sim_restricted_access (ewf_adapter *adapter_ptr, uint32_t command, uint32_t field, uint32_t p1, uint32_t p2, uint32_t p3, const char *data_str, const char *pathid_str)
 Restricted sim access (+crsm) More...
 
ewf_result ewf_adapter_modem_facility_lock (ewf_adapter *adapter_ptr, const char *facility_str, const char *password_str, uint32_t classx)
 Lock a modem facility (+clck) More...
 
ewf_result ewf_adapter_modem_facility_unlock (ewf_adapter *adapter_ptr, const char *facility_str, const char *password_str, uint32_t classx)
 Unlock a modem facility (+clck) More...
 
ewf_result ewf_adapter_modem_facility_password_change (ewf_adapter *adapter_ptr, const char *facility_str, const char *old_password_str, const char *new_password_str)
 Change pwssword of a modem facility (+cpwd) More...
 

Detailed Description

The sim card utility functions.

Function Documentation

◆ ewf_adapter_modem_facility_lock()

ewf_result ewf_adapter_modem_facility_lock ( ewf_adapter adapter_ptr,
const char *  facility_str,
const char *  password_str,
uint32_t  classx 
)

Lock a modem facility (+clck)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]facility_stra pointer to a string with the facility to read
[in]password_stra pointer to a string with the password for accessing the facility
[in]classxSum of integers each representing a class of information
Returns
ewf_result status code

◆ ewf_adapter_modem_facility_password_change()

ewf_result ewf_adapter_modem_facility_password_change ( ewf_adapter adapter_ptr,
const char *  facility_str,
const char *  old_password_str,
const char *  new_password_str 
)

Change pwssword of a modem facility (+cpwd)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]facility_stra pointer to a string with the facility to read
[in]old_password_stra pointer to a string with the current password for accessing the facility
[in]new_password_stra pointer to a string with the new password for accessing the facility
Returns
ewf_result status code

◆ ewf_adapter_modem_facility_unlock()

ewf_result ewf_adapter_modem_facility_unlock ( ewf_adapter adapter_ptr,
const char *  facility_str,
const char *  password_str,
uint32_t  classx 
)

Unlock a modem facility (+clck)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]facility_stra pointer to a string with the facility to read
[in]password_stra pointer to a string with the password for accessing the facility
[in]classxSum of integers each representing a class of information
Returns
ewf_result status code

◆ ewf_adapter_modem_sim_generic_access_set()

ewf_result ewf_adapter_modem_sim_generic_access_set ( ewf_adapter adapter_ptr,
uint32_t  lenght,
const char *  command_str 
)

Generic SIM access (+csim)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]lengthLength of char that are sent in command (twice the actual leght of command or response)
[in]command_stra pointer to string in hex format, see the 3GPP TS 51.011 [73]
Returns
ewf_result status code

◆ ewf_adapter_modem_sim_pin_change()

ewf_result ewf_adapter_modem_sim_pin_change ( ewf_adapter adapter_ptr,
const char *  pin_str,
const char *  new_pin_str 
)

Set the modem SIM new PIN (+cpin)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]pin_strPointer to the current SIM PIN string
[in]new_pin_strPointer to the current SIM PIN string
Returns
ewf_result status code

◆ ewf_adapter_modem_sim_pin_enter()

ewf_result ewf_adapter_modem_sim_pin_enter ( ewf_adapter adapter_ptr,
const char *  pin_str 
)

Enter the modem SIM PIN (+cpin)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]pin_strPointer to he current SIM PIN string
Returns
ewf_result status code

◆ ewf_adapter_modem_sim_pin_retries_read()

ewf_result ewf_adapter_modem_sim_pin_retries_read ( ewf_adapter adapter_ptr,
const char *  sel_code_str,
uint32_t *  retries_ptr,
uint32_t *  default_retries_ptr 
)

Remaining PIN retries (+cpinr)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]sel_code_strPointer to string containing the type of PIN ("SIM PIN", "SIM PUK", "SIM PIN2", "SIM PUK2")
[out]retries_ptrPointer to remaining number of retries
[out]default_retries_ptrPointer to remaining number of default/initial retries
Returns
ewf_result status code

◆ ewf_adapter_modem_sim_pin_status_read()

ewf_result ewf_adapter_modem_sim_pin_status_read ( ewf_adapter adapter_ptr,
char *  code_str,
uint32_t *  code_str_len 
)

Read the modem SIM PIN status (+cpin?)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[out]code_strA pointer to the buffer that will contain the SIM PIN
[out]code_str_lenThe length of the buffer
Returns
ewf_result status code

◆ ewf_adapter_modem_sim_restricted_access()

ewf_result ewf_adapter_modem_sim_restricted_access ( ewf_adapter adapter_ptr,
uint32_t  command,
uint32_t  field,
uint32_t  p1,
uint32_t  p2,
uint32_t  p3,
const char *  data_str,
const char *  pathid_str 
)

Restricted sim access (+crsm)

Parameters
[in]adapter_ptrA pointer to the adapter structure
[in]commandInteger value for command passbed on by MT to the SIM
[in]fieldIntegerm Identifier of a elementary datafile on SIM
[in]p1Parameter passed on by the MT to the SIM
[in]p2Parameter passed on by the MT to the SIM
[in]p3Parameter passed on by the MT to the SIM
[in]data_strString as Hexadecimal information to be written to the SIM
[in]pathid_strString holding the path of an elementary file on the SIM/UICC in hexadecimal format
Returns
ewf_result status code