SENDSMS communication utility


Description 
Parameters
Return codes
Examples
Changes and modifications
Document revisions

Description


The sendsms.exe program is used for sending text SMS by means of GSM modems. Tested by using a GSM modem of the Ericsson GM12 type. The modem must support AT set of commands for work with SMS according to the ETSI GSM 07.05 standard.

Parameters


Command-line parameters:

sendsms TO: number SCA: number [PIN: number] [-h TcpHost] [-p TcpPort] -m messfile | "message"


ParameterDescription
TO: numberNumber of a GSM mobile phone along with the GSM operator prefix. E.g. the GSM Orange-SK number 0905/432454 must be entered as 0905432454. Required parameter.
SCA: numberThe number of a message center for sending messages. The number must be defined in the full format along with the character "+" before the number. Message center number of Orange-SK must be defined as +421905303303, T-mobile SK as +421903333000, and O2-SK as +421949909909. Required parameter.
PIN: numberIf a SIM card is blocked by a PIN code, it must be defined by means of the parameter.
-h TcpHostIf AT commands are not sent via a serial line, the parameter defines the host to which the utility should create a TCP connection.
-p SerialPort/TcpPortSerial communication port entered in the form of COMx (e.g. COM2). In the case of TCP communication, this parameter defines the TCP port, to which the utility is to be connected.
-m messfileContents of the SMS message to send is stored in the file messfile.
"message"Contents of the SMS to send. If a sequence \n is in the message, the sequence will be replaced by the characters CR and LF.

Note: For sending a message, either the parameter message or -M messfile must be defined. Parameters are evaluated from the left to the right.

Return codes


Return codeMeaning
0OK, error-free SMS transmission.
1Incorrect or missing parameter, the program lists the error specification.
2Serial port error (doesn't exist, busy, etc.).
3GSM modem is not connected to the given port or is not running.
4Error when entering a PIN code (invalid PIN code).
5Error when the modem executes AT commands. The program lists the error specification.
6SMS message probably was not sent in order.
7A problem when initiating physical interface (serial / TCP/IP).

Examples


Sending an SMS to the GSM Orange-SK number 0905111222 via the Orange-SK message center number +421905303303, the message content is defined in the command line:

sendsms PIN: 1234 TO: 0905111222 SCA: +421905303303 ”This is a SMS contents”

Sending an SMS to the GSM Orange-SK number of 0905333444 via the Orange-SK message center number +421905303303, message contents is stored in the file C:\Messages\sms1.txt :

sendsms PIN: 1234 TO: 0905333444 SCA: +421905303303 –m C:\Messages\sms1.txt

Changes and modifications


  • December 16, 2014 - updating

Document revisions


  • Ver. 1.0 – May 31st 2000 – creating document
Napíšte komentár