140903 FBs-CMGSM User's Manual EN v3-04
Page #
5 of 7
Step 4 – Select “Non Output Format” and click “OK”.
Step 5 – Configuration string is now black. Click “OK”.
Step 5 (GPRS) – Configuration string is now black. Click “OK”.
Step 6 – Result
Configuration is read after power up and only once. If you change configuration (for
example by WinProladder and second serial port), it is not read automatically. You
have to restart CMGSM. CMGSM will try to log in the GSM network without PIN if no
configuration in PLC is found. (In this case SIM card without PIN authorization is
requested.)
Configuration string is very simple. For example:
CMGSM3;PIN=7608;ACODE=998877;420777777497;$
For easy understanding this string says:
CMGSM3 – It is a configuration for CMGSM.
PIN=7608 – PIN code of the SIM card in order to register into the GSM
network.
ACODE=998877 – Access code for
Service SMS Commands
is 998877
420777777497 – Warning SMS is sent to this phone number
in case of any event. For example “Connection to PLC failure.” when
communication between CMGSM and PLC is lost or “IN1 activated (L-
>H).” when digital input IN (IN1) is activated respectively “IN1 released
(H->L).” when digital input IN (IN1) is deactivated.
Example of configuration string for GPRS:
CMGSM3;PIN=7608;APN=internet;
SERVER=test.server.com;PORT=5700;ACODE=998877;$
This string means:
CMGSM3 – It is configuration for CMGSM.
PIN=7608 – User PIN code of ‘7608’ for SIM card in order to register
into the network.
APN=internet – Access Point (APN) is needed in order to use GPRS
service in GSM network. In this example APN is ‘internet’.
SERVER=test.server.com – It is a name of a server, to which CMGSM
will connect. (Using TCP connection.)
PORT=5700 – Use TCP connection to port 5700
ACODE=998877 – Access code for SMS control is 998877
General format of these messages is following:
CMGSM3;KEY1=VALUE1;KEY2=VALUE2;...[;]$
Part ‘CMGSM3’ at the beginning of the string is mandatory. It is a stamp of validity.
Acceptable keys are shown in table below. Unknown keys are ignored, no spaces
are allowed inside keys or values. Order of pairs is not important. Keys are not case
sensitive, values are case sensitive. Maximum length of configuration string is 200
characters. At the end of each part MUST be character ‘;’ (semicolon), after last pair
MAY be character ‘;’ (semicolon) and MUST be character ‘$’ (dollar).
5.2
Basic parameters
Key
Description
Default
PIN
PIN code for SIM card. It may be omitted if the SIM
card does not need a PIN code. But it is mandatory if
the SIM card needs the PIN code.
<empty>
ACODE
Access code for SMS control. You can send SMS
message in order to control CMGSM. These SMS must
begin with this ACODE. They will be ignored
otherwise. Optional.
1234
MASTER
Phone number, where to send SMS about important
events: Connection to PLC failure. No SMS are sent if
value is empty. Only one master is possible.
<empty>
5.3
Advanced parameters
Key
Description
Default
REGSEND
First register of the
Send Record
.. It is area, where
PLC writes messages to send. See 4.1.1 Sending a
SMS. Only D or R registers can be used.
D3800
REGRECV
First register of the
Recv Record
. It is an area, where
CMGSM writes received messages. See 4.1.2 Receive a
SMS. Only D or R registers can be used.
D3700
REGDIAG
First register of the
Diagnostic Record
. It is an area,
where CMGSM writes diagnostic values like operator,
signal quality, … See chapter 4.4
D3500
NETRESET
This is a security feature. Value zero (0) in this
parameters means security reset every week (7 days).
If you do not want any security reset write -1 to this
parameter.
0
5.4
GPRS parameters
Keys in configuration string:
Key
Description
Default
APN
Access Point for GPRS. Ask your GSM provider for this
value.
internet
USER
User for APN. Mandatory is provider requires.
<empty>
PASSWD
Password for APN. Mandatory is provider requires.
<empty>
SERVER
Name or IP address of server, to which CMGSM will
connect. TCP connection is used. Optional.
<empty>
PORT
TCP port for connection. Optional.
5700
DNS
IP address of DNS server. Optional.
<empty>
If
SERVER
is omitted no GPRS connection is made and device waits for a data CSD
call only.
PLC1.ir