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-12
Aborts a GPRS connection.
int cellular_modem_gprs_abort_connection(unsigned int fd);
Inputs:
<fd> the cellular modem
Return Values:
0 on success, otherwise, the function fails
Remark:
Checks the status of a GPRS connection.
int cellular_modem_gprs_check_connection_status(unsigned int fd);
Inputs:
<fd> the cellular modem
Return Values:
0 indictes the connection is on. otherwise, it is disconnected
Remark:
Diagnoses the status of a GPRS connection and the status of the SIM card.
unsigned int cellular_modem_gprs_diagnose_status(unsigned int fd);
Inputs:
<fd> the cellular modem
Return Values:
0 indictes no error. otherwise, a 32-bit number indicating a combination of errors
Remark:
define GPRS errors, of which each stands on one of a 32-bit number
#define GPRS_ERROR_BAUDRATE_COM3 (1<<0)
#define GPRS_ERROR_BAUDRATE_COM4 (1<<1)
#define GPRS_ERROR_FLOWCONTROL (1<<2)
#define GPRS_ERROR_PINCODE (1<<3)
#define GPRS_ERROR_TEMPERATURE (1<<4)
#define GPRS_ERROR_SIGNAL_STRENGTH (1<<5)
#define GPRS_ERROR_RADIOBAND (1<<6)
#define GPRS_ERROR_MODULE (1<<7)
If the Cellular modem temperature greater than 88 degree or less than -35 degree, the function will
return with GPRS_ERROR_TEMPERATURE.
Sets the storage base of SIM messages.
int cellular_modem_sms_set_storage_base(unsigned int fd, int mode);
Inputs:
<fd> the cellular modem
<mode> 0: on SIM card, 1: on modem module, 2: on both
Return Values:
0 on success, otherwise, the function fails
Remark: