17
Example
SETGPRS Grundfos.dk2.tdc,502,49888,Grundfos,4321,normal,server,off
To verify the GPRS setting after completion, the SMS command GPRSSETTING can be used. The command GPRSSTATUS can verify
if the GPRS connection is working.
The connection states have the following meaning:
– "Detached": Trying to locate GPRS service.
– "Attached": GPRS service located.
– "Context active": IP address has been assigned, ready for a client to establish a socket connection.
– "Connected": A client has established a socket connection. The system is ready for TCP/IP data exchange (or already exchanging
data).
For details about the use of SMS commands, see "CIM 25X SMS commands" (supplement to installation and operating instructions) on
the CD-ROM supplied with the GSM module.
7.4 Operation
When powering on a CIU 250 with the correct GPRS setting, the following GPRS connection sequence will take place:
1. The CIU 250 locates the GPRS service. The connection state changes from "Detached" to "Attached".
2. The CIU 250 attempts to connect to the APN it has been given and requests an IP address. The base station looks through its record
of legal SIM cards and finds the IP address (the address associated with this SIM card) to assign to the CIU 250. After the CIU 250 has
got the IP address, the connection state changes to "Context active".
3. The CIU 250 is now ready for a client (e.g. SCADA system) to establish a socket connection and begin TCP/IP data exchange. When a
client connects the CIU 250, the connection state will change to "Connected", and the GSM status LED1 will indicate when data
transfer takes place. See section
A client (e.g. SCADA) establishes connection to a CIU 250 by specifying the IP address and the TCP port 502. Data transfer is always
initiated from the client in the form of a Modbus TCP telegram embedded in a TCP/IP frame and directed to TCP port 502. To the client
software, the connection to the CIU 250 is completely transparent.
The protection against unauthorised data access is high. The access to the GPRS network from the internet can only take place via the
VPN tunnel. See fig.
. Moreover, data transfer requires a Modbus master client, knowledge of the Modbus functional profile and the use
of a SCADA PIN code (if enabled).
The CIU 250 supervises the GPRS system to ensure that it is still working. An automatic procedure ensures restarting of the CIU 250 and
repetition of the GPRS connection sequence in case a deadlock situation has occurred. It also closes down socket connections that are
left open by the client and unused for more than 24 hours.
It is possible to use SMS communication while GPRS communication is active. However, in the "Connected" state the delay time between
reception and reply will increase.
If the connection state is different from "Connected", it is possible to establish a call-up connection. When the call-up connection is
established, GPRS data exchange will be blocked until the call-up is terminated by the caller.
A total of three Modbus clients can be connected to the Modbus TCP port of the CIU 250 and communicate simultaneously. Each
connection, called a socket connection, is handled independently. If all three sockets are used simultaneously, a "Silence timeout" of only
one minute is used to prevent a complete occupation for a long time.
Fig. 9
GPRS connection from a PC to the CIU 250 directly via GPRS
Note
When no GPRS data is being transferred, the connection states "Attached", "Context active" and "Connected".
All show the same LED1 status (short pulse).
TM
04 73
09 191
0
PC
GSM/GPRS
network
Base station
APN
CIU 250 with CIM 250
module and SIM card
Mobile phone
Setup, status and
control commands
via SMS
"Static"
IP address
"Static"
IP address