Easy GPRS User Guide 80000ST10028 Rev.
Easy GPRS User Guide 80000ST10028 Rev.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 Contents 1 GPRS Operations ............................................................................................................................ 5 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 2 Introduction ............................................................................................................................................5 CSD application example ..................................................................................
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 DISCLAIMER The information contained in this document is proprietary information of Telit Communications S.p.A.. Telit Communications S.p.A. makes every effort to ensure the quality of the information it makes available. Notwithstanding the foregoing, Telit Communications S.p.A.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 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. 1 - 14/03/07 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. 1 - 14/03/07 • The controlling application must relay on some ISP that may be the Network Operator of the SIM to gain access to the internet through the GPRS connection. • Because of the point before, the receiving application must have internet access either. • Since the communication is based upon TCP/IP packets, then it is possible to talk contemporarily with more than one peer.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 • 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. In both cases, once connected, the remote unit sends the meteorological data to the server, which places it in a central database for further reading by anyone who accesses the meteorological internet site for example.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 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. 1 - 14/03/07 • 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. 1 - 14/03/07 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. 1 - 14/03/07 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. 1 - 14/03/07 - 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. 1 - 14/03/07 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. • send command ATD*99***# where: - is the index number of the desired context to be used (up to 5 different context) • wait for response: Response Reason Reproduction forbidden without Telit Communications S.p.A.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 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. 1 - 14/03/07 1.4 GPRS data state exit LCP Terminate Request LCP Terminate Acknowledge • Wait for NO CARRIER response.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 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. 1 - 14/03/07 2.1.1 Easy GPRS Outgoing connection The Easy GPRS feature provides a way to place outgoing TCP/UDP connections and keep the same IP address after a connection, leaving the GPRS context active.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 2.1.1.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 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. On the reception of an escape sequence if the socket was opened with the AT#SKTD command, the Telit module closes the connection, does not deactivate the GPRS context and returns to command mode issuing the NO CARRIER code. 2.1.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 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. 1 - 14/03/07 future connections until an AT#GPRS=0 command is issued or the network requests a context closing. 2.1.3 FTP Client On top of the embedded TCP/IP stack, an FTP client is available. Such FTP is a versatile protocol suite, designed to be powerful, compact and simple to use for file transfer over the TCP/IP and therefore over the GPRS network. As far as the AT commands list is concerned, the customer shall refer to the AT Commands Reference Guide. 2.1.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 2.2 FTP OPERATIONS A set of AT commands is available to support the FTP activities. The fist 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. 1 - 14/03/07 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. 1 - 14/03/07 Opening of FTP connection: 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. 1 - 14/03/07 Example of an FTP file download from the server: Define PDP contest: AT+CGDCONT=1,”IP”, "internet.wind.biz" OK GPRS Context Activation, as response gives IP of the module: AT#GPRS=1 +IP: 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. 1 - 14/03/07 To get more information for other available commands on the FTP functionality please refer to the AT Commands Reference Guide. 2.3 Examples1 2.3.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. Initial data: Server to be contacted Application Layer Protocol Page to be retrieved GPRS settings APN IP of GPRS device DNS USERID PASSWORD www.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 AT#SKTTO=90 (3-Socket setting: sets the maximum time with no data exchanging on the socket that the module awaits before closing the socket and deactivating the GPRS context) AT#SKTCT=600 (3-Socket setting) For our convenience we will store all these parameters with the command: AT#SKTSAV Next step is activation of the GPRS context: AT#GPRS=1 +IP: 193.199.234.255 OK This command replies with the IP address assigned by the network.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 NO CARRIER The Telit module is now back to command mode. 2.3.2 Easy GPRS - EMAIL sending application Let’s suppose we want to send with our embedded device an EMAIL by using a SMTP server. Initial data: Server to be contacted SMTP service Application Layer Protocol Sender Receiver Subject Message body smtp.domain.com port #25 SMTP (RFC821) "module" "Receiver"
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 The email can be sent following three different procedures: 1) Opening socket with SMTP server and then sending directly SMTP commands. The following AT commands should be issued to the Telit module: AT+CGDCONT = 1,"IP","internet.gprs","0.0.0.
dGVsaXQ= Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 (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.com > Reply-To: < module@domain.com > From: < module@domain.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 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#USERID = "EASY GPRS" AT#PASSW = "EASY GPRS" AT#ESMTP = "smtp.domain.com" AT#EUSER = "module@domain.com" AT#EPASSW = "telit" AT#EADDR= "module@telit.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 Now we can issue AT command that activates a GPRS context3, if not previously activated by AT#EMAILACT=1, and sends an e-mail message. AT#SEMAIL="receiver@domain.com","Email test",0 this message is sent in order to test the Easy GPRS feature. Hello World! CTRL-Z 2.3.3 Easy GPRS -EMAIL receiving application Let's suppose we want to receive with our embedded device an EMAIL by using a POP3 server.
AT#DSTO=50 AT#SKTTO=90 AT#SKTCT=600 Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 (3-Socket setting) (3-Socket setting) (3-Socket setting) For our convenience we store all these parameters with the command: AT#SKTSAV Now we can activate the GPRS context: AT#GPRS=1 +IP: 193.199.234.255 OK The commands gives as response the IP address assigned to the module by the network. AT#SKTD=0,110,"POP.mail.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 2.3.4 Remote connection between two modules Configuration for the module that receives data (server): Define PDP Context GPRS Context Activation Firewall Setup(if requiered) Socket Listen AT+CGDCONT=1,”IP”,”ibox.tim.it”,”0.0.0.0” AT#GPRS=1 AT#FRWL=1,”198.158.1.1”,”0.0.0.0” AT#SKTL=1,0,1024,255 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.
Easy GPRS User Guide 80000ST10028 Rev. 1 - 14/03/07 4 Document Change Log Revision ISSUE #0 ISSUE #1 Date 02/01/2007 14/03/2007 Changes Initial release 2.3.2 Easy GPRS – Email sending application: added new examples Reproduction forbidden without Telit Communications S.p.A.