W406-CE User’s Manual
Application Development
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:
Gets the storage base of SIM messages.
int cellular_modem_sms_get_storage_base(unsigned int fd);
Inputs:
<fd> the cellular modem
Return Values:
0: on SIM card, 1: on modem module, 2: on both, otherwise, the function fails
Remark:
Gets the number of stored messages allowed out of the maximum space.
int cellular_modem_sms_get_message_count(unsigned int fd, int *maximum);
Inputs:
<fd> the cellular modem
Outputs:
<maximum> pointer to the maximum number of messages allowed
Return Values:
the number of stored messages, otherwise, a negative value indicates a failure
Remark:
B-4