Moxa ioPAC 8500-5-RJ45-C-T [35/66] Serial api

Moxa ioPAC 8500-2-M12-C-T [35/66] Serial api
Developer's Guide for Moxa RTU Controllers Programmer's Guide
2-27
Mx_SMS_Send_Ucs2
INT32 Mx_SMS_Send_Ucs2(INT8 *phone, INT8 *pin, INT8 *ucs2Msg, INT8 msgLength);
Sends an SMS message with unicode content in UCS2 format.
Input Parameters
phone
Phone number in C string format; e.g., “0939008056”
pin
SIM PIN in C string format, string length must be 4 bytes; e.g., “1234”. If the SIM does not
have
a PIN code, this parameter is ignored.
ucs2Msg
User defined SMS content in UCS2 format.
msgLength
The length of ucs2Msg in bytes; the maximum length is 140 bytes.
Output Parameters
None
Return Value
SMS_ERR_OK: Send SMS successful
SMS_ERR_LENGTH: Invalid length
SMS_ERR_OPEN: Open modem device err
SMS_ERR_MODEM: Cannot communicate with the modem
SMS_ERR_PIN: No SIM card or PIN error
SMS_ERR_PDU: Sets SMS to PDU mode error
SMS_ERR_ERR: Sends SMS timeout error
Notes
ioLogik W5348-C series only
Serial API
Device nodes are located at /dev/ttyMx. Users must include libmoxa_pgm.h. Return values of Serial API
functions are shown below; they can also be found at libmoxa_pgm.h.
#define SERIAL_OK 0
#define SERIAL_ERROR_FD -1
#define SERIAL_ERROR_OPEN -2
#define SERIAL_PARAMETER_ERROR -3
MX_SerialOpen
int MX_SerialOpen( int port);
Opens a serial port.
Input Parameters
port
Return Value
Result of the call or a file descriptor.
Port Mapping
ioLogik W5348-C series:
Port 1 ttyM0 (COM1)
Port 2 ttyM1 (COM2)
ioPAC 8020-C series:
Port 1 ttyM0 (COM)

Содержание

Скачать