User`s manual
Table Of Contents
- 1. Introduction
- 2. Getting Started
- Powering on the W406-LX
- Connecting the W406-LX to a PC
- Configuring the Ethernet Interface
- USB Port for Expansion
- SD Socket for Storage Expansion
- Setting Up the Wireless Module
- Configuring the SIM Card
- Entering the PIN Code
- Verifying the SIM Card Status
- Enabling or Disabling the PIN Code Authentication
- Changing the PIN Code
- Unlocking the SIM Card
- Connecting to the Internet
- Reconnecting to the Internet
- Disconnecting from the Internet
- Detecting an Internet Connection Error
- Sending and Reading an SMS Message
- Deleting an SMS Message
- Test Program—Developing Hello.c
- 3. Managing Embedded Linux
- 4. Managing Communications
- 5. Development Tool Chains
- 6. Programmer’s Guide
- 7. Software Lock
- A. System Commands

W406-LX Linux User’s Manual Programmer’s Guide
6-15
When the SIM card status is set to PIN (2), this function retrieves the available PIN code attempt
count.
If the SIM card status is set to PUK (3), this function gets the available PUK code attempt count.
int cellular_modem_sim_get_pin_attempt_count(unsigned int fd);
Inputs:
<fd> the cellular modem
Return Values:
The attempted count left of PIN/PUK code authentication. otherwise, a negative value indicates a
failure
Remark:
When the SIM card status is set to PIN (2), this function authenticates a PIN code. If the correct
code is entered the status will be set back to ready (0).
int cellular_modem_sim_authenticate_pin_code(unsigned int fd, char *pin_code);
Inputs:
<fd> the cellular modem
<pin_code> point to the PIN code
Return Values:
0 on success, otherwise, the function fails
Remark:
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: