Moxa W406-T-LX [68/74] W315a 325a linux user s manual programmer s guide

Moxa W406-T-CE [68/74] W315a 325a linux user s manual programmer s guide
W315A/325A Linux User's Manual Programmer's Guide
6-9
#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 is greater than 88 degrees or less than -35 degrees, the function will return
GPRS_ERROR_TEMPERATURE.
int cellular_modem_sms_set_storage_base(unsigned int fd, int mode);
Description: Sets the storage base of SIM messages.
Input: <fd> the cellular modem
<mode> 0: on SIM card; 1: on modem module; 2: on both
Return Value: 0 if successful; other numbers indicate that the function failed
int cellular_modem_sms_get_storage_base(unsigned int fd);
Description: Gets the storage base of SIM messages.
Input: <fd> the cellular modem
Return Value: 0: on SIM card, 1: on modem module, 2: on both, otherwise, the function fails
int cellular_modem_sms_get_message_count(unsigned int fd, int *maximum);
Description: Gets the number of stored messages allowed out of the maximum space.
Input: <fd> the cellular modem
Output: <maximum> pointer to the maximum number of messages allowed
Return Value: The number of stored messages; otherwise, a negative value indicates a failure
int cellular_modem_sms_send_message(unsigned int fd, unsigned int msg_mode, SMSMSG
*psms);
Description: Sends an SMS message to a specific phone number.
Input: <fd> the cellular modem
<msg_mode> 0: message in text; 1: message in PDU
<psms> pointer to the message
Return Value: 0 on success; otherwise, the function has failed
Remarks:
#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;
To use PDU mode to send your SMS messages, you must specify the exact length in SMSMSG.msg_length
in the SMSMSG data structure.

Содержание

Скачать