Easy GPRS User Guide 80000ST10028 Rev.
Easy GPRS User Guide 80000ST10028 Rev.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Contents 1 GPRS Operations ............................................................................................................................ 6 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 2 Introduction ............................................................................................................................................6 CSD application example ..................................................................................
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 3 Easy GSM ....................................................................................................................................... 45 3.1 Overview................................................................................................................................................45 3.2 Commands overview ............................................................................................................................
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 DISCLAIMER The information contained in this document is the proprietary information of Telit Communications S.p.A. and its affiliates (“TELIT”). The contents are confidential and any disclosure to persons other than the officers, employees, agents or subcontractors of the owner or licensee of this document, without the prior written consent of Telit, is strictly prohibited.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 1 GPRS Operations 1.1 Introduction The General Packet Radio Services (GPRS) standard permits DATA transfers in a completely different way with respect to previous point to point communications made with Circuit Switch Data (CSD) GSM modems.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 In GPRS operations instead, the connection is made directly towards internet as if the GPRS modem was a network IP socket interface. There's no data path reserved for the data exchange between the two peers, instead the resources are allocated dynamically on demand and the data exchanged is organized into packets typically TCP/IP, furthermore the maximum transfer speed can be much faster than GSM CSD.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 • the GPRS connection speed with a GPRS class 10 multislot device is asymmetrical, 3 time slots in reception (43200 bps max) and 2 time slot in sending (28800 bps max) or 4 time slots in reception (57600 bps max) and 1 time slot in sending (14400 bps max). • The controlling application of the module must have a TCP/IP - PPP software stack to interface with the GPRS modems.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Now there are two possibilities: • the server application calls on demand the remote units, provided it has stored their phone numbers in a private database. • the remote units call the server application modem when needed and eventually retry in the case they found it busy; this time the phone number to be stored is only one, the server number which must be stored on the remote units.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 1.2 Preliminary GPRS context parameters setting 1.2.1 Context parameter setting The context parameters are all the set of information to identify the internet entry point interface provided by the ISP. With these parameters the GPRS network identifies the ISP to be used to gain access to the internet and defines the value of the IP address of the GPRS device once connected.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 • wait for response: Response OK ERROR Reason context parameters have been successfully stored some error occurred Action proceed ahead check parameters and retry For example: 1- Let's assume you want to set-up the GPRS context number 1(cid) with your GPRS connection parameters APN: ibox.tim.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 0 - subscribed (default) 1 - delay class 1 2 - delay class 2 3 - delay class 3 4 - delay class 4 (best effort) - is the connection reliability class. It represents the connection reliability requested, the higher is the number the less reliable is the data exchanged.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 31 - Best Effort • wait for response: Response OK ERROR Reason context parameters have been successfully stored some error occurred Action proceed ahead check parameters and retry. NOTE: If your minimum requirements are too high, then it can happen that it is impossible to establish a GPRS connection, because the network has not enough resources to guarantee that quality of service.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 - is the precedence class - is the delay class - is the connection reliability class - is the peak data transfer throughput - is the mean data transfer throughput Parameters assume the same values as in the previous section.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 1.3 GPRS context activation and data state entering This operation corresponds to the dial and connect of a CSD GSM data call issued to an internet service provider.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Î LCP Configure Request Í LCP Configure Acknowledge Î PAP Authentication Í PAP-Ack Î NCP (IP) Configure Request Í NCP (IP) Configure Acknowledge At this point the TCP/IP - PPP protocol stack is up and data packets can be exchanged. NOTE: Explanation of TCP/IP and PPP protocol stack is beyond the scope of this document. Further information on the LCP protocol and PPP protocol definition can be found in the RFC1661.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 1.4 GPRS data state exit Î LCP Terminate Request Í LCP Terminate Acknowledge • Wait for NO CARRIER response.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 2 Enhanced Easy GPRS Extension 2.1 Overview The Easy GPRS feature allows the Telit module users to contact a device in internet and establish with it a raw data flow over the GPRS and Internet networks. This feature can be seen as a way to obtain a "virtual" serial connection between the Application Software on the Internet machine involved and the controller of the Telit module, regardless of all the software stacks underlying.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 This particular implementation allows to the devices interfacing to the Telit module the use of the GPRS and Internet packet service without the need to have an internal TCP/IP stack since this function is embedded inside the module.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Another new feature is the possibility to associate any socket connection to a specific context, this means that we can use different IP addresses for the connections (max 2). Socket identifier is called Connection Id (selects which socket we want to use from 1 up to 6) and every Connection Id is associated to a context. 2.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 2.1.1.1 Configuring the GPRS access The GPRS access configuration is done by setting: • • the GPRS context number 1 parameters (see +CGDCONT command) the Authentication parameters: User Name and Password (see command #SGACT) 2.1.1.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Example: We want to associate the Connection Id number 2 to the context number 3 with a minimum packet size of 512 bytes, global timeout of 30 sec, connection timeout of 30 sec and transmission timeout of 10 sec. Command: AT#SCFG = 2, 3, 512, 30, 300,100 Answer: OK if command execution is correct ERROR if a parameter is wrong or the connection Id is working online 2.1.1.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 The response code to the AT#SGACT=1 command reports the IP address obtained from the network, allowing the user to report it to his server or application. Deactivating the context implies freeing the network resources previously allocated to the device. NOTE: Also the command AT+CGACT activates a context, but in this case the context cannot be used for Easy GPRS. 2.1.1.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 (send, receive data….) (+++) OK OK is returned after the escape sequence, it means that the socket has been suspended correctly. Now the connection number 3 is suspended and the module is in command mode so we can give another #SD command. AT#SD = 2 , 0 , 80 , “www.google.com” CONNECT (send, receive data….) (+++) OK If we try to open a connection while the ConnId is in suspended state or online an error will be occur.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 AT#SO = 2 CONNECT data sending (+++) In case there is data pending on this socket (you can know this the unsolicited message SRING has appeared before), issuing command AT#SO these pending data will be displayed after the CONNECT string. It is possible to resume a suspended socket without waiting for SRING message or data pending on that connection. Using AT#SO on a Connection Id in idle state (no socket open or suspended) we obtain a NO CARRIER message.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 NOTE: if there is an escape sequence in the raw data to be sent, then the TE must work it out and sent it in a different fashion to guarantee that the connection is not closed. The pause time is defined in the parameter S12. To avoid sending of the escape sequence a command AT#SKIPESC should be set at the beginning. 2.1.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 When packet incomes from the IP address , the firewall chain rules will be scanned for matching with the following criteria: & = ? if the result is yes, then the packet is accepted and the rule scan is finished, otherwise the next chain is taken into account until the end of the rules when the packet is silently dropped if no matching was found.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 2.1.2.3 Accept an incoming connection with #SA After receiving the SRING indication for an incoming connection we can decide to refuse the remote host connection with #SH command or accept the connection with #SA command. The command syntax is: AT#SA = Example: We are listening on Connection Id 3 and port 6543 AT#SL = 3, 1, 6543 OK A remote host is trying to connect, we receive the unsolicited indication.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 #SS: ,,,,, For every Connection Id with have the information about our local IP address, local port, remote IP and port if we are connected. The Status field represents the socket status: 0 – Socket Closed. 1 – Socket with an active data transfer connection. 2 – Socket suspended. 3 – Socket suspended with pending data. 4 – Socket listening. 5 – Socket with an incoming connection.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 FTP with CMUX is locked on the opening port. So if we try to open an FTP client connection on another virtual port the FTP commands will show an error message until the first connection with FTP server is not closed. When the connection is closed we can open another FTP session on another virtual port. In any case we can always have only one FTP session opened at the time. 2.1.2.7 4.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 2.2 FTP OPERATIONS A set of AT commands is available to support the FTP activities. The first command is called #FTPTO (FTP Time-Out) which defines the time-out for FTP operations. The module has already a factory default time defined that is 10 s. If it is needed to be modified, the syntax is: AT#FTPTO[=] Parameter: - time-out in 100 ms units 100..5000 - hundreds of ms (factory default is 100) NOTE: The parameter is not saved in NVM.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 2.2.2 Setting the FTP Transfer Type With the command AT#FTPTYPE[=] is possible to configure the file transfer type. The command must be provided during an FTP connection. Parameter: - file transfer type: 0 - binary 1 - ASCII NOTE: The command causes an ERROR result code to be returned if no FTP connection has been opened yet. NOTE: If the parameter is omitted then the behaviour of Set command is the same of Read command. 2.2.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 AT#FTPTO=1000 OK (FTP settings of time-out) AT#FTPOPEN=”199.188.25.77”,”user”,”pass”,0 OK In this case port of FTP server is not specified, which means that it has the default value: 21 AT#FTPTYPE=0 OK (FTP settings of file type) FTP file transfer to the server in the file named “file.txt”: AT#FTPPUT="file.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 GPRS Context Activation, as response gives IP of the module: AT#SGACT=1,1 #SGACT: 193.199.234.255 OK Opening of FTP connection: AT#FTPTO=1000 OK (FTP settings of time-out) AT#FTPOPEN=”199.188.25.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 2.3 AT Commands Compatibility Table Telit advises all clients that start a new application development with SW version 7.02.03 or higher to use these new IP easy AT commands.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 2.4 Examples1 2.4.1 Easy GPRS - HTTP client application Let’s suppose we want to connect our embedded device to an HTTP server and retrieve an HTML page using the EASY GPRS feature.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 For all the socket settings the following AT command will be used: AT#SCFG=1,1,300,90,600,50 OK Next step is activation of the GPRS context: AT#SGACT=1,1,“EASY GPRS“,“EASY GPRS“ #SGACT: 193.199.234.255 OK This command replies with the IP address assigned by the network. Now we can proceed with contacting the server with AT command for socket dial: AT#SD=1,0,80,”www.telit.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 The Telit module is now back to command mode and the socket is closed. 2.4.2 Easy GPRS - EMAIL sending application Let’s suppose we want to send with our embedded device an EMAIL by using a SMTP server.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Checking on the RFC990 the SMTP service we can found that the port 25 is dedicated for SMTP service, therefore our SMTP server will be waiting for incoming connections on that port and we will fix the EASY GPRS port to be contacted on the remote server exactly to 25.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 334 VXRlcm8gkXU6 Z204NjJAZG9tYWluLmNvbQ== (module@domain.com base64 encoding) 334 UHFzc6dcvmQ6 dGVsaXQ= (telit base64 encoding) 235 2.0.0 OK Authenticated MAIL FROM: module@domain.com (Sender) 250 2.1.0 module@domain.com... Sender ok RCPT TO: receiver@server.net (Receiver) 250 2.1.5 receiver@server.net... Recipient ok DATA 354 Enter mail, end with "." on a line by itself Return-Receipt-To: < module@domain.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 221 2.0.0 smtp.domain.com closing connection +++ OK AT#SH=1 OK The Telit module is now back in the command mode and the socket is closed. 2) Using only AT commands is with the following sequence of commands issued to the Telit module: AT+CGDCONT=1,"IP","internet.gprs","0.0.0.0",0,0 AT#ESMTP = "smtp.domain.com" AT#EUSER = "module@domain.com" AT#EPASSW = "telit" AT#EADDR= "module@telit.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 2.4.3 Easy GPRS -EMAIL receiving application Let's suppose we want to receive with our embedded device an EMAIL by using a POP3 server.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Next step is activation of the GPRS context: AT#SGACT=1,1,“EASY GPRS“,“EASY GPRS“ #SGACT: 193.199.234.255 OK The commands gives as response the IP address assigned to the module by the network. AT#SD=1,0,110,"POP.mail.server",0,0 When we receive the CONNECT indication, then we are exchanging data with the POP3 server program on the remote host machine.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 2.4.4 Remote connection between two modules Configuration for the module that receives data (server): Define PDP Context GPRS Context Activation Firewall Setup Socket Listen AT+CGDCONT=1,”IP”,”ibox.tim.it”,”0.0.0.0” AT#SGACT=1,1 AT#FRWL=1,”198.158.1.1”,”0.0.0.0” AT#SL=1,1,0,1024 First you have to define PDP context filling in the information of APN in this example: ibox.tim.it.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 3 Easy GSM 3.1 Overview This new feature allows the Telit module users to connect to an Internet Service Provider through a GSM CSD call and to use the embedded TCP/IP stack, such as in Easy GPRS, to contact a device in Internet and establish with it a row data flow over the Internet networks. The connection between the module and the Provider is based on PPP protocol over a GSM CSD call.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 3.2 Commands overview This paragraph describes the configuration and the activation of the GSM context and the new AT commands implemented to facilitate the use of Easy GSM and Easy GPRS in the same device. For more information about concerning outgoing and incoming connections, you can refer to the chapter “Enhanced Easy GPRS Extension“: there are no differences at sockets level.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 3.2.2 Configuring the embedded TCP/IP stack The context identifier reserved to the GSM context is 0. To use GSM carrier, and before activating the context, you have to configure at least one socket on the connection identifier 0, through the command #SCFG. 3.2.3 Request GSM context to be activated GSM context activation is done through the same command #SGACT used for GPRS, with 0 as context identifier.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 3.2.4 IP address information Once activated the GSM context, to interrogate the module about the IP address assigned by the network, a new command has been implemented: #CGPADDR. It reports the all addresses relative to the active contexts, GPRS and GSM; GPRS contexts are displayed exactly like in the case of the standard +CGPADDR. Example: We want to activate GSM context defined with #GSMCONT. Command: AT#SGACT = 0,1 Answer: #SGACT: “10.137.93.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 3.3 Examples 3.3.1 Easy GSM - HTTP client application Let’s suppose we want to connect our embedded device to an HTTP server and retrieve an HTML page using the EASY GSM feature. This example is analogue to the one given for GPRS carrier. Suppose to use a sim TIM.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Next step is activation of the GSM context: AT#SGACT=0,1, “userid“,“password“ #SGACT: 10.137.93.60 OK This command replies with the IP address assigned by the network. Now we can proceed with contacting the server with AT command for socket dial: AT#SD=1,0,80,”www.telit.com”,0,0 When we receive the CONNECT indication, then we are exchanging data with the HTTP server program on the remote host machine.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 3.3.2 FTP file transfer Let’s suppose we want to send a file to a FTP server. Define GSM context: AT#GSMCONT=0,”IP”, "3359009000" OK GSM Context Activation, as response gives IP of the module: AT#SGACT=0,1 #SGACT: 10.137.93.60 OK Opening of FTP connection: AT#FTPTO=1000 OK (FTP settings of time-out) AT#FTPOPEN=”199.188.25.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Define GSM Context GPRS Context Activation AT#GSMCONT=0,”IP”,” 3359009000”,”0.0.0.0” AT#SGACT=0,1 You have to define GSM context filling in the information of the Internet Service Provider Number. Next step is activation of GSM context which gives as reply the IP of the module assigned by network: AT#SGACT=0,1 #SGACT: 217.200.58.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 4 Command Mode Connections 4.1 Overview This feature allows Telit’s modules to establish a socket connection in command mode. The “classic” online mode connection is described in the figure below: Online mode Data Traffic On Line +++ With command mode feature now we have: Command Mode On Line AT cmds Sring This means that the socket connection is created, but the user can give AT commands as usually in command mode.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 4.2 Commands Overview This paragraph describes the configuration and the activation of a command mode connection and the AT commands implemented to use the new configuration socket parameters. For anything concerning outgoing and incoming connections, you can refer to the chapter “Enhanced Easy GPRS Extension“: there are no differences at sockets level. NOTE: For more detailed AT commands and parameters definitions consult the AT Commands Reference Guide.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 In “classic” online mode, if the connection is successful we have a CONNECT message, in this case we have only an OK message in case of success and we are still in command mode. To check if the connection is really established we ca use the AT#SS command to control socket status. AT#SS #SS: 1,2,217.202.12.22,38158,88.37.127.146,10510 #SS: 2,0 #SS: 3,0 #SS: 4,0 #SS: 5,0 #SS: 6,0 We can see that connection Id 1 is opened in suspended state. 4.2.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 • • • is the unsolicited Sring mode. sets text or hex data view. sets TCP keepalive parameter in minutes (up to 240), 0 means keepalive disabled. Examples: • AT#SCFGEXT = 1,1,0,0 - Socket 1 set with SRING data amount • AT#SCFGEXT = 1,2,1,0 - Socket 1 set with SRING view data mode in hex. 4.2.3 Send data in command mode connections To send data in command mode we can use the command AT#SSEND.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Where : • is the connection Id of the socket with data pending • is the number of pending bytes we want to extract (maximum value is 1500). Example: We receive a SRING data amount and then we extract all the five bytes pending with SRECV. SRING: 1,5 at#srecv=1,5 #SRECV: 1,5 hello OK 4.2.5 Socket Information command It is possible to have additional information on every socket with the AT#SI command.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 For example socket 1 has 123 bytes sent, 400 bytes received, 10 byte waiting to be read and 50 bytes waiting to be acknowledged from the remote side. 4.3 Examples 4.3.1 Open a command mode connection with Classic SRING Open a connection on an Echo port: AT#SD=2,0,10510,"88.37.127.146",0,0,1 OK AT#SSEND=2 >hello OK SRING: 2 AT#SSEND=2 >hello OK … Only one SRING unsolicited also if we have other data pending, the user is informed only once. 4.3.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 SRing data amount unsolicited is updated every time new data arrives on the socket. Now we use AT#SI to see info on connection Id 2: AT#SI=2 #SI: 2,10,0,10,0 Ten bytes sent and ten pending on the socket. 4.3.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Data are extracted directly from the socket buffer, now we send more than 64 characters, this will cause two unsolicited SRING. AT#SSEND=1 > testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest OK SRING: 1,64,testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttest SRING: 1,4,test The first unsolicited contains the first 64 bytes of the socket buffer, the remaining 4 are extracted with the second unsolicited message. 4.3.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 Now we come back to online mode with: AT#SO = 1 CONNECT Hello The AT interface is now in online mode and all characters written are interpreted as data to send on the connection Id. Reproduction forbidden without Telit Communications S.p.A.
Easy GPRS User Guide 80000ST10028 Rev.
Easy GPRS User Guide 80000ST10028 Rev. 4 - 16/07/08 6 Document Change Log Revision ISSUE #0 ISSUE #1 ISSUE #2 Date 02/01/2007 14/03/2007 03/09/2007 ISSUE #3 29/11/2007 ISSUE #4 16/07/2008 Changes Initial release 2.3.2 Easy GPRS – Email sending application: added new examples updated applicability table new disclaimer This document has been integrated with Multisocket User Guide and is valid from the 7.02.03 SW release Added new features related to sw release 7.03.00 or 7.02.