ADVANCED: gsmSendPDU (Function) |
Top Previous Next |
This function sends an SMS message through the GSM network. It will return the status of the send command (see below). The number can contain "-" and " " (dash and space) as part of the number to send the message to. Unlike the gsmSendSMS function, which can only send simple text messages, the gsmSendPDU can send binary messages.
This function can also send GSM network SMS messages during an active mobile network session. The mobile network session will simply be suspended during the transmission of the SMS message and automatically be resumed after the operation has ended.
Input: phonenumber : STRING (max length is 20, excluding " " and "-") Number to send the SMS message to (if "9999" is used, the message will be sent to a connected PC - either through a cable connection or via an active data connection). (only supported on network-enabled devices).
In case the device is not connected to the GSM network, the return value will be 1.
message : PTR The address of the message to send.
length : INT Length of message to send in bytes (maximum of 140 bytes).
dcs : SINT Data Coding Scheme to use, typically 16#F5. Please consult the appropriate documentation for this field.
Returns: INT
For GSM SMS messages:
For RTCU Communication Hub VSMS messages:
Declaration: FUNCTION gsmSendPDU : INT;
Example: INCLUDE rtcu.inc |