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-16
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:
Get the modem module temperature.
int cellular_modem_gprs_get_module_temperature(unsigned int fd)
Inputs:
<fd> the cellular modem
Return Values:
the tempture of GPRS module
Remark:
UART
Gets the UART interface.
DWORD uart_getmode(int port);
Inputs:
<port> the serial port number.
Return Values:
0 : RS-232
1 : RS485-2W
2 : RS422
3 : RS485-4W
otherwise, the function fails
Remark:
For example, user uart_getmode(2) to retrieve the interface of COM2: