User`s manual

Table Of Contents
W406-LX Linux User’s Manual Programmer’s Guide
6-13
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:
Sends a SMS message to a specific phone number.
int cellular
_
modem
_
sms
_
send
_
messa
g
e(unsi
g
ned int fd, unsi
g
ned int ms
g_
mode, SMSMS
G
*psms);
Inputs:
<fd> the cellular modem
<msg_mode> 0: message in text, 1: message in PDU
<psms> point to the message
Return Values:
0 on success, otherwise, the function fails
Remark:
#define MAX_SMS_BYTES 512
typedef struct _SMSMSG
{
unsigned int been_read;
char msg_date[12];
char msg_time[20];
char phone_number[20];
unsigned int msg_length;
char msg_text[MAX_SMS_BYTES];
} SMSMSG, *PSMSMSG;
If you like to use PDU mode to send your SMS message, you must construct your PDU data into
the “SMSMSG.msg_text” field with exact length “SMSMSG.msg_length”.