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.
MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 3 Table of Contents GSM Modem ................................................................................................................................................ 5 1 2 3 4 GSM Functionality ............................................................................................................................... 5 1.1 GSM Configuration......................................................................................................
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.
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 HEGSM04A and then connect the antenna to the modem. INSTALLATION PROCEDURE 1.
PAGE 6 1.1 GPRS / GSM MODEM Configuration MAN4005-04-EN GSM Configuration 1.1.1 Page 6 of 62 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.
MAN4005-04-EN 1.1.2 GPRS / GSM MODEM Configuration • 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.
PAGE 8 GPRS / GSM MODEM Configuration MAN4005-04-EN • • Install a modem in the PC • Select the installed modem and enter GSM data no. of the SIM connected to the device and press OK. Open the Add Target dialog by selecting Tools| Editor Options | Communications Port and then click from the Main Menu. 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.
MAN4005-04-EN 2 GPRS / GSM MODEM Configuration PAGE 9 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.
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.
MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 11 GPRS Configuration GPRS Access Point 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. 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).
PAGE 12 2.2 GPRS / GSM MODEM Configuration MAN4005-04-EN Connectivity with Cscape • • • GPRS configuration must be downloaded into the OCS. • • Select the default programming port as GPRS in the System Menu. • 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.
MAN4005-04-EN 2.3 GPRS / GSM MODEM Configuration PAGE 13 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.
PAGE 14 GPRS / GSM MODEM Configuration • 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.
MAN4005-04-EN GPRS / GSM MODEM Configuration • Add a new device by selecting New Device from the Edit submenu in KEPServerEX. • After naming, choose Modbus from the Device Model menu.
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.
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 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.
MAN4005-04-EN 2.4 GPRS / GSM MODEM Configuration PAGE 19 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.
PAGE 20 4 GPRS / GSM MODEM Configuration MAN4005-04-EN 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.
MAN4005-04-EN 4.2 GPRS / GSM MODEM Configuration PAGE 21 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.
PAGE 22 GPRS / GSM MODEM Configuration • Auto Answer modem Option • GSM data call MAN4005-04-EN 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.
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.
PAGE 24 4.
MAN4005-04-EN 4.4 GPRS / GSM MODEM Configuration PAGE 25 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.
PAGE 26 GPRS / GSM MODEM Configuration 5 SMS Communications 5.1 Overview MAN4005-04-EN 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.
MAN4005-04-EN 5.2 GPRS / GSM MODEM Configuration PAGE 27 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.
PAGE 28 GPRS / GSM MODEM Configuration 5.2.1 • MAN4005-04-EN GSM Modem Settings – SMS Configuration In this example, the screen is already configured. The SMS Configuration screen has several sections that require configuration. Address Name Status Register Settings Enter the starting register location to indicate the status of the SMS communication. This is a block of four registers that are consecutive in memory.
MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 29 Status Bits for Siemens Modems & Internal Modem Bit 1 CPIN Command Failed: This command is used to unlock the SIM. This bit will be set if supplied PIN 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. Bit 2 CSCA service center number command Failed: This command is used to set the SMS service center number.
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.
MAN4005-04-EN 5.2.2 GPRS / GSM MODEM Configuration PAGE 31 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.
PAGE 32 GPRS / GSM MODEM Configuration 5.2.3 MAN4005-04-EN 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.
MAN4005-04-EN Group Name 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. 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.
PAGE 34 GPRS / GSM MODEM Configuration 5.2.5 MAN4005-04-EN 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.
MAN4005-04-EN Notify Variable Settings 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 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.
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: • • • Page 36 of 62 Click Add New Message to add a new message.
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.
PAGE 38 GPRS / GSM MODEM Configuration Trigger Variable Settings Message Attributes 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 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.
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.
PAGE 40 6 GPRS / GSM MODEM Configuration MAN4005-04-EN GPRS / GSM Modem Specifications HE-GSM04 SPECIFICATIONS Antenna Interface Frequency bands GSM/GPRS features supported Regulatory Agency approvals GSM/GPRS Functionality SIM Size (L x W) Weight Operating & Storage temperature Relative humidity Air pressure (altitude) Transmit Power Receive Power Page 40 of 62 Female SMA. EGSM 900, DCS 1800, and PCS 1900, GSM 850 capability.
MAN4005-04-EN 7 GPRS / GSM MODEM Configuration PAGE 41 Installation / Safety When found on the product, the following symbols specify: Warning: Electrical Shock Hazard. 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.
PAGE 42 9 GPRS / GSM MODEM Configuration MAN4005-04-EN 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.
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 Group Call Control Command Format Query Response N/A N/A Write Format Response N/A N/A Read Format Response N/A N/A Execution Format Response ATD1234567I; NO DIALTONE or NO CARRIER or CONNECT or BUSY or OK Parameter Values V.25ter Dialing Digits = 0 – 9, *, #, +, A, B, C V.
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.
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: . Read command returns the status of result code, which shows whether the network has currently indicated the registration of the ME.
PAGE 46 GPRS / GSM MODEM Configuration MAN4005-04-EN operator , 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.
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, , issued to replace the old pin in the SIM.
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 and channel bit error rate from the ME.
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.
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.
MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 51 11. AT+CMGL List Messages AT+CMGL List Messages Command Function Command Functional Group Command Format Query Response List messages from storage.
PAGE 52 GPRS / GSM MODEM Configuration MAN4005-04-EN 12. AT+CMGR Read Message AT+CMGR Command Function Read Message Read stored messages.
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 Group Short Message Services Command Format Query Response N/A N/A Write Format Response N/A N/A Read Format Response N/A N/A Execution Format Response AT+CMGD= OK Parameter Values Integer value of memory location.
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.
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.
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.
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 period has elapsed since the last PAD character was received from the local host.
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 Response Write Format Response N/A N/A Read Format Response Execution Format Response Parameter Values N/A N/A N/A N/A IP Address of the destination host. TCP Port number.
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.
PAGE 60 GPRS / GSM MODEM Configuration MAN4005-04-EN 26. $AREG Auto Registration $AREG Auto Registration Command Function Command Functional Group Command Format Query Response This command sets the auto registration state of the modem Enfora specific AT$AREG=? $AREG: (0,2) OK AT$AREG= OK AT$AREG? $AREG: OK N/A N/A Write Format Response Read Format Response Execution Format Response Parameter Values Notes 0 Autoreg off 1 Autoreg on 2 Auto GPRS Activation on Power up.
MAN4005-04-EN GPRS / GSM MODEM Configuration PAGE 61 INDEX A H ABOUT PROGRAMMING EXAMPLES ................................ 2 Add Contact....................................................................... 35 Additional SMS Settings .................................................. 33 Advantages of using SMS................................................ 28 ATE command Failed ....................................................... 31 Auto Answer modem Option ........................................
PAGE 62 GPRS / GSM MODEM Configuration R Register Value .............................................................. 14, 26 Rules for SMS Send and Receive Messages ..................... 42 S Select Baud Rate ................................................................ 34 Send / Receive SMS....................................................... 9, 21 Short Message Service....................................................... 28 Siemens TC Modem Initialization ....................................