You are on page 1of 62

User Manual:

GSM/GPRS Modem Configuration

GSM/GPRS

1 April 2009 MAN4005-04-EN


PAGE 2 GPRS / GSM MODEM Configuration MAN4005-04-EN

GSM / GPRS Modem Configuration

User Guide

LIMITED WARRANTY AND LIMITATION OF LIABILITY


Horner APG,LLC. ("HE-APG") warrants to the original purchaser that the GSM / GPRS module manufactured by HE-APG is free
from defects in material and workmanship under normal use and service. The obligation of HE-APG under this warranty shall be
limited to the repair or exchange of any part or parts which may prove defective under normal use and service within two (2) years
from the date of manufacture or eighteen (18) months from the date of installation by the original purchaser whichever occurs first,
such defect to be disclosed to the satisfaction of HE-APG after examination by HE-APG of the allegedly defective part or parts.
THIS WARRANTY IS EXPRESSLY IN LIEU OF ALL OTHER WARRANTIES EXPRESSED OR IMPLIED INCLUDING THE
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR USE AND OF ALL OTHER OBLIGATIONS OR LIABILITIES AND
HE-APG NEITHER ASSUMES, NOR AUTHORIZES ANY OTHER PERSON TO ASSUME FOR HE-APG, ANY OTHER LIABILITY
IN CONNECTION WITH THE SALE OF THIS GPRS module. THIS WARRANTY SHALL NOT APPLY TO THIS GPRS module OR
ANY PART THEREOF WHICH HAS BEEN SUBJECT TO ACCIDENT, NEGLIGENCE, ALTERATION, ABUSE, OR MISUSE. HE-
APG MAKES NO WARRANTY WHATSOEVER IN RESPECT TO ACCESSORIES OR PARTS NOT SUPPLIED BY HE-APG. THE
TERM "ORIGINAL PURCHASER", AS USED IN THIS WARRANTY, SHALL BE DEEMED TO MEAN THAT PERSON FOR WHOM
THE GPRS module IS ORIGINALLY INSTALLED. THIS WARRANTY SHALL APPLY ONLY WITHIN THE BOUNDARIES OF THE
CONTINENTAL UNITED STATES.

In no event, whether as a result of breach of contract, warranty, tort (including negligence) or otherwise, shall HE-APG or its
suppliers be liable of any special, consequential, incidental or penal damages including, but not limited to, loss of profit or revenues,
loss of use of the products or any associated equipment, damage to associated equipment, cost of capital, cost of substitute
products, facilities, services or replacement power, down time costs, or claims of original purchaser's customers for such damages.

To obtain warranty service, return the product to your distributor with a description of the problem, proof of purchase,
post paid, insured and in a suitable package.

ABOUT PROGRAMMING EXAMPLES


Any example programs and program segments in this manual or provided on accompanying diskettes are included solely for
illustrative purposes. Due to the many variables and requirements associated with any particular installation, Horner APG cannot
assume responsibility or liability for actual use based on the examples and diagrams. It is the sole responsibility of the system
designer utilizing the GSM / GPRS module to appropriately design the end system, to appropriately integrate the GSM / GPRS
module and to make safety provisions for the end equipment as is usual and customary in industrial applications as defined in any
codes or standards which apply.

Note: No part of this publication may be reproduced without the prior agreement and written permission of Horner APG, Inc.
Information in this document is subject to change without notice.

Cscape, SmartStack, SmartStix and CsCAN are trademarks of Horner APG. KEPServerEX is trademark of Kepware
Technologies, Inc

Page 2 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 3

Table of Contents

GSM Modem ................................................................................................................................................ 5


1 GSM Functionality ............................................................................................................................... 5
1.1 GSM Configuration...................................................................................................................... 6
1.1.1 Peer to peer communication ................................................................................................... 6
1.1.2 Connectivity with Cscape ........................................................................................................ 7
1.1.3 Send / Receive SMS ............................................................................................................... 8
2 GPRS (General Packet Radio Service) Functionality....................................................................... 9
2.1 GPRS Configuration ................................................................................................................... 9
2.2 Connectivity with Cscape.......................................................................................................... 12
2.3 Configuring KEPServerEX for Data Exchange ......................................................................... 13
2.4 Send / Receive SMS ................................................................................................................. 19
3 Data Transmission Settings ............................................................................................................. 19
4 Data Transfer using Communication Blocks.................................................................................. 20
4.1 Open Port.................................................................................................................................. 20
4.2 Modem Control Block................................................................................................................ 21
4.3 Modem Status Register value definitions ................................................................................. 24
4.4 Signal Strength.......................................................................................................................... 25
5 SMS Communications ....................................................................................................................... 26
5.1 Overview ................................................................................................................................... 26
Advantages of using SMS ................................................................................................................... 26
Using SMS Communications with Horner Controllers ......................................................................... 26
5.2 SMS Configuration .................................................................................................................... 27
5.2.1 GSM Modem Settings – SMS Configuration......................................................................... 28
5.2.2 COM Port Settings ................................................................................................................ 31
5.2.3 SMS Target Directory Settings.............................................................................................. 32
5.2.4 New Contact Information ...................................................................................................... 32
5.2.5 Incoming Messages Settings (RECEIVE):(Messages sent from Groups to the controller) .. 34
5.2.6 Outgoing Messages Settings (SEND):(Messages sent from the controller to Groups) ........ 36
5.2.7 SMS Message Configuration................................................................................................. 37
5.2.8 Insert Value Field .................................................................................................................. 38
5.2.9 SMS Send Message.............................................................................................................. 39
5.2.10 Rules for SMS Send and Receive Messages..................................................................... 39
6 GPRS / GSM Modem Specifications ................................................................................................ 40
7 Installation / Safety ............................................................................................................................ 41
8 Technical Support.............................................................................................................................. 41
9 Appendix............................................................................................................................................. 42
A. SIM Card Features ......................................................................................................................... 42
B. AT Command Set ........................................................................................................................... 43
1. ATD Dial command ................................................................................................................... 43
2. AT+CBST Select Bearer service type....................................................................................... 44
3. AT+CREG Network Registration Info ....................................................................................... 45
4. AT+COPS Operator Selection .................................................................................................. 45
5. AT+CPIN Enter PIN .................................................................................................................. 47
6. AT+CSQ Signal Quality and Bit Error Rate .............................................................................. 48
7. AT+CMGF SMS Format............................................................................................................ 48
8. AT+CSCA Service Center Address - Message Configuration Commands .............................. 49
9. AT+CSMP Set Text Mode Parameters..................................................................................... 49

Page 3 of 62 ECN # 956


PAGE 4 GPRS / GSM MODEM Configuration MAN4005-04-EN

10. AT+CNMI New Message Indication to TE - Message Receiving and Reading Commands .. 50
11. AT+CMGL List Messages ....................................................................................................... 51
12. AT+CMGR Read Message ................................................................................................... 52
13. AT+CMGS Send Message - Message Sending and Writing Commands .............................. 52
14. AT+CMGD Delete Message ................................................................................................... 53
15. +CGDCONT Define PDP Context ........................................................................................ 53
16. $UDPAPI Modem API Address - UDP API Commands ......................................................... 54
17. PAD Commands ..................................................................................................................... 54
18. $PADSRC PAD Source Port .................................................................................................. 55
19. $ACTIVE TCP PAD State....................................................................................................... 55
20. $PADBLK PAD Block Size...................................................................................................... 56
21. $PADFWD PAD Forward Character ....................................................................................... 56
22. $PADTO PAD Timeout Value ................................................................................................. 57
23. DP Dial Command for UDP PAD ............................................................................................ 57
24. DT Dial Command for TCP PAD............................................................................................. 58
25. %CGPCO Set Type of Authentication, Username and Password.......................................... 59
26. $AREG Auto Registration ....................................................................................................... 60
27. $HOSTIF Configure Host to Modem Interface...................................................................... 60
INDEX ......................................................................................................................................................... 61

Page 4 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 5

GSM Modem
GSM is a network used for connecting two devices and exchanging data. It can be used by an OCS with an internal modem
HE-GSM04A to communicate to other devices connecting to an Internet/GSM/PSTN network.

To install a GSM modem option card in an XLe/XLt/XL6 OCS, open the back cover of the OCS and connect the Modem HE-
GSM04A and then connect the antenna to the modem.

INSTALLATION PROCEDURE

1. Disconnect all power from the XLe/XLt/XL6 OCS (Operator Control Station) unit including I/O power.
2. Remove the four screws on the back of the XLe/XLt/XL6 unit and remove the back cover. The back cover will be replaced with the
extended back cover that ships with the communication add-on. Screws are re-used (Figure 1).
3. Plug the communication board onto the 24-pin connector. Make sure all the pins are properly aligned (Figure 2).
4. Place the extended back cover onto the unit. It can be helpful to tip it at an angle so the connector on the COM board passes
through the opening on the back cover.
5. Place the screw back into the hole and turn the screw slowly counter clockwise until it clicks into the threads. This prevents the screw
from being cross-threaded. Now, turn the screw clock-wise until the cover is firmly secured. Repeat this process for all four (4) screws.

With the GSM modem option card, the Data Exchange and Connectivity with Cscape can be established in the following two ways:

• GSM connectivity
• GPRS connectivity

Cscape configuration is explained in the following sections.

1 GSM Functionality
• GSM data call can be used for:

• Peer to peer communication between two devices for exchanging register data.
• Connect to Cscape for downloading / uploading and debugging the application
• Send / receive configured SMS messages.

• GSM data call connects at 9600bps only.


• GSM data call requires ‘data call enabled SIM’

Page 5 of 62 ECN # 956


PAGE 6 GPRS / GSM MODEM Configuration MAN4005-04-EN

1.1 GSM Configuration

1.1.1 Peer to peer communication

• Horner OCS firmware is designed to initialize a GSM modem to establish a GSM data call.
• In order to establish GSM data call connectivity using Horner OCS follow these steps.
• Select Program and GSM/GPRS/SMS Configuration from the Main Menu.

• Select the Enable GSM Data Connection checkbox in the GSM/GPRS/SMS Configuration window.

Page 6 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 7

• If an SMS transmission needs to be carried out when the GSM connection is active then additional Data
Transmission Settings need to be entered for servicing SMS. If SMS needs to be serviced when a GSM
connection is active, select Enable SMS Configuration. This will enable Data Transmission Settings.
Select the checkbox and set the idle time after which SMS should be serviced i.e. if 10 secs is configured
in this field, when the connection is idle (status 6) for 10 secs, SMS send/received (Status 5) would be
serviced. If the checkbox is not selected, SMS will not be serviced.

• Additional ladder programming must be written to answer or to make GSM data call using communication
operation ladder blocks. Use of Communication blocks for GSM/GPRS connectivity is detailed in section 4.

1.1.2 Connectivity with Cscape

• On the device, Change the default programming port to GSMGPRS from the system menu, serial port
option, i.e. OCS ‘system menu -> Set Serial Ports -> Dflt Pgm Port ->GSM’ for MJ1.

Page 7 of 62 ECN # 956


PAGE 8 GPRS / GSM MODEM Configuration MAN4005-04-EN

• Install a modem in the PC


• Open the Add Target dialog by selecting Tools| Editor Options | Communications Port and then click

from the Main Menu.


• Select the installed modem and enter GSM data no. of the SIM connected to the device and press
OK.

Note: The status of the connection will be updated in the CsCAN Status Register specified in the GSM/GPRS/SMS Configuration
window. Various status values are detailed in section 4.3.

1.1.3 Send / Receive SMS

SMS configuration for sending/receiving SMS is detailed in section 5.2.

Page 8 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 9

2 GPRS (General Packet Radio Service) Functionality


A GPRS network can be used to establish communication between OCS and any other communicating devices having unique IP
address and port configuration.

• GPRS can be used to establish connectivity with:


• remote servers for exchanging register data
• Cscape for downloading / uploading and debugging the application using redirector software
• GSM network for sending / receiving configured SMS messages
• peer to peer communications
• Static SIM with VPN functionality is required. Static IP SIM or Semi – static IP SIMs with VPN are required for this
functionality.
• GPRS service must be enabled in SIM.
Auto dial blocks of modem are required on both server and client. See section 4.2 for details.

2.1 GPRS Configuration

Horner OCS firmware is designed to initialize the GSM modem to establish GPRS connectivity. This configuration needs to be done
for connectivity with remote server as well as for connectivity with Cscape.

• Open the GSM/GPRS/SMS Configuration by selecting Program, GSM/GPRS/SMS Configuration from the Main Menu.
• Select the Enable GPRS Data Connection check box.
• Configure Service Provider (Optional). If checked, the modem will get connected to the network provider mentioned
here. A register address can also be given here, where the service provider name can be mentioned in registers. If the
register option is selected, the service provider name should be terminated with a null. Only the first part of the name
of network service provider can also be mentioned, i.e. instead of O2 IRELAND, only O2 can also be mentioned.
• Configure a register address to store Signal strength (Optional). See section 4.4 for details.
• Configure Status register for CsCAN communication (Optional). See section 4.3 for details.

Page 9 of 62 ECN # 956


PAGE 10 GPRS / GSM MODEM Configuration MAN4005-04-EN

• Click on the GPRS Configuration settings button to configure GPRS according to the information obtained by the
Network Service Provider.

Page 10 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 11

GPRS Configuration
The GPRS Access Point Configuration is mandatory and the fields are to be filled according to the
information obtained by your Network Service Provider.
GPRS Access Point Configuration

Select Get Access Point Configuration checkbox configure registers instead of fixed values.

Client mode: In this mode the OCS behaves as client and connects to a specific server (Server
IP/Port address to be specified in modem ladder block input).

Server mode: In this mode the OCS behaves as server and accepts connection requests from
specified client. Client IP addresses are to be specified in modem ladder block input.

• For added security, the IP address for Cscape connectivity with a single device can also
be specified. Enter the IP address of the device to connect to, for CsCAN connectivity
directly in CsCAN Source IP Addr field or select the Get Source IP Address from
Register checkbox and specify a %R register Address (32bit). When the IP address is
mentioned, Cscape will connect to only that address and will reject connection requests
from all other IP addresses.

Note: If the CsCAN Source IP Addr is 0.0.0.0, then the connection from any address will be
accepted.

Note: Server mode of operation is supported only when SIM with a static IP address or SIM
having semi-static IP address with VPN is used.

• CsCAN Source Port: When the modem is configured in server mode, the incoming
GPRS Packet Assembler/Disassembler connection request from any client will be accepted only via this port address. For Cscape
Configuration connectivity this should be configured as 10001. This can be set to any value for peer to
peer and data exchange provided the Server/Client port number is same. If Cscape
connectivity is also required with data exchange/peer to peer connectivity, set this port to
10001.

Transmission of GPRS packet can take place on reaching packet size or occurrence of timeout
or when forward character is found in the internal transmit buffer.

• Block Size: GPRS packet size in number of bytes.


• Timeout Period: Transmission of GPRS packet to destination address will take place on
occurrence of timeout mentioned.
• Forward Character: Transmission of GPRS packet will take place on finding character
configured here. This value is to be entered in Hex value of ASCII character. For example,
if ‘0D’ is configured, the GPRS packet is transmitted when Line Feed character is put in
the transmit buffer. This feature can be used to implement custom protocol over GPRS,
such that the GPRS packet is sent after putting this character in the transmit buffer.

• Send Forward character: If this checkbox enabled, forward character will be sent
together with GPRS packet.

Additional ladder programming must be written to establish connection with remote server/client over GPRS service using
‘communication operation’ ladder blocks.

Page 11 of 62 ECN # 956


PAGE 12 GPRS / GSM MODEM Configuration MAN4005-04-EN

2.2 Connectivity with Cscape

• GPRS configuration must be downloaded into the OCS.


• Configure Sever/Client IP address in the OCS Main Menu -> Dflt Pgm Port -> GPRS
• This is valid for port MJ1 only.

• Select the default programming port as GPRS in the System Menu.


• The connectivity with Cscape over GPRS can be established only when the modem is configured in server mode.

• Open the Add Target dialog by selecting Tools| Editor Options | Communications Port and then click
from the Main Menu.

• Select Ethernet as the communications port (COMM Ports) and GPRS mode.
• Specify modem IP address and timeout.
• The communication timeout for Cscape should be increased to take care of the GPRS latency (typically 30 to 40
seconds).
• The status of the connection will be updated in CsCAN Status Register specified in the GSM/GPRS/SMS
Configuration window. Various status values are described in the Section 4.3 Modem Status Register Value Definitions
table. The same table can be used for the CsCAN Status Register. When the modem status value is 6,
communications can be established.

Page 12 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 13

2.3 Configuring KEPServerEX for Data Exchange

KEPServerEX is the latest generation of Kepware's OPC server technology. The KEPServerEX gets the device and system data. It
then translates it into a standard communication protocol (OPC or DDE) that all clients can receive and understand.

The following dialog gives details about the version of KEPServerEX with which the GPRS connectivity has been tested.

To configure KEPServerEX, a new channel is to be configured followed by a new device and tags for data mapping. Create a new
channel by selecting New Channel from the Edit drop down on the KEPServerEX main menu:

Page 13 of 62 ECN # 956


PAGE 14 GPRS / GSM MODEM Configuration MAN4005-04-EN

• After selecting name, choose the Modbus Ethernet option from the Device driver drop down.

• Select the Enable Diagnostics check box and continue with other default settings.

Page 14 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 15

• Add a new device by selecting New Device from the Edit submenu in KEPServerEX.

• After naming, choose Modbus from the Device Model menu.

Page 15 of 62 ECN # 956


PAGE 16 GPRS / GSM MODEM Configuration MAN4005-04-EN

In the New Device – ID dialog, set the Device ID (IP address of the sim card used). The last digit of the Device ID is a modbus
slave ID, and it should match the settings from CSCAPE ( =2 as mentioned in the sample program).

Clicking Next> opens the New Device – TCP/IP dialog box.

• Enter the correct port number (the same as in Cscape configurator), and TCP/IP protocol and continue with other
default settings.

Note: The port number should be configured as 10001 if Cscape connectivity is also required.

Page 16 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 17

To be able to read and change internal registers, tags have to be created. Select New Tag from the Edit drop down on
the KEPServerEx main menu.

• The following Tag Properties dialog box show entries for register %R900. Likewise other tags can be created.

Page 17 of 62 ECN # 956


PAGE 18 GPRS / GSM MODEM Configuration MAN4005-04-EN

After creating a new tag this screen will show all the tags created with Tag Name, Address, Data Type, Scan Rate, Scaling and
Description…

• To run OPC client, select Launch OPC Quick Client from Tools on the KEPServerEx main menu.

When a connection is made, the status register specified in the modem block will change to a 1. Test the data exchange.

Page 18 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 19

2.4 Send / Receive SMS

SMS configuration for sending/receiving SMS is detailed in section 5.2.

3 Data Transmission Settings


If SMS needs to be serviced when a GSM/GPRS connection is active then additional Data Transmission Settings are needed.
Select the Enable SMS Configuration checkbox with GSM or GPRS.

Select the checkbox, Disconnect and Service SMS when connection is Idle, to enable the Idle State Timeout. Enter the time
duration from 10 to 240 seconds.

Page 19 of 62 ECN # 956


PAGE 20 GPRS / GSM MODEM Configuration MAN4005-04-EN

4 Data Transfer using Communication Blocks


For exchanging data over GSM / GPRS, communications block are required to be configured as follows:

4.1 Open Port

When using the internal GSM modem, Mode should be specified GSM Quad. The Protocol can be selected as CsCAN, Generic or
Modbus. For Modbus, Slave or Master block should be used.

Page 20 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 21

4.2 Modem Control Block

Note: To use modem control block, the com port is to be opened first.

• Auto Dial modem Option


• GSM data call
o Modem Control block with ‘Auto Dial’ option is used for calling remote device (server)
o Remote device data number must be entered in ‘Number’ text box.
o Select type of dialing i.e. Pulse or Tone
o Configure the status register to show the status of the connection. The status values are detailed in section 4.3.

• GPRS connectivity
o Modem Control block with ‘Auto Dial’ option is used to connect to remote server/client using the GPRS service.
o Remote server IP and Port address must be entered in ‘Number’ text box in the format IP Address/Port.
o In case of device acting as client, the IP address of the server needs to be mentioned here.
o In case of device acting as server, the IP address can be given as 0.0.0.0. to accept connection from any client
or IP address of the client can also be mentioned to accept connection only from that specific IP address for
added security.
o Select type of protocol UDP or TCP over IP.
o Configure the status register to show the status of the connection. The status values are detailed in section 4.3.
o If the modem ladder block input is enabled then the modem tries establishing connection with a remote server in
client mode or waits for a connection request from the client in server mode.

Page 21 of 62 ECN # 956


PAGE 22 GPRS / GSM MODEM Configuration MAN4005-04-EN

• Auto Answer modem Option


• GSM data call
o Modem Control block with ‘Auto Answer’ option is used for receiving connection requests from a remote server or
device.
o Number of rings after which connection request is accepted is entered in the text box provided.
o Configure the status register to show the status of the connection. The status values are detailed in section 4.3.

Page 22 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 23

• Initialize modem Option


o Modem Control block with ‘Initialize Modem’ option is used for execution of modem specific AT commands.
o Modem specific AT command to be executed is to be entered in ‘Init String’ text box provided in control.
o If AT command execution is successful then Modem Control block output is enabled, if not, the output is disabled.
o The status register is updated depending upon the response from the modem.
o The response from the modem is stored in consecutive register locations starting from ‘status register+1’ address.

Example:

o Modem control block with ‘Initialize Modem’ option is used for balance of minutes remaining from your service
provider.
o The service provider balance request string is entered in the ‘Init String’ box together with CUSD AT command.
o The response from the service provider is stored in consecutive register locations starting from ‘Status Address + 1’.

Note: The command to be sent for balance inquiry is: +CUSD = 1,”*111#”,15 where “*111#” is the string to request balance
remaining in SIM and may vary depending on the service provider.

Page 23 of 62 ECN # 956


PAGE 24 GPRS / GSM MODEM Configuration MAN4005-04-EN

4.3 Modem Status Register value definitions

Register
Modem Status Modem Output Power
Value
65535
Modem is inactive Disabled
(0xFFFF)
Modem command started and waiting for 65534
Disabled
response (0xFFFE)
Modem is not responding (Command 65533
Disabled
Timeout) (0xFFFD)
Enabled (Only in case of Initialization modem command else
Modem Command succeeded 0 (0x0)
Disabled)

Modem is connected to destination server 1(0x1) Enabled

Modem is Ringing (i.e. incoming call) 2 (0x2) Disabled

Modem detected no/lost carrier 3(0x3) Disabled

Modem command syntax error 4(0x4) Disabled

SMS functionality is Active 5(0x5) Disabled

Modem in Listen (Server) Mode 6 (0x6) Disabled

Note:
• The status values are same for all GSM and GPRS modes i.e. Cscape connectivity or data exchange. However different
status registers should be used for different modes.
• Status of ‘6’ indicates Mode is waiting for connection request from specified client and it is applicable in case of GPRS
server mode.
• When the modem returns status ‘Connected’, then TX, RX or another communications ladder block can be used to
exchange data with a destination server according to protocol.
• Disabling the Modem Control ladder block input will disconnect GPRS service. The Status Register value changes to
65534 (0xFFFE i.e. indicates waiting for modem response for disconnect command) and then to 65535 (0xFFFF). It can
be used to trigger SMS sending on an alarm.
• SMS functionality works based upon ‘Data Transmission Settings’ in the SMS configuration window while the GSM/GPRS
connection is active.
• Connecting to a GPRS network and establishing connection with remote server may require 3 to 4 minutes.
• Breaking connection with a remote server may take 10 to 20 seconds.
• If a continuous error response is seen in the status register or 0xFFFE response while connecting the modem as the
default programming port then please check the following:

a. GPRS configuration parameters (in case of GPRS connection)


b. GSM Signal strength
c. Proper insertion of SIM card in modem
d. Is the SIM enabled for a given service (i.e. GPRS or GSM data call).
e. Antenna connected properly/antenna connection
f. VPN connectivity

• If the default programming port is switched to the default serial port option from GSM/GPRS then the port should be
released after 20 to 30 seconds after complete GPRS connection drop.
• Only one modem control block in specific mode (Initialize/Auto Dial/Auto Answer) can be used in ladder. More than one
modem control block can be used in ladder if they are in different modes.

Page 24 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 25

4.4 Signal Strength

• GSM/GPRS signal strength value is updated in 16bit long register. The 16bit long value consists of 2 fields as below:

o Bit 1 to 8 represents Bit Error rate


Possible values are
Value 0 to 7
value 99(63h): Not known or Not detectable.

o Bit 9 to 16 represents Received Signal Strength Indication


Possible values are

0 : -113dBm or less (Very Poor signal Strength)


1 : -111dBm or less (Poor signal Strength)
30(1Eh) : -109 to -53 dBm (Good signal Strength)
31(1Fh) : -51dBm or greater (Very Good signal Strength)
99(63h) : Not known or Not detectable.

Page 25 of 62 ECN # 956


PAGE 26 GPRS / GSM MODEM Configuration MAN4005-04-EN

5 SMS Communications
5.1 Overview

SMS (Short Message Service) is a type of communications process that enables the transmission of short text messages and data
transfers to and from mobile devices such as cell phones. Messages are usually limited from 140 to 160 characters in length and
are stored and forwarded at SMS centers. This allows messages and data transfers to be retrieved immediately or at a later time
via an SMS center.

Advantages of using SMS

SMS communications provide an affordable and convenient means to send and receive data using mobile devices such as cell
phones. Businesses and industry often require 24-hour coverage of their operations and have personnel who are on-call after
normal work hours to handle work-related issues and emergencies. There are employees who are responsible for the proper
functioning of equipment and processes at remote sites. Managers need to be notified of significant events.

Using SMS Communications with Horner Controllers

The SMS feature in selected Horner controllers provides the capability of sending and receiving text messages and register data
values using mobile devices such as a cell phone. Depending upon the configuration, approved group members can read and write
values into the controller's data registers. This kind of communication is referred to as a data transfer.

Data Transfer Example

o Motor #1 stops. Data is sent to a register in the OCS controller (XLe/XLt/XL6).


o The OCS reads the data register value indicating Motor #1 has stopped. A message is sent to the cell phone of
a Maintenance Group member via SMS Communications. Transmissions are routed through an SMS center.
o The Maintenance Group member receives the following message on a cell phone:
o Motor #1 speed is 0
o The Maintenance Group member sends the following message back to the OCS using a cell phone via SMS
communications:
o Motor #1 Start Speed is 1800
o The OCS reads the register containing the data value sent from the Maintenance Group member and responds
as programmed.
o The OCS sends a signal to start Motor #1
o Motor #1 re-starts, and normal operation is restored.

SMS Security Measures

As part of the SMS configuration, a list of approved phone numbers and authorized messages that will be used for SMS
communications must be provided. Because the SMS feature allows users to read and write to controller registers it is important to
follow good standard security practices to safeguard systems. Whether users are allowed to write to registers or not, ensure that
security is in place to protect against unauthorized inputs to registers.

Page 26 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 27

5.2 SMS Configuration

Cscape software is used to configure the necessary attributes in selected Horner controllers such as the XLe/XLt/XL6 to send and
receive short text messages and data transfers using SMS communications. After the SMS configuration is completed and
downloaded into the controller, approved group members can send and receive a variety of information such as register values and
emergency alerts using cell phones and other mobile devices.

Refer to SMS Communications for more information on SMS and its capabilities.

• Select the desired controller. This feature is available on OCS types XLe, XLt, and XL6 and requires Cscape 8.1 or
higher for SMS configuration. See How to Select a Controller Model if needed.

• Click Program and then select the GSM/GPRS/SMS Configuration tab on the Cscape main menu.

• Select the Enable SMS Configuration checkbox and then click SMS Configuration to begin SMS configuration.

Page 27 of 62 ECN # 956


PAGE 28 GPRS / GSM MODEM Configuration MAN4005-04-EN

5.2.1 GSM Modem Settings – SMS Configuration

• In this example, the screen is already configured. The SMS Configuration screen has several sections that require
configuration.

Status Register Settings


Enter the starting register location to indicate the status of the SMS communication. This is a block of four
Address registers that are consecutive in memory. For example, if you are using R31– R34, you need to enter the
starting register address as %R0031.
Name Enter (or select) an I/O Name.

The Status Register contains a status bit indicating the condition of the SMS communication. The following table contains the
meaning of each status bit…

Status Bits
SMS Status Bits Description
Bit 13 Receive response failed Set within 10 seconds if Read SMS command fails
Set after 1 min of entering into RUN mode if Modem
Bit 14 Initialization Failed
initialization fails
Bit 15 Transmit Failed Set within 10 seconds if SMS Transmit fails
Bit 16 Communication Failed Set within 10 seconds if communication with modem fails
Bit 17 - Bit 24 Bit Error Rate value. See section 4.4 for details Updated within 30 sec after entering into RUN mode
Bit 25 – Bit 32 Receive level value. See section 4.4 for details Updated within 30 sec after entering into RUN mode
Count is incremented whenever a message is received from
Bit 33 - Bit 48 Invalid message count
not configured sender or in not configured message format.
Incremented every time when send / Receive of SMS fails. It
Bit 49 - Bit 56 Send/Receive retry count
is incremented within 10 seconds if Send / Receive failure.
This count is incremented whenever modem initialization
Bit 57 – Bit 64 Re-initialization count fails. The modem re-initializes itself if the send / receive
command fails for 10 consecutive times.

Page 28 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 29

Status Bits for Siemens Modems & Internal Modem


CPIN Command Failed: This command is used to unlock the SIM. This bit will be set if supplied PIN
Bit 1 is invalid or SIM is blocked or modem fails to respond within 2 sec of
sending this command. This command is NOT executed if SIM Pin code is
not enabled.
CSCA service center number command Failed: This command is used to set the SMS service
center number. This bit will be set if setting SMS service center number
Bit 2 command fails or modem fails to respond within 2 sec of sending this
command. This command is NOT executed if Service center number is
not provided.
CREG Command Failed: This command is used to register mobile device to the GSM network. This
Bit 3 bit will be set if registration fails or modem fails to respond within 2 sec of
sending this command.
CMGF Command Failed: SMS format selection command. This bit is set if modem returns Error
Bit 4 response to this command or modem fails to respond within 2 sec of
sending this command.
CNMI Command Failed: Command used to check newly received SMS message. This bit is set if
Bit 5 modem returns Error response to this command or modem fails to
respond within 2 sec of sending this command.
CSQ Command Failed: This command is used to get signal strength. This bit is set if modem
Bit 6 returns Error response to this command or modem fails to respond within
2 sec of sending this command.
COPS Command Failed: This command is used to select and register to a GSM network operator.
Bit 7 This bit is set if modem returns Error response to this command or modem
fails to respond within 2 sec of sending this command.
CPEE Command Failed: This command (CMEE) is used to disable mobile equipment (ME) error
Bit 8 indication. This bit is set if modem returns Error response to this command
or modem fails to respond within 2 sec of sending this command.

Bit 9 ATE Command Failed: This bit will be set if Echo off command to Modem returns Error or modem
fails to respond within 2 sec of sending this command.
CSMP Command failed: This bit will set if "Set SMS text mode parameter" command to Modem
Bit 10 returns error or Modem fails to respond within 2 Sec of sending this
command.
Status Bits for User Specific Initialization
If command(s) fails in the user script, a corresponding bit is set indicating failure. For example: Bit 1 is
Bit 1 – Bit 12
set when the first command in the script fails. Bit 2 is set when the 2nd command in the script fails.

SMS Message Buffer Register Settings

The Message Buffer Register holds the latest SMS message string sent or received by the controller. An individual SMS message
can have up to 160 characters.

Message Buffer Register Settings


Enter the starting register location where the latest SMS message string is stored. This is a block of
Address 80 registers that are consecutive in memory. For example, if you are using R101– R180, you need to
enter the starting register address as %R0101.
Name Enter (or select) an I/O Name.

SMS Configuration Parameters

Configuration Parameters
If required, select the box and type in Center number (up to 16 digits). The Center Number uses
Center Number
numbers 0 – 9 and these special characters: , ( ) – +
If required, select the box and type Pin number (up to 4 digits). SIM Pin Code can have only digits 0
SIM Pin Code
– 9.
Command Interval This is the interval of time (in seconds) that the OCS poll for messages (valid range: 1 - 100).

Note: SMS service center number should be configured correctly to send a SMS successfully.

Page 29 of 62 ECN # 956


PAGE 30 GPRS / GSM MODEM Configuration MAN4005-04-EN

Additional SMS Settings

Be sure to click each button and perform the configuration procedures associated with each button.

Modem Initialization Settings

Configure this screen to select the type of Modem Initialization that is going to be used.

Configuration of Initialization Status Register Settings and User Specific Modem Initialization Script in the above screen is
required when User Initialization Script is selected.

Modem Initialization Settings

The following options are available:

No Initialization (Modem Preconfigured): No initialization of GSM modem will be done. Select this
option if the attached GSM modem is pre-configured and does not require initialization.

Internal Modem Initialization: Select this option if you have an XLe/XLt/XL6 with internal modem.
Modem Initialization
Type Siemens TC Modem Initialization: In case of external GSM modem, select this option.

User Initialization Script: To use your own initialization script, select User Initialization Script. When
User Initialization Script is selected, the internal initialization of the device is not performed. It is
necessary to configure initialization status register and provide initialization script.

The type of Modem Initialization used affects various settings that are available on the COM Port
screen.
Enter the starting register address location used to store the additional modem initialization script’s
Address latest command executed. This is a block of 10 registers that are consecutive in memory. For
example, if you are using R301 to R310, you need to enter the starting register address as %R301.
Name Enter (or select) the I/O Name.
User Specific Modem
Enter your script in this box.
Initialization Script

Page 30 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 31

5.2.2 COM Port Settings

Note: Before configuring this screen, you need to configure the Modem Initialization Settings screen. The type of Modem
Initialization used affects various settings that are available on the COM Port screen such as the Port, Baud Rate, and
Mode.

After configuring the Modem Initialization Settings, configure the port to be used for communications.

The following selections must match the default settings of the modem you are using.

COM Port Configuration Settings


Select the desired port. The number of ports varies depending on the controller used. For an
Port
XLe/XLt/XL6 internal modem MJ1 should be selected.
Select the connection mode. The drop-down list changes according to the port selection. For an
Mode XLe/XLt/XL6 internal modem, this selection should be GSM QUAD. For an external GSM
Modem, RS 232 should be selected.
Select Baud Rate, Parity, Data Bits, Stop Bits and Handshake settings as per the default settings
Comm Settings
of the modem being used.

Page 31 of 62 ECN # 956


PAGE 32 GPRS / GSM MODEM Configuration MAN4005-04-EN

5.2.3 SMS Target Directory Settings

Before creating Send or Receive messages, a directory of phone numbers should be created. Configure the following
screen to build a directory.

• Click Add Contact to add a member. See the following screen (New Contact Information).
• Click Modify Contact if a member is already added in the directory. To modify the member listing, either double-click the
row or highlight the row and click Modify Contact. The Modify Contact Information screen appears and is configured as
the New Contact Information screen shown below.
• Click Delete Contact to remove a listing after highlighting the row.

5.2.4 New Contact Information

Page 32 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 33

New Contact Information


Enter or select a Group Name.
1. It can contain characters A-Z, a-z, 0-9, and the _ underscore character.
2. The first character must be A-Z, a-z, or the _ underscore character.
3. Do not use spaces or special characters.
Group Name
4. Do not use two consecutive underscore characters.

Note: In SMS configuration, max 32 Group names can be configured.

Enter a phone number or enter a register where the phone number is stored.

• If you want to change the phone number at runtime, you should enter a register
address. The register address points to the location where you can dynamically
change the phone number without having to perform the SMS configuration
procedures again.

Phone Number • Phone numbers can not have characters other than Numbers 0 through 9 and
these special characters: , ( ) – +.

• Phone numbers must not be more than 16 characters in length.

• In SMS configuration user can configure max 32 numbers: 32 Tx messages and 32


Rx messages.

If you specify a register address in the Phone Number field, you can give the phone number
Phone Number Name
an I/O name.
Comments Add details for clarification.

• Click Modify Contact and Delete Contact buttons as needed.


• Click OK to see the contacts on the directory.

The following screen shows examples of contacts added to the directory.

With the directory created, you may begin creating send and receive messages.

Page 33 of 62 ECN # 956


PAGE 34 GPRS / GSM MODEM Configuration MAN4005-04-EN

5.2.5 Incoming Messages Settings (RECEIVE): (Messages sent from Groups to the controller)

Before creating send or receive messages, a directory needs to be created. After the directory is created,
configure the following screen.

• Click Add New Message to add a new message.


• Click Modify Message to edit a message that is already on the list. Either double-click the row or highlight the row
and click Modify Message.
• Click Delete Message to remove a message after highlighting the row.

In this example, the screen is already configured for a RECEIVE message.

Page 34 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 35

SMS Message Configuration


Enter a bit reference in the Address field that will be set to high by the system when a valid
Notify Variable Settings SMS message associated with the variable is received from the specified Group member. I/O
name can be entered or selected in the Name field.

Message Attributes

Enter or select the group that can send an SMS message to the controller. Select the Ack
Message check box if you want to send an acknowledgement to the user that the controller has
received the message.
Messages can contain text and register data values that approved group members can read
and write into the controller's data registers at runtime. See Rules for Send and Receive
Messages.
SMS Message
Configuration • The text of the message is entered starting in the upper most left block of the text input
field (shown in green).
• In order to display register data values, click F2 = Edit Field button and configure the
Insert Value Field screen shown below:

Insert Value Field


Enter a register reference where data embedded in the received message will be stored. Select
Value Variable Settings
Register Width.
Select or enter the data type in the Display Format field. In the Decimal Position field, click the
position of the decimal point. Click the number of digits in the Number of Digits.
Example: xxxxx shows that there is no decimal and the total number of digits is 5.
Other Settings
If there had been a decimal point in the example, the decimal would have counted as one digit
and would be included as part of the total number of digits.

Click the Fill Zeroes box and the Left Justified or Right Justified box if desired.

Page 35 of 62 ECN # 956


PAGE 36 GPRS / GSM MODEM Configuration MAN4005-04-EN

Click OK, and you will be returned to the SMS Configuration screen. If satisfied with the message, click OK.

5.2.6 Outgoing Messages Settings (SEND):(Messages sent from the controller to Groups)

Note: Before creating send or receive messages, a directory needs to be created. After the directory is created, configure
the following screen:

• Click Add New Message to add a new message.


• Click Modify Message to edit a message that is already on the list. Either double-click the row or highlight the row
and click Modify Message.
• Click Delete Message to remove a message after highlighting the row.

Page 36 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 37

When Add New Message or Modify Message is clicked, the following screen appears. In this example, the screen is
already configured for a SEND message.

5.2.7 SMS Message Configuration

Page 37 of 62 ECN # 956


PAGE 38 GPRS / GSM MODEM Configuration MAN4005-04-EN

SMS Message Configuration


An event is needed to trigger a SMS communication from the controller to the member(s) of a
Group. Enter a bit reference in the Address field that (when set to HIGH) causes the SMS
Trigger Variable Settings message associated with the trigger to be sent to the specified Group member(s). The
application code should make the bit high. It will be made low by the firmware once the SMS
send request is serviced. An I/O name can be entered or selected in the Name field.
Message Attributes Enter or select the group that the SMS message is sent to.
Messages can contain text and register data values that approved group members can read
and write into the controller's data registers at runtime. See Rules for Send and Receive
Messages.
SMS Message
Configuration • The text of the message is entered starting in the upper most left block of the text
input field (shown in green).
• In order to edit/add register data values, click F2 = Edit Field button and configure
the Insert Value Field screen shown below:

5.2.8 Insert Value Field

Insert Value Field


Enter a register reference where the data embedded in the message to send will be stored. An I/O
Value Variable Settings
name can be entered or selected in the Name field. Select Register Width.
Select or enter the data type in the Display Format field. In the Decimal Position field, click the
position of the decimal point. Click the number of digits in the Number of Digits.
Example: xx.xx shows that the decimal is in the 3rd position and the total number of digits
Other Settings
(including the decimal) is 5.

Click the Fill Zeroes box and the Left Justified or Right Justified box if desired.

Page 38 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 39

Click OK, and you are returned to the SMS Configuration screen. If satisfied with the message, Click OK.

5.2.9 SMS Send Message

5.2.10 Rules for SMS Send and Receive Messages

1. Up to 160 characters can be used in each SMS Message.

2. Up to 20 data register value fields can be included in each message.

3. When the SMS Configuration dialog is closed, if a send message or receive message is found to have been
associated with a non-existing contact information group, then the user will be notified about the error and provided with
an opportunity to fix the same.

Page 39 of 62 ECN # 956


PAGE 40 GPRS / GSM MODEM Configuration MAN4005-04-EN

6 GPRS / GSM Modem Specifications

HE-GSM04 SPECIFICATIONS
Antenna Interface Female SMA.
Frequency bands EGSM 900, DCS 1800, and PCS 1900, GSM 850 capability.
GSM/GPRS features Provides for all GSM/GPRS authentication, encryption, and frequency hopping algorithms. GPRS Coding Schemes CS1-CS4
supported supported. Multi-Slot Class 10 (4RX/2TX, Max 5 Slots).
GCF Type Approval
PTCRB Type Approval
Regulatory FCC Certification (Part 24)
Agency approvals RTTE
CE (European Community Certification)
IC (Industry Canada) Approval
Mobile-originated and mobile-terminated SMS messages: up to 140 bytes or up to 160 GSM 7-bit ASCII characters.
Reception of Cell Broadcast Message
SMS Receipt acknowledgement
GSM/GPRS Circuit Switched Data (Transparent & Non-transparent up to 9.6 Kbps)
Functionality Voice (EFR, FR, HR)
Supports Unstructured Supplementary Service Data (USSD)
Multi-Slot Class 10 Supported (4Rx/2TX), (5 Slot Max)
PBCCH/PCCCH Supported.
SIM 3 V Mini-Subscriber Identity Module (SIM) compatible
Size (L x W) 82.3 mm x 34.6 mm x 3.1 mm
Weight Less than 80 grams
Operating & Storage 0°C to +60°C (Operating)
temperature -10°C to +85°C (Storage)
Relative humidity 5 - 95%
Air pressure (altitude) 70 kPa to 106 kPa (-400 m to 3000 m)
Frequency Power Class Transmit Power
1900 MHz 1-W conducted power maximum (30 dBm +/- 2 dB), measured at the
GSM Power Class 1
Transmit Power 1800 MHz antenna port
850 MHz 2-W conducted power maximum (33 dBm +/- 2 dB),
GSM Power Class 4
900 MHz measured at the antenna port
Frequency Sensitivity Mode
1900 MHz
-106 dBm (typical) GPRS Coding Scheme 1 (CS1)
Receive Power 1800 MHz
850 MHz -106 dBm (typical)
GPRS Coding Scheme 1 (CS1)
900 MHz

Page 40 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 41

7 Installation / Safety

Warning: Electrical
Shock Hazard.
When found on the product, the
following symbols specify:
Warning: Consult
user documentation.

WARNING: To avoid the risk of electric shock or burns,


always connect the safety (or earth) ground before making
any other connections.
WARNING: To reduce the risk of fire, electrical shock, or
physical injury it is strongly recommended to fuse the voltage
measurement inputs. Be sure to locate fuses as close to the
source as possible.
WARNING: Replace fuse with the same type and rating to
provide protection against risk of fire and shock hazards.
WARNING: In the event of repeated failure, do not replace
the fuse again as a repeated failure indicates a defective
condition that will not clear by replacing the fuse.
WARNING: Only qualified electrical personnel familiar with
the construction and operation of this equipment and the
hazards involved should install, adjust, operate, or service this
equipment. Read and understand this manual and other
applicable manuals in their entirety before proceeding.
Failure to observe this precaution could result in severe bodily
injury or loss of life.

‰ All applicable codes and standards need to be followed in


the installation of this product.

‰ Adhere to the following safety precautions whenever any


type of connection is made to the module:

9 ƒConnect the safety (earth) ground on the power


connector first before making any other connections.
9 ƒWhen connecting to electric circuits or pulse-initiating
equipment, open their related breakers.
9 ƒDo not make connections to live power lines.
9 ƒMake connections to the module first; then connect to
the circuit to be monitored.
9 ƒRoute power wires in a safe manner in accordance with
good practice and local codes.
9 ƒWear proper personal protective equipment including
safety glasses and insulated gloves when making
connections to power circuits.
9 ƒEnsure hands, shoes, and floor are dry before making
any connection to a power line.
9 ƒMake sure the unit is turned OFF before making
connection to terminals.
9 ƒMake sure all circuits are de-energized before making
connections.
9 ƒBefore each use, inspect all cables for breaks or cracks
in the insulation. Replace immediately if defective.

8 Technical Support

For assistance, contact Technical Support at the following locations:

EUROPE USA
Email: tech.support@hornerirl.ie, Email: techsppt@heapg.com,
Fax: +353 (0)21 4321 826 Fax: +1 317 916 4274
Tel : +353 (0)21 4321 266 Tel: +1 317 916 4297
Website : http://www.horner-apg.com Website : http://www.heapg.com

Page 41 of 62 ECN # 956


PAGE 42 GPRS / GSM MODEM Configuration MAN4005-04-EN

9 Appendix

A. SIM Card Features

GSM

• Data enabled SIM.


• Voice number can be disabled for the SIMs taken for this purpose. It will take out the possibility of any disconnection if
someone tries to dial the voice number.

GPRS

• GPRS enabled static SIM / semi-static SIM with VPN connectivity.


• Voice number can be disabled for the SIMs taken for this purpose. It will take out the possibility of any disconnection if
someone tries to dial the voice number.

Page 42 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 43

B. AT Command Set

1. ATD Dial command

Command Function This command is used to setup an outbound voice or data call.
Command Functional Call Control
Group
Command Format Query N/A
Response N/A
Write Format N/A
Response N/A
Read Format N/A
Response N/A
Execution Format ATD1234567I;
Response NO DIALTONE or
NO CARRIER or
CONNECT <value> or
BUSY or
OK
Parameter Values
<n> V.25ter Dialing Digits = 0 – 9, *, #, +, A, B, C
V.25ter Dialing Modifiers = , (comma), T, P, !, @, W
<cmod> GSM Modifier Characters
I = Restrict CLI, i = Allow CLI
<;> Semicolon after dialing string or modifier indicates voice call and forces TA into command
mode after successful completion.
Modem Responses
NO DIALTONE if no dial tone is detected
NO CARRIER
if call cannot be set up
CONNECT <value>
when connected in a non-voice call (data mode) <value> dependent on ATX setting
BUSY
if dialed number is busy
OK
when successful voice call or TA ends current call and returns to command mode

Example:

ATD5551212I

The TA will dial the number 5551212 and will block the CLI when made.

Page 43 of 62 ECN # 956


PAGE 44 GPRS / GSM MODEM Configuration MAN4005-04-EN

2. AT+CBST Select Bearer service type

AT+CBST Select Bearer service type


Command Function This command is used to select the bearer service with data rate and the connection
element to be used when data calls are originated.
Command Functional Call Control
Group
Command Format Query AT+CBST=?
Response +CBST: (0-7, 12, 14, 65, 66, 68, 70, 71,75),
(0-1), (0-3)
Write Format AT+CBST=<baud rate>,<name>,<ce>
Response OK/ERROR
Read Format AT+CBST?
Response +CBST: 7,0,1
Execution Format N/A
Response N/A
Parameter Values
<baud rate> 0 Autobauding (automatic selection of the speed; this setting is possible in case
of 3.1 kHz modem and non-transparent service)
1 300 bps (V.21)
2 1200 bps (V.22)
3 1200/75 bps (V.23)
4 2400 bps (V.22bis)
5 2400 bps (V.26ter)
6 4800 bps (V.32)
7 9600 bps (V.32)
12 9600 bps (V.34)
14 14400 bps (V.32)
65 300 bps (V.110)
66 1200 bps (V.110)
68 2400 bps (V.110 or X.31 flag stuffing)
70 4800 bps (V.110 or X.31 flag stuffing)
71 9600 bps (V.110 or X.31 flag stuffing)
75 14400 bps (V.110 or X.31 flag stuffing)

<name> 0 none
<ce> 0 transparent
1 non-transparent
2 both, transparent preferred
3 both, non-transparent preferred
Example

Page 44 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 45

3. AT+CREG Network Registration Info

Command Function Write command controls the presentation of an unsolicited result code +CREG: <stat>.
Read command returns the status of result code, which shows whether the network has
currently indicated the registration of the ME.
Command Functional Network Information
Group
Command Format Query AT+CREG=?
Response +CREG: (0,2)
OK
Write Format AT+CREG=[<n>]
Response OK
Read Format AT+CREG?
Response +CREG: <n>,<stat>[,<lac>,<ci>]
OK
Execution Format N/A
Response N/A
Parameter Values
<n> 0 disable network registration unsolicited result code

1 enable network registration unsolicited result code +CREG: <stat>


enable network registration and location information unsolicited result code
2 +CREG: <stat>[,<lac>,<ci>]

<stat> 0 not registered, ME is not currently searching a new operator to register to

1 registered, home network

2 not registered, but ME is currently searching a new operator to register to

3 registration denied

4 unknown

5 registered, roaming

<lac> string type; two-byte location area code in hexadecimal format (e.g. "00C3" equals 195
in decimal)

<ci> string type; two-byte cell ID in hexadecimal format

4. AT+COPS Operator Selection

AT+COPS Operator Selection


Command Function Write command forces an attempt to select and register the GSM network operator.
<mode> is used to select whether the selection is done automatically by the ME or
is forced by this command to operator <oper> (it shall be given in format
<format>). If the selected operator is not available, no other operator shall be
selected (except <mode> = 4). The selected operator name format shall apply to
further read commands (+COPS?) also. <mode>=2 forces an attempt to deregister
from the network. The selected mode affects to all further registration (e.g. after
<mode>=2, ME shall be unregistered until <mode>=0 or 1 is selected).
Read command returns the current mode and the currently selected operator. If no
operator is selected, <format> and <oper> are omitted.
Test command returns a list of quadruplets, each representing an operator present
in the network. Quadruplet consists of an integer indicating the availability of the

Page 45 of 62 ECN # 956


PAGE 46 GPRS / GSM MODEM Configuration MAN4005-04-EN

operator <stat>, long and short alphanumeric format of the name of the operator,
and numeric format representation of the operator. Any of the formats may be
unavailable and will then be an empty field (,,). The list of operators comes in the
following order: Home network, networks referenced in SIM, and other networks.
Command Functional Network Information
Group
Command Format Query AT+COPS=?
Response +COPS: (2, “ “, “ “, “31022”), (3, “ “, “ “, “310380”)
OK
Write Format AT+COPS=<mode>
Response [, <format> [, oper>]]
OK or
+CME ERROR: <err>
Read Format AT+COPS?
Response +COPS: 0
OK
Execution Format N/A
Response N/A
Parameter Values

0 automatic (<oper> field is ignored)

1 manual (<oper> field shall be present)

2 deregister from network

set only <format> (for read command +COPS?), do not attempt


3 registration/deregistration (<oper> field is ignored); this value is not applicable
in read command response
manual/automatic (<oper> field shall be present); if manual selection fails,
4
automatic mode (<mode=0) is entered

0 long format alphanumeric <oper>

<format> 1 short format alphanumeric <oper>

2 numeric <oper>; GSM Location Area Identification Number

<oper> operator in format as in per <format>


<stat> 0 Unknown
1 Available

2 Current
3 Forbidden
Example:
To manually register the modem on a known PLMN: To read operator information:

Page 46 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 47

5. AT+CPIN Enter PIN

AT+CPIN Enter PIN


Command Function Set command sends to the ME a password that is necessary before it can be operated
(SIM PIN, SIM PUK, PH-SIM PIN, etc.). If no PIN request is pending, no action is taken
towards ME and an error message, +CME ERROR, is returned to TE. If the PIN
required is SIM PUK or SIM PUK2, the second pin is required. This second pin,
<newpin>, issued to replace the old pin in the SIM.
Command Functional Phone Control
Group
Command Format Query AT+CPIN=?
Response OK
Write Format AT+CPIN=<”pin”>,[<”newpin”>]
Response
Read Format AT+CPIN?
Response +CPIN: <code>
OK
or
+CME ERROR: <err>
Execution Format N/A
Response N/A
Parameter Values
<code> READY ME is not pending for any password
SIM PIN ME is waiting SIM PIN to be given
SIM PUK ME is waiting SIM PUK to be given
PH-SIM PIN ME is waiting phone-to-SIM card password to be given
PH-FSIM PIN ME is waiting phone-to-very first SIM card password to be given

PH-FSIM PUK ME is waiting phone-to-very first SIM card unblocking


password to be given

SIM PIN2 ME is waiting SIM PIN2 to be given (this <code> is recommended to be


returned only when the last executed command resulted in PIN2 authentication failure
(i.e. +CME ERROR: 17); if PIN2 is not entered right after the failure, it is recommended
that ME does not block its operation)

SIM PUK2 ME is waiting SIM PUK2 to be given (this <code> is recommended to be


returned only when the last executed command resulted in PUK2 authentication failure
(i.e. +CME ERROR: 18); if PUK2 and new PIN2 are not entered right after the failure, it
is recommended that ME does not block its operation)
PH-NET PIN ME is waiting network personalization password to be given

PH-NET PUK ME is waiting network personalization unblocking password to be given


PH-NETSUB PIN ME is waiting network subset personalization password to be given

PH-NETSUB PUK ME is waiting network subset personalization unblocking password


to be given

PH-SP PIN ME is waiting service provider personalization password to be given


PH-SP PUK ME is waiting service provider personalization unblocking password to be
given

PH-CORP PIN ME is waiting corporate personalization password to be given

PH-CORP PUK ME is waiting corporate personalization unblocking password to be


given

Page 47 of 62 ECN # 956


PAGE 48 GPRS / GSM MODEM Configuration MAN4005-04-EN

6. AT+CSQ Signal Quality and Bit Error Rate

AT+CSQ Signal Quality and Bit Error Rate


Command Function Execution command returns received signal strength indication <rssi> and channel bit
error rate <ber> from the ME.
Command Functional Group Phone Control

Command Format Query AT+CSQ=?


Response +CSQ: (2-31,99),(99)
OK
Write Format N/A
Response N/A
Read Format N/A
Response N/A
Execution Format AT+CSQ
Response +CSQ: <rssi>, <ber>
OK
Parameter Values
<rssi> 0 -113 dBm or less
1 -111 dBm
2-30 -109... -53 dBm
31 -51 dBm or greater
99 not known or not detectable
<ber> (in percent) 0-7 as RXQUAL values in the table in GSM 05.08 [20] subclause 8.2.4
99 not known or not detectable

7. AT+CMGF SMS Format

AT+CMGF SMS Format


Command Function Set command tells the TA, which input and output format of messages to use.
<mode> indicates the format of messages used with send, list, read and write
commands and unsolicited result codes resulting from received messages.
Mode can be either PDU mode (entire TP data units used) or text mode
(headers and body of the messages given as separate parameters).
Command Functional Short Message Services
Group
Command Format Query AT+CMGF=?
Response AT+CMGF: (0,1)
OK
Write Format AT+CMGF=<mode>
Response OK
Read Format AT+CMGF?
Response +CMGF: 1
OK
Execution Format N/A
Response N/A
Parameter Values
<mode> 0 PDU mode

1 Text mode
Notes Use of PDU mode requires an in depth understanding of PDU message and
header formats.

Page 48 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 49

8. AT+CSCA Service Center Address - Message Configuration Commands

AT+CSCA Service Center Address


Command Function Set command updates the SMSC address, through which mobile originated SMs
are transmitted.
Command Functional Group Short Message Services
Command Format Query AT+CSCA=?
Response OK
Write Format AT+CSCA=<”sca”>,<tosca>
Response +CSCA: <”sca”>,<tosca>
OK
Read Format AT+CSCA?
Response +CSCA=”12063130004”, 145
OK
Execution Format N/A
Response N/A
Parameter Values
<”sca”> SMSC Address
<tosca> SC address Type-of-Address
Notes The service center address must be present to complete delivery of SMS. Most
SIMs are delivered from the service provider with a service center already
programmed into the SIM. A “+” should be entered in front of the sms address,
but is not required by all operators.

9. AT+CSMP Set Text Mode Parameters

AT+CSMP Set Text Mode Parameters


Command Function Selects additional values needed when the SIM is sent to the network or placed
in storage.
Command Functional Group Short Message Services
Command Format Query AT+CSMP=?
Response OK
Write Format AT+CSMP=<fo>,<vp>,<pid>,<dcs>
Response OK
Read Format AT+CSMP?
Response +CSMP: 17, 167, 0, 0
OK
Execution Format N/A
Response N/A
Parameter Values
<fo> depending on the command or result code:
first octet of GSM 03.40 SMS- DELIVER, SMS-SUBMIT (default 17), or SMS-
COMMAND (de-fault 2) in integer format
<vp> depending on SMS-SUBMIT <fo> setting:
GSM 03.40 TP-Validity-Period either in integer format (default 167) ), in time-
string format (refer <dt>), or if is supported, in enhanced format (hexadecimal
coded string with quotes)
<pid> Protocol-Identifier in integer format (default 0), refer GSM 03.40
<dcs> SMS Data Coding Scheme (default 0), or Cell Broadcast Data Coding Scheme in
integer format depending on the command or result code: GSM 03.38

Page 49 of 62 ECN # 956


PAGE 50 GPRS / GSM MODEM Configuration MAN4005-04-EN

10. AT+CNMI New Message Indication to TE - Message Receiving and Reading Commands

2.5.3.1. AT+CNMI New Message Indication to TE


Command Function Selects how incoming messages from the network are indicated to the TE when
the TE is active.
Command Functional Group Short Message Services
Command Format Query AT+CNMI=?
Response +CNMI: (0-2), (0-3), (0,2), (0,1), (0,1)
OK
Write Format AT+CNMI=<mode>, <mt>,
Response <bm>,<ds>,<bfr>
OK
Read Format AT+CNMI?
Response +CNMI: 1,1,0,0,0
OK
Execution Format N/A
Response N/A
Parameter Values
<mode> 0 Buffer unsolicited result codes in the TA
1 Discard indication and reject new received message unsolicited result
codes when TA-TE link is reserved
2 Buffer unsolicited result codes in the TA when TA-TE link is reserved
and flush them to the TE after reservation
<mt> Receiving procedure for different message data coding schemes
(refer GSM 03.38 [2])
0
no class: as in GSM 03.38, but use <mem3> as preferred memory
class 0: as in GSM 03.38, but use <mem3> as preferred memory if message is tried to be stored
class 1: as in GSM 03.38, but use <mem3> as preferred memory
class 2: as in GSM 03.38
class 3: as in GSM 03.38, but use <mem3> as preferred memory message waiting indication group (discard message): as in GSM
03.38, but use <mem3> as preferred memory if message is tried to be stored message waiting indication group (store message): as in
GSM 03.38, but use <mem3> as preferred memory
1 as <mt>=0 but send indication if message stored successfully
2 no class: route message to TE
class 0: as in GSM 03.38, but also route message to TE and do not try to store it in memory
class 1: route message to TE
class 2: as <mt>=1
class 3: route message to TE message waiting indication group (discard message): as in GSM 03.38, but also route message to TE and do
not try to store it in memory message waiting indication group (store message): as <mt>=1
3 class 3: route message to TE
others: as <mt>=1
0 No CBM indications are routed to the TE
<bm>
1 If CBM is stored into ME/TA, indication of the memory location is routed to
the TE using unsolicited result code: +CBMI: <mem>,<index>
2 New CBMs are routed directly to the TE using unsolicited result code
3 Class 3 CBMs are routed directly to TE using unsolicited result codes
defined in <bm>=2. If CBM storage is supported, messages of other
classes result in indication as defined in <bm>=1
<ds> 0 No SMS-STATUS_REPORTs are routed to the TE
1 SMS-STATUS-REPORTs are routed to the TE using unsolicited result
code

<bfr> TA buffer of unsolicited result codes defined within this command is


0
flushed to the TE when <mode> 1...2 is entered.
TA buffer of unsolicited result codes defined within this command is
1 cleared when <mode> 1...2 is entered.

Page 50 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 51

11. AT+CMGL List Messages

AT+CMGL List Messages


Command Function List messages from storage.
Command Functional Group Short Message Services
Command Format Query AT+CMGL=?
Response +CMGL: (“REC UNREAD”,”REC
READ”,”STO UNSENT”,”STO
SENT”,”ALL”)
OK
N/A
Write Format N/A
Response
Read Format N/A
Response N/A
Execution Format AT+CMGL =<stat>
Response +CMGL: <index>, <stat>, <da/oa>,
[<alpha>, <scts>, <tooa/toda>, <length>]
<CR><LF> data
OK
Parameter Values See Notes
<index> Memory location integer
<stat> Status of message
“REC UNREAD”
“REC READ”
“STO UNREAD”
“STO READ”
“ALL”
<do/oa> destination address

<alpha> alphanumeric representation of <da> or <oa> corresponding to the entry found in


MT phonebook
<scts> Service center time stamp
<tooa/toda> Address Type-of-Address octet in integer format
<length> Length of message in octets

Notes Above settings for <stat> assume


AT+CMGF=1 (text mode). For
AT+CMGF=0 (PDU mode), the following
<stat> values are supported: 0,1,2,3,4.
Parameters in [] may or may not be reported dependent upon the setting
of AT+CMGF.
0 “Rec Unread”
1 “Rec Read”
2 “Sto Unsent”
3 “Sto Sent”

4 “ALL”

Page 51 of 62 ECN # 956


PAGE 52 GPRS / GSM MODEM Configuration MAN4005-04-EN

12. AT+CMGR Read Message

AT+CMGR Read Message


Command Function Read stored messages.

Command Functional Group Short Message Services

Command Format Query N/A


Response N/A

Write Format N/A


Response N/A
Read Format N/A
Response N/A
Execution Format AT+CMGR=<index>
Response +CMGR: <stat>, <oa>, <scts>, [<tooa>,
<fo>, <pid>, <sca>, <tosca>,
<length>]<CR><LF><data>
OK
Parameter Values
<stat> Status of message (Rec Read, Rec
Unread, Sto Unsent, Sto Sent)

<oa> Originating address


<scts> Service center time stamp
<tooa> Originating address – type of address
<fo> First octet
<pid> Protocol identifier
<sca> Service center address
<tosca> Type of address

<length> Length of message in octets


The above parameters are for text mode.
Notes

13. AT+CMGS Send Message - Message Sending and Writing Commands


AT+CMGS Send Message
Command Function Sends message from the TE to the network.
Command Functional Group Short Message Services
Command Format Query N/A
Response N/A
Write Format N/A
Response N/A
Read Format N/A
Response N/A
Execution Format AT+CMGS=”<da>”,[<toda>]
Response Enter text <cntl Z>
+CMGS <mr>
OK
Parameter Values
<da> Destination address
<mr> Message reference
Notes The example provided is for text mode (AT+CMGF=1). An in depth
understanding of PDU messages is required for PDU mode.

Page 52 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 53

14. AT+CMGD Delete Message

2.5.4.4. AT+CMGD Delete Message


Command Function Deletes message from preferred storage location.
Command Functional Short Message Services
Group
Command Format Query N/A
Response N/A
Write Format N/A
Response N/A
Read Format N/A
Response N/A
Execution Format AT+CMGD=<index>
Response OK
Parameter Values
<index> Integer value of memory location.
Notes If there is no message stored in the selected index, an error will be returned.

15. +CGDCONT Define PDP Context

+CGDCONT Define PDP Context


Command Function Specifies PDP context parameter values for a PDP context identified by the (local)
context identification parameter, <cid>.
Command Functional Group GPRS Commands
Command Format Query AT+CGDCONT=?
Response +CGDCONT: (1-2),”IP”,,,(0,1),(0,1)
OK
Write Format AT+CGDCONT=<cid>,<PDP_ Type>,
<APN>,<PDP_ADDR>,<d_comp>, <h_comp>
Response
OK
Read Format AT+CGDCONT?
+CGDCONT: <cid>,<PDP
Response
Type>,<”APN”>,<”PDP_ADDR”>,
<d_comp>,<h_comp>
OK
Execution Format N/A
Response N/A

Parameter Values
<cid> PDP Context Identifier
<PDP_type> “IP”
<”APN”> “Access Point Name”
<”PDP_addr”> ” Identifies the MT in the address space”
<d_comp> 0 off
1 on
<h_comp> 0 off
1 on
Notes AT+CGDCONT must be entered before Context activation.
AT+CGDCONT=1,”IP”,””,””,0,0 may be entered for networks that dynamically assign
the APN. Contact your service provider for correct APN information.

Page 53 of 62 ECN # 956


PAGE 54 GPRS / GSM MODEM Configuration MAN4005-04-EN

16. $UDPAPI Modem API Address - UDP API Commands

$UDPAPI Modem API Address


Command Function This command allows the user to query/set the API IP address and port number. Any
UDP packet received from a local host and addressed to the modem API IP and port
will be intercepted and processed as a modem API request. Any UDP packet
received from a remote server and addressed to the modem API port will be
intercepted and processed as a modem API request.
Command Functional Group Enfora Specific
Command Format Query AT$UDPAPI=?
Response $UDPAPI: "(0-255).(0-255).(0-255).(0-
255)",(0-65535)
OK
Write Format AT$UDPAPI=”<API IP>”,<API port>
Response OK
Read Format AT$UDPAPI?
Response $UDPAPI: "<APIIP>", <API port>
Execution Format N/A
Response N/A
Parameter Values
<API IP> IP address for local API access
<API port > Udp port number for local and remote API access

17. PAD Commands

$PADDST PAD Destination IP/Port


Command Function This command allows the user to query/set the PAD destination IP and port address.
Command Functional Enfora Specific
Group
Command Format Query AT$PADDST=?
Response $PADDST: "(0-255),(0-255),(0-255),(0-255)",(0-65535)
OK
Write Format AT$PADDST =”<PAD destination
Response IP>”,<PAD destination port>
OK
Read Format AT$PADDST?
Response $PADDST: =”<PAD destination
IP>”,<PAD destination port>
Execution Format N/A
Response N/A
Parameter Values
<PAD destination IP > Destination IP for PAD data. PAD data is sent to and received from this IP. A
destination IP address of 0 will allow PAD access from any IP destination, and will
cause all locally generated PAD data to be sent to the IP address associated with
the last remotely received PAD data.
<PAD destination port > Destination port for PAD data. PAD data is sent to and received from this port. A
destination port of 0 will allow PAD access from any port, and will cause all locally
generated PAD data to be sent to the port associated with the last remotely received
PAD data.
Notes A value of 0 will allow any IP/port access to the TCP PAD. If populated and in
passive, server mode (AT$ACTIVE=0) the TCP PAD will limit access to the IP/port
defined.

Page 54 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 55

18. $PADSRC PAD Source Port

$PADSRC PAD Source Port


Command Function This command allows the user to query/set the API PAD source port. Remote data
received from a valid destination address to this source port will be processed as
incoming PAD data. This port is also used as the source port for all data sent to the
PAD destination. This value must be different than the UDPAPI port.
Command Functional Enfora Specific
Group
Command Format Query AT$PADSRC=?
Response $PADSRC: (0-65535)
OK
Write Format AT$PADSRC = <PAD source port>
Response OK
Read Format AT$PADSRC?
Response $PADSRC: <PAD source port>
Execution Format N/A
Response N/A
Parameter Values
<PAD source port > PAD source port is used as the source port in all outgoing PAD data messages. The
remote host must use this port number as the destination port for PAD data sent to
the device.

19. $ACTIVE TCP PAD State

$ACTIVE TCP PAD State


Command Function This command determines the active or passive state of the TCP PAD connection.
Command Functional Group Enfora Specific
Command Format Query AT$ACTIVE=?
Response $ACTIVE: (0-1)
OK
Write Format AT$ACTIVE =<state >
Response OK
Read Format AT$ACTIVE?
Response $ACTIVE: <state>
Execution Format N/A
Response N/A
Parameter Values
<state> 0 TCP PAD passive/server mode

1 TCP PAD active/client mode


Notes If passive is chosen, the PAD will be in server mode and listen for inbound TCP
connection requests. If active is chosen, the PAD will be in client mode and will
initiate a connection based on the ATDT command, or if atd*99# is used to initiate
a GPRS connection, the values populated in AT$PADDST. A value of 0 indicates
passive, server mode of operation. A value of 1 indicates active, client mode of
operation. ATDT will be used to initiate the passive, server mode functionality. If
ATDTxxx.xxx.xxx.xxx/xxxx is used, it will override the passive mode and replace
the AT$PADDST parameters as it does in UDP PAD mode.

Page 55 of 62 ECN # 956


PAGE 56 GPRS / GSM MODEM Configuration MAN4005-04-EN

20. $PADBLK PAD Block Size

$PADBLK PAD Block Size


Command Function This command allows the user to query/set the PAD block size.
Command Functional Enfora Specific
Group
Command Format Query AT$PADBLK=?
Response PADBLK: (3-512)
OK
Write Format AT$PADBLK =<block size >
Response OK
Read Format AT$PADBLK?
Response $PADBLK: <block size>
Execution Format N/A
Response N/A
Parameter Values
<block size >
PAD data will be created at the requested
PAD block size (number of bytes) unless an enabled forward character or PAD
timeout forces the data to be sent out at a smaller block size. Block size does
NOT include the IP or TCP/UDP header size.

21. $PADFWD PAD Forward Character

$PADFWD PAD Forward Character


Command Function This command allows the user to query/set the PAD forward character. If PAD
forward is enabled via AT$PADCMD, receipt of this character will immediately
forward all currently buffered PAD data.
Command Functional Enfora Specific
Group
Command Format Query AT$PADFWD =?
Response $PADFWD: (0-ff)
OK
Write Format AT$PADFWD =<forward character>
Response
OK
Read Format AT$PADFWD?
Response $PADFWD: <forward character>
Execution Format N/A
Response N/A
Parameter Values
<backspace character > Hex representation of user selected forward character. Default forward character
is 0D (Carriage return).

Page 56 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 57

22. $PADTO PAD Timeout Value

$PADTO PAD Timeout Value


Command Function This command allows the user to query/set the PAD timeout value. Data will be
forwarded to the PAD destination even if the PAD block size has not been
reached if <pad timeout> period has elapsed since the last PAD character was
received from the local host.
Command Functional Enfora Specific
Group
Command Format Query AT$PADTO
Response $PADTO: (0-65535)
OK
Write Format AT$PADTO = <PAD timeout>
Response
OK
Read Format AT$PADTO
Response
$PADTO: <PAD timeout>
Execution Format N/A
Response
N/A
Parameter Values
<PAD timeout> The number of tenths of seconds to wait for the receipt of more PAD data before
forwarding the currently accumulated PAD buffer to the PAD destination. A value
of zero disables the PAD timeout feature. If the PAD timeout feature is disabled,
no data will be forwarded to the destination until either an enabled forward
character is received, or the selected PAD buffer size is reached. (50 = 5
seconds)

23. DP Dial Command for UDP PAD

DP Dial Command for UDP PAD


Command Function This command is used to invoke the UDP PAD via a dial command.
Command Functional Group Enfora Specific
Command Format Query N/A
Response N/A
Write Format atdp<IP_ADDRESS>/
Response <UDP Port Number>
Connect
Read Format N/A
Response N/A
Execution Format N/A
Response N/A
Parameter Values
<IP_ADDRESS> IP Address of the destination host.
<UDP Port Number> UDP Port number. If no UDP port number is required, a value zero (0) should be
specified here.
Notes This command will override the AT$PADDST settings for the current connected
session.
Example: atdp123.456.789.1/0
atdp123.456.789.2/3000

Page 57 of 62 ECN # 956


PAGE 58 GPRS / GSM MODEM Configuration MAN4005-04-EN

24. DT Dial Command for TCP PAD

DT Dial Command for TCP PAD


Command Function This command is used to invoke the TCP PAD via a dial command.
Command Functional Group Enfora Specific
Command Format Query N/A
Response N/A
Write Format atdt <IP_ADDRESS> / <TCP Port Number>
Response
Connect
Read Format N/A
Response N/A
Execution Format N/A
Response N/A
Parameter Values
<IP_ADDRESS> IP Address of the destination host.
<TCP Port Number> TCP Port number. If no TCP port number is required, a value zero (0) should be
specified here.
Notes This command will override the AT$PADDST settings for the current connected
session.
Example: atdt123.456.789.1/0
atdt123.456.789.2/3000

Page 58 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 59

25. %CGPCO Set Type of Authentication, Username and Password

%CGPCO Set Type of Authentication, Username


and Password
Command Function This command sets the type of Authentication, username and password for
GPRS context activation.
Command Functional Enfora Specific
Group
Command Format Query AT%CGPCO=?
Response %CGPCO: 0,(0-251),(1-2)
OK
Write Format AT%CGPCO=<Input format>,
Response “<Authentication data>”,
<cid>
OK
Read Format AT%CGPCO?
Response CGPCO: 0,"<PCO Hex string>",1
CGPCO: 0,"<PCO Hex string>",2
OK
AT%CGPCO?
CGPCO: 1,"<Username,Password>",1
CGPCO: 1,"<Username,Password>",2
OK
Execution Format N/A
Response N/A
Parameter Values
<Input format> 0 - Inputs specified in Hexadecimal
1 - Inputs specified in ASCII

<Authentication data> Authentication data (ASCII) <username>,<password> where


Username: Maximum 64 bytes ASCII string.
Password: Maximum 64 bytes ASCII string.
Authentication data (Hexadecimal):
Protocol Configuration Option specified in Hex value; maximum size is equal
to 251 bytes.
0 – The new username and password is to be applied to all context Activation.
<cid>
1 – The new username and password is to be applied to Context identifier 1.
2 – The new username and password is to be applied to Context identifier 2.
Notes If %CGPCO is set with the input format of 0 (hexadecimal), then the setting of
AT%CGPPP will be ignored.
Username and Password are case sensitive.
%CGPCO Set Type of Authentication, Username and Password (continued)
Example:
Example of ASCII input parameters:
AT%CGPCO=1, “username, password”, 1
AT%CGPCO?
CGPCO: 1,"username,password",1
(PAP:80C023160101001608757365726E616D65087061737 776F726480211001010010810600000000830600000000)
Example of Hex input parameters:

AT%CGPCO=0, “80C023160101001608757365726E616D650870617373
776F726480211001010010810600000000830600000000”, 1

Page 59 of 62 ECN # 956


PAGE 60 GPRS / GSM MODEM Configuration MAN4005-04-EN

26. $AREG Auto Registration

$AREG Auto Registration


Command Function This command sets the auto registration state of the modem
Command Functional Enfora specific
Group
Command Format Query AT$AREG=?
Response $AREG: (0,2)
OK
Write Format AT$AREG=<state>
Response OK
AT$AREG?
Read Format $AREG: <state>
Response OK
Execution Format N/A
Response N/A
Parameter Values
<state> 0 Autoreg off
1 Autoreg on
2 Auto GPRS Activation on Power up. (for $hostif=1 and 2, MT will perform
GPRS activation and go into PAD data mode. For Hostif=0 and 3, MT will
perform GPRS activation, but remain in AT command mode)
This command sets GMS registration state.
Notes When set to 1, upon power on, the modem will automatically register on the GSM
network. To set the modem to automatically attach to the GPRS network on power
on, see AT%CGAATT command.
AT+CGDCONT must be entered and saved before MT is placed in AREG=2.
* If PIN is enabled, the modem will not complete the auto registration process
until after the PIN has been entered (AT+CPIN).

27. $HOSTIF Configure Host to Modem Interface

$HOSTIF Configure Host to Modem Interface


Command Function This command allows the user to configure the desired Host to Modem interface.
This parameter determines the behavior of the ATD command.
Command Functional Enfora Specific
Group
Command Format Query AT$HOSTIF=?
Response (0-3)
Write Format AT$HOSTIF=<host interface>
Response OK
Read Format AT$HOSTIF=?
Response HOSTIF: <host interface>
Execution Format N/A
Response N/A
Parameter Values
<host interface>
0 = Establish normal external Dial up networking modem to network connection.

1 = Establish UDP PAD session. Upon establishment of a network activation, a


CONNECT message will be displayed. “No Carrier” or error will indicate failed or
terminated UDP PAD session.
2 = Establish TCP PAD session Upon establishment of a network activation, a
CONNECT message for at$active=1, or a LISTEN message for at$active=0 will
be displayed. “No Carrier” or error will indicate failed or terminated TCP PAD
session.
3 = Establish non-GPRS PPP connection.

Page 60 of 62 ECN # 956


MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 61

INDEX

A H
ABOUT PROGRAMMING EXAMPLES ................................ 2 Handshake ..........................................................................34
Add Contact....................................................................... 35 HE-GSM04A..........................................................................5
Additional SMS Settings .................................................. 33
Advantages of using SMS................................................ 28
ATE command Failed ....................................................... 31 I
Auto Answer modem Option ........................................... 24
Idle State Timeout..............................................................21
Auto Dial modem Option.................................................. 23
Incoming Messages Settings ..............................................37
Initialization Status Register Settings .............................33
C Initialize modem Option ....................................................25
Insert Value Field.........................................................38, 41
Cell phone........................................................................... 28 Installation / Safety ..............................................................44
Center Number ................................................................... 31 INSTALLATION PROCEDURE .............................................5
CMGF Command Failed ..................................................... 31 Internal Modem Initialization ............................................33
CNMI Command Failed ...................................................... 31
COM Port Configuration Settings.................................... 34
COM Port Settings .............................................................. 34 K
Command Interval............................................................... 32
KEPServerEX ............................................................2, 15, 17
communication operation ladder blocks................................ 7
Configuration Parameters................................................ 31
Configure Sever/Client IP address...................................... 13 L
Configuring KEPServerEX for Data Exchange ................... 15
Connectivity with Cscape................................................ 7, 13 LIMITED WARRANTY AND LIMITATION OF LIABILITY....2
COPS Command Failed.................................................... 31
CPEE command Failed..................................................... 31
CPIN Command Failed ....................................................... 31 M
CREG Command Failed ..................................................... 31 Message Attributes..............................................................38
CSCA service center number command Failed................. 31 Message Buffer Register Settings ...................................31
CSQ Command Failed ...................................................... 31 Mobile Communications ......................................................28
Modbus...................................................................16, 17, 22
D Modem Command succeeded.............................................26
Modem command syntax error............................................26
Data Bits ............................................................................. 34 Modem Control Block ..........................................................23
data transfer........................................................................ 28 Modem detected no/lost carrier ...........................................26
Data Transfer Example...................................................... 28 Modem in Listen (Server) Mode ..........................................26
Data Transmission Settings ...................................... 7, 21, 26 Modem Initialization Settings...............................................33
Delete Contact ............................................................. 35, 36 Modem is connected ...........................................................26
Device ID ............................................................................ 18 Modem is inactive................................................................26
Modem is not responding ....................................................26
Modem is Ringing................................................................26
E Modem Status Register value definitions ......................26, 27
Modify Contact.............................................................35, 36
Edit submenu ...................................................................... 17
Enable Diagnostics ............................................................. 16
Enable SMS Configuration........................................... 7, 21 N
Ethernet ........................................................................ 13, 16
New Contact Information ...............................................35, 36
New Device ...................................................................17, 18
G New Tag..............................................................................19
No Initialization (Modem Preconfigured).........................33
GPRS (General Packet Radio Service) Functionality ......... 10
GPRS / GSM Modem Specifications .................................. 43
GPRS Configuration ..................................................... 10, 12 O
GPRS connectivity ................................................................ 5
GPRS latency ..................................................................... 13 OPC Quick Client...............................................................20
GPRS network .................................................................... 10 Open Port ............................................................................22
Group Name ....................................................................... 36 Outgoing Messages Settings ..............................................39
GSM Configuration ............................................................... 6 Overview..............................................................................28
GSM connectivity .................................................................. 5
GSM Functionality................................................................. 5
GSM Modem ......................................................................... 5 P
GSM Modem Settings – SMS Configuration....................... 30 Parity ...................................................................................34
GSM/GPRS/SMS Configuration window .................... 6, 9, 13 Peer to peer communication .................................................6
Phone Number ....................................................................36
Program and GSM /GPRS Config.......................................6
Protocol ..............................................................................22

Page 61 of 62 ECN # 956


PAGE 62 GPRS / GSM MODEM Configuration MAN4005-04-EN

R Status Bits for Siemens Modems & Internal Modem .....31


Status Bits for User Specific Initialization ......................31
Register Value .............................................................. 14, 26 Status Register Settings ...................................................30
Rules for SMS Send and Receive Messages ..................... 42 status values........................................................................13
Stop Bits ..............................................................................34

S
T
Select Baud Rate ................................................................ 34
Send / Receive SMS....................................................... 9, 21 Tag Properties .....................................................................19
Short Message Service....................................................... 28 TCP/IP .................................................................................18
Siemens TC Modem Initialization .................................... 33 Technical Support................................................................44
sim card .............................................................................. 18 Trigger Variable Settings .....................................................38
SIM Pin Code...................................................................... 32
SMS configuration................................... 9, 21, 26, 28, 29, 36
SMS Configuration.............................................................. 29
U
SMS Configuration Parameters ....................................... 31 User Initialization Script....................................................33
SMS functionality is Active.................................................. 26 User Specific Modem Initialization Script.................................... 33
SMS Message Buffer Register Settings.......................... 31 Using SMS Communications with Horner Controllers ............... 28
SMS Message Configuration ..................................... 38, 40
SMS Security Measures ................................................... 28
SMS Status Bits ................................................................ 30 V
SMS Target Directory Settings ........................................... 35
Value Variable Settings .......................................................41
Status Bits ......................................................................... 30

Page 62 of 62 ECN # 956

You might also like