SMS Gateway communication protocol
Description
Communication line configuration
Communication station configuration
I/O tag configuration
Document revisions
Kotva |
---|
| popis_protokolu |
---|
| popis_protokolu |
---|
|
Description
...
The implementation is based on the sending and processing of AT commands that are changed exchanged through the asynchronous serial line.
...
Parameter | Default value | Meaning |
---|
Device |
| Name of communication port. |
Init command | AT&F | AT command that reinitializes a device. In the case of some GSM modems (e.g. HUAWEI E3372), this command needs to be enhanced to AT&F^CURC=0 so that the modem stops reporting signal levels (RSSI- Radio Signal Strength Indication) by sending spontaneous messages e.g. <CR><LF>^RSSI:28<CR><LF>. |
Dial command | ATD | AT command used when dialing of a telephone number. |
Hangup | +++~~~~ATH | AT command to hang up the connection. |
DTR | Checked | DTR signal is used to hang up connection instead of AT command. |
...
Parameter | Default value | Meaning |
---|
| YES | Both received and sent data are written to the log file. |
| 0000 | PIN code of SIM card (GSM modem). |
| YES | Semicolon A semicolon is inserted at the end of the ATD command. |
| YES | Enable to hang up the incoming call in a defined time. |
| 35 sec | Defines a the duration of an incoming call. |
| 3 sec | Some of the modems do not inform about change of status: "ringing -> received", "ringing -> hung up". In "ringing" status, the flags that indicates indicate ringing are sent. If during the set interval configured by this parameter, the ringing is not indicated, the status automat of the protocol will change its status to "hang up". Zero disables to use this indication. |
| 3 sec | The time after which the outgoing call is terminated. |
| 600 sec | After elapsing of this time, the modem is reinitiated. |
Acknowledgment of Receipt | YES | It switches receipts Whether the receipts acknowledgments are enabled when sending SMS messages. |
| +421905303303 | Phone number of the service center for SMS messages. Slovakia O2: +421 949 909 909 Slovakia Orange: +421 905 303 303 Telekom Slovakia Telecom (T-Mobile): +421 903 333 000 |
| 60 sec | Interval of checking the received messages and receipts in the modem. |
| YES | Indicates whether a device sends the answer "OK" after dialing the phone number. |
Reinit On Every Operation | NO | Modem reinitialization before every SMS sending and before every dialing. If this parameter has the value NO, then the modem is initialized at the beginning of work and regularly according to the value of the Modem Is Ready Interval parameter. |
| NO | Querying signal quality before every SMS sending and before every dialing. The detected signal quality is not shown anywhere and can only be found in the communication line logs. |
I/O tag configuration
...
Value type | Address | Meaning |
|
---|
Outgoing calls |
---|
TxtO | OUTGOINGTELNUM | it sets the phone number of the outgoing call. |
|
TxtI | OUTGOINGRESULTNUMBER | The protocol can send multiple requests to dial a phone number at the same time. These requests are saved to the list and they are dialed gradually. In the I/O tadtag, the value of the last dialed number is saved. Together with the I/O tag with the OUTGOINGRESULTFLAG address, it informs about a the result of the call. |
|
Co | OUTGOINGRINGTIME | It sets the duration of the outgoing call including the dialing. It can be used as a trigger to start dialing. If the phone number cannot be dialed at that time (the value of the I/O tag with the BUSY address is TRUE) cannot be dialed at that time, the values of the required I/O tags keep are stored in a queue and postponed for later processing. |
|
Di | OUTGOINGRESULTFLAG | It informs about the result of the call. If the outgoing call has been received, the value is TRUE, otherwise FALSE. |
|
Di | MODEMERROR | An I/O tag that informs whether a modem error occurred when the call was made. If the call was successful or was not successful for another reason (e.g. exceeded ringing time or call duration), the value of the I/O tag will be False. |
|
Incoming calls |
---|
TxtI | INCOMMINGTELNUM | Contains the phone number of an incoming call. |
|
Di | INCOMMINGRINGING | It indicates that the incoming call is active. At a given moment the value INCOMMINGTELNUM is not valid yet. |
|
Outgoing SMS messages |
---|
TxtO | OUTGOINGSMSNUMBER | Sets the phone number to which an SMS message will be sent. |
|
TxtO | OUTGOINGSMSID | It keeps the value of own the user-defined unique identifier of the message. This value helps to find out whether the message could have been was sent. It also couples the message receipts with the sent message. |
|
TxtO | OUTGOINGSMSBODY | Sets the text of an SMS message. It is a trigger of sending the message, which means that its value must be set as the last. After starting the trigger, the values of all necessary I/O tags are saved into the queue. The SMS message is ready to sendbe sent. |
|
Di | OUTGOINGSMSRESULT | Together with the identifier, which is set in I/O tag with address OUTGOINGSMSRESULTID, it informs about the status of sending the SMS message. |
|
TxtI | OUTGOINGSMSRESULTID | If there are multiple SMS messages in the queue, there it is necessary to inform about the status of each SMS message, together with the identifier, which is set in the I/O tag with address, to inform about the status of each SMS messagewith OUTGOINGSMSID address. |
|
Incoming SMS messages |
---|
Txti | INCOMMINGSMSNUMBER | It contains the phone number of the received SMS message. |
|
Txti | INCOMMINGSMSBODY | It contains the text of the received SMS message. |
|
Ci | INCOMMINGSMSTRIGGERIN | If the new SMS message has been received, the value is incremented by 1. It may be used as the trigger of receiving the new SMS message. |
|
Co | INCOMMINGSMSTRIGGEROUT | It confirms the reading of the SMS message. The value from the I/O tag with address INCOMMINGSMSTRIGGERIN is set up in INCOMMINGSMSTRIGGERIN address must be written to this I/O tag. |
|
SMS receipts |
---|
TxtI | INCOMMINGRECEIPTID | It keeps the unique identifier of an SMS message, which was chosen during its sending. |
|
Ci | INCOMMINGRECEIPTTRIGGERIN | If the a new SMS receipt has been received, the value is incremented by 1. The value of identifier INCOMMINGRECEIPTID the I/O tag with INCOMMINGRECEIPTID address is valid at the particular moment. |
|
Co | INCOMMINGRECEIPTTRIGGEROUT | It confirms the reading of SMS receipt. The value from the I/O tag with address INCOMMINGRECEIPTTRIGGERIN is set up in INCOMMINGRECEIPTTRIGGERIN address must be written to this I/O tag. |
|
Common |
---|
Di | BUSY | It informs The I/O tag informing about modem status. |
|
Document revisions
...
- Ver. 1.0 – January 23, 2012 – Creation of document.
Info |
---|
title | An example of communication |
---|
|
The attached ZIP contains the configuration of the line, station and I/O tags for communication with the SMS Gateway protocol. View file |
---|
name | SmsGateway.zip |
---|
height | 150 |
---|
|
|
...