W406-CE User’s Manual
Application Development
When the SIM card status is PUK (3), this function changes the status to PIN (2).
If this fails, the SIM card will be locked.
int cellular_modem_sim_unlock_pin_code(unsigned int fd, char *passwd, char
*new_pin_code);
Inputs:
<fd> the cellular modem
<passwd> point to the PUK passwd code
<new_pin_code> point to a new PIN code
Return Values:
0 on success, otherwise, the function fails
Remark:
Gets the PIN code enable status of the SIM card.
int cellular_modem_sim_get_pin_enable_status (unsigned int fd);
Inputs:
<fd> the cellular modem
Return Values:
0 : PIN code disabled
1 : PIN code enabled
otherwise, the function fails
Remark:
When the SIM card status is ready (0) and the PIN code is enabled, this function assigns a PIN
code to the SIM card.
int cellular_modem_sim_assign_pin_code(unsigned int fd, char *old_pin_code, char
*new_pin_code);
Inputs:
<fd> the cellular modem
<old_pin_code> point to the old PIN code
<new_pin_code> point to the new PIN code
Return Values:
0 on success, otherwise, the function fails
Remark:
When the SIM card status is ready (0), this function enables or disables PIN code authentication.
int cellular_modem_sim_enable_pin_code(unsigned int fd, char *pin_code, int enable);
Inputs:
<fd> the cellular modem
<pin_code> point to the PIN code password
<enable> 1: enable PIN code, 0: disable PIN code
Return Values:
0 on success, otherwise, the function fails
Remark:
B-7