User manual
GSM modem protocol for pCO
2
Carel code +030220330 Rel. 2.0 del 30/10/02
23
5. NOTES ON THE MODEM MANAGEMENT PROCEDURES
5.1 Modem initialization
The pCO
2
, which features an application program for GSM modem management, performs the modem initialization sequence
at each start-up. This sequence is then repeated cyclically every 10 minutes.
WARNING
. The pCO
2
/GSM protocol can work only if the modem is correctly initialized.
Incorrect modem initialization is signaled by the pCO
2
, and can therefore be handled by the application program.
The initialization sequence, for modems other than the SIEMENS TC35, is the following:
DTR & RTS = Low
pause = 1s
DTR & RTS = High
pause = 400ms
ATZ<CR>
for the modem reset
Wait for “OK”
ATS0 = [x]E0S7=90<CR>
where:
x: is the value of the system variable that sets the number of rings the modem waits before answering;
E0: disable echo
S7=90: wait time setting of the remote modem carrier
Wait for “OK”
AT+IFC = 2,2<CR>
to disable software flow control
wait for “OK”
AT+CMGF = 1<CR> to set the text format of the SMS messages
wait for “OK”
The time the modem takes to send the “OK” string depends on the modem type and model. The pCO
2
waits a maximum of 5
seconds. After this time, if the modem has not sent the string, the initialization string is repeated.
5.2 Disconnection sequence
The disconnection sequence is as follows:
pause = 1.5s
+++
pause = 1.5s
ATH<CR>
pause = 1s
This sequence is sent to the modem whenever one of the following situations occurs:
1. DCD (Data Carrier Detect) signal failure, after the pCO
2
has received a RING from the supervisor (which is therefore
calling). If the signal failure takes place before the “CONNECT” string is received, disconnection occurs by timeout (60s).
Otherwise it is immediate.
2. No data sent by the supervisor during a connection initiated by the supervisor itself; disconnection occurs by timeout (30s).
3. Sending of the wrong password by the supervisor after the connection phase; disconnection occurs by timeout (30s).
4. No answer from the supervisor after a pCO
2
call (60s).
5. If the supervisor answers a call from the pCO
2
, see item 1. Furthermore, disconnection occurs by timeout (180s), if no
more data is exchanged between the supervisor and the pCO² (silence in the CONNECT phase).
5.3 SIM card voice number and data number
Each GSM network operator provides three numbers for each SIM card:
voice number, data number, fax number
4
It is clear that the SMS messages are sent to the pCO² by selecting the voice number of the SIM used by the modem connected.
As regards the calls made by the supervisor, these must occur by setting the number called by the supervisor to the data
number of the SIM.
4
In some cases the data number and fax number may be the same.