Home

Easy GPRS User Guide

image

Contents

1. Now we want to display the IP address Command AT CGPADDR 0 Answer H CGPADDR 0 10 137 93 60 3 2 5 Limitations and connections with other AT commands If the GSM context is active it is not allowed to activate a GPRS context This check has been introduced because GPRS activation would fail anyway Telit module works in Class B so ifa GSM CSD call is on no GPRS operation is possible GSM context activation is affected like all CSD calls by the AT CBST command The maximum data rate that can be set through this command is 14400 bps Network dependent Context activation is just allowed with non transparent data calls This property is the default value of one of the AT CBST command parameters l z an a pr f mg Reproduction forbidden without Telit Communica tions S p A written authorization All Rights Reserved page 48 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 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 Initial data Server to be contacted www telit com Application Layer Protocol HTTP1 0 RFC1945 HTTP1 1 RFC2068 Page to be retrieved homepage of server GPRS settings Provider number 3359009000 IP of the device dyna
2. t Paes Beas n A iit S Pc lt p TAD CH r D 5 4 US Fi 2 re Ane 4 s tiaeds f p ean wer m j f j ne Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 21 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 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 3 Request the GPRS context to be activated This command allows activation of one of the contexts defined with AT command CGDCONT With multisocket it is possible to activate simultaneously two context of the five that have been set We can write username and password directly from command line if required At least one Connection Id must be associated to the context we want to activate otherwise an error will be appear The command syntax is SGACT lt Cntx Id gt lt Status gt lt Username gt lt Password gt Where e Cntx Id is the context that we want to activate deactivate e Status is the context status 0 means deactivation 1 activation Example We want to activate context number two defined with CGDCON
3. For example if we want to connect to a web server with Connection Id number 3 the command is AT SD 3 0 80 www telit com If the command is successful we ll have a CONNECT message and the socket number 3 will be connected to the Telit webserver From this moment the data incoming in the serial port is packet and sent to the Internet host while the data received from the host is serialised and flushed to the Terminal Equipment The sequence does not close the socket but only suspends it We can suspend the connection and open another one with a different Connection Id A typical command sequence is AT SD 3 0 80 www telit com CONNECT Ps Wis 25 g JAM i eet gt Py ees Beas n A iit PI Bi ap Pate I gt 1 H T ES TA gee NAG a g lt r tiaeds f f ean Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 23 of 63 wer m j f j Ta 7 Telit Easy GPRS User Guide 80000ST 10028 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 Connld is in Suspende
4. lt mode gt is possible to open the FTP connection The parameters are lt server port gt string type address and port of FTP server factory default port 21 lt username gt string type authentication user identification string for FTP lt password gt string type authentication password for FTP lt mode gt 0 active mode default 1 passive mode In order to close the FTP connection the AT command ATH FTPCLOSE should be used p p Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 31 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 2 2 2 Setting the FTP Transfer Type With the command AT FTPTYPE lt type gt is possible to configure the file transfer type The command must be provided during an FTP connection Parameter lt type gt 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 3 FIP File transfer to the server With the command AT FTPPUT lt filename gt to issued during an FIP connection is possible to open a data connection and starts sending lt filename gt file to the FTP server If the data connection succeeds a CONNECT indication is sent otherwise a NO CARRIER indication is sent Parameter
5. wireless solutions Teli Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 ag Sas we qi F m i Ms i oe i Wage Making machines talk A Telit Easy GPRS User Guide 80000ST10028 Rev 4 16 07 08 This document is relating to the following products APPLICABILITY TABLE PRODUCT PART NUMBER APPLICABILITY GM862 GPS 3990250657 GM862 GPS 3990250689 GM862 QUAD PY 3990250658 GM862 QUAD 3990250639 Rare LEA 7 02 05 7 03 00 Ug P s wem a s page 2 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 Contents IR ONS ccc asc vc sc cca ra E E E 6 1 1 MEDC OCC TOAD eaa E E E EE E E E 6 LLLE CSU app pC atl OM example eere a a E EEE E E EE A EE 8 k2 GPRS appl Camo mex ale eessen usadio En i EES ai TAEAE SA a A EEE si EAEE N 9 1 2 Preliminary GPRS context parameters setting ssscsecccccsssssecececcosssssscccccsssssececccosssesececossssssseeessssso 10 EAI Cones ag oe 1 0s Ao Galo He NE E EE ee ene AEE ENEN eee mee eee ee ee 10 1 2 2 Minimum Quality of the Service Requested ccccccccccccccccccccceceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeEEEEEEEEEEEEEEeEEEEEEE EERE EH 11 Ls Regucsted Omay orie DNI a e i E E O O E 13 1 3 GPRS context activation and data state entering sssssecccosssssseccocosssssesceccocsssseececocssssseeccsosssssseeesso 15 1 4 GPRS data state OX Wiss scccssssveastucasscsnsasctnnaisncscasiasesvs
6. and unique phone number ll ee ne Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 8 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 Now there are two possibilities e the server application calls on demand the remote units provided it has stored their phone numbers in a private database e 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 The drawback of this approach is that the CSD modem needs about 30s to establish the connection and depending on the amount of data to be transferred usually few hundreds bytes some seconds to transfer them So let s say we pay a 40s call while we need only 10s to transfer data 1 1 2 GPRS application example The same application can be preformed with all the Telit modules using the GPRS feature The remote unit is always connected to the internet taking advance of the features of the GPRS system when it needs to send data to the server application it simply fills the TCP IP packets for
7. 1 Defining the Internet Peer that can contact this device firewall settings ccccccccccccceccceeeeeeeeeeeeeeeees 26 2 1 2 2 Request the socket connection to be opened in listen 22 ccc ccccccceeeeceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeey Zi 2 1 2 3 Accept an incoming connection WIth FSA oo cece cece eee eeeeeeeeeeeeeeeeEEEEEEEEEEEEEEEEEE EEEEEEEEEEEEEEEEEEEEEEEEE EH 28 2 1 2 4 Checking the socket status with FSS ccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeEEEEEEEE EE SERRE EE EEE 28 21 25 Using FIP atid IP Easy together sce icccisccssssisctsasiedandsiensienscdnwnstt nvansiestsasiedsndsnnsiededtnvnsdtacendesliasnciedeerissssatesssac 29 21 20 Usmge CMUX and Multisocket sciencie aiee EE E EENE EEEE ENEN KEETE NEENA EAEE 29 2 1 2 7 4 1 Using old interface command on Multisocket cccccc ccc ccccceeceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeey 30 Dk ck MEUM Poy Tir Mutiso wench anaconda SRT ce ee eee 30 eM SSI TOY SV MAAN WS setter tlt sot ee eh sted le lace E hds eto Mon toe Seen eases 30 Z 2 FIEFOFERATIONS eiren arrenar E E E AE 31 2 2 1 Opening and Closing an FTP Connection cccccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeseeeseeeseseeeessseseeess 31 222 Pomoge Ce EA adh Nh lt 5 casa natactnnlonea to vancemnerralt a NE 32 Dol PIPPI fransier 60 the 601 Vl sreidh a NE R E a EO 32 226 FIP Pile downlad trom he Server sessirnir i aa aTr OTERO 33 2 3 AT Commands Compatibility Val
8. Layer Protocol Sender Receiver Subject Message body GPRS settings APN IP of GPRS device DNS USERID PASSWORD SMTP settings SMTP server address Email account USERID PASSWORD Socket parameters Connection Identifier Packet size used by TCP UDP IP stack for data sending Socket inactivity timeout Connection timeout Data sending time out Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved 2 4 2 Easy GPRS EMAIL sending application smtp domain com port 25 SMTP RFC821 module lt module domain com gt Receiver lt receiver server net gt Email Test 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 The Telit module is now back to command mode and the socket Is closed Let s suppose we want to send with our embedded device an EMAIL by using a SMTP server This message is sent in order to test Easy GPRS feature Hello World internet gprs dynamically assigned by the network assigned by the network EASY GPRS EASY GPRS smtp domain com module domain com telit 300 90 600 50 page 38 of 63 7 Telit 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
9. keep the same IP address after a connection leaving the GPRS context active The steps required to open a socket and close it without closing the GRPS context are configuring the GPRS Access configuring the embedded TCP IP stack behaviour defining the Internet Peer to be contacted request the GPRS context to be activated request the socket connection to be opened exchange data close the TCP connection while keeping the GPRS active All these steps are achieved through AT commands As for common modem interface two logical statuses are involved command mode and data traffic mode e In Command Mode CM some AT commands are provided to configure the Data Module Internet stack and to start up the data traffic e In data traffic mode Socket Mode SKTM the client can send receive a raw data stream which will be encapsulated in the previously configured TCP IP packets which will be sent to the other side of the network and vice versa Control plane of ongoing socket connection is deployed internally to the module 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 2 1 1 1 Configuring the GPRS access The GPRS access configuration is done by setting e the GPRS context number 1 parameters see CGDCONT command e the Authentication parameters User Name and Password see command SGACT 2 1 1 2 Configuring the embedded TCP IP stack The TCP IP stack behaviour must be configured by setting e the pa
10. lt filename gt string type name under which you choose to save the file on the server must have the right extension es if the file you re sending is txt then the lt filename gt can be test txt NOTE use the escape sequence to close the data connection NOTE The command causes an ERROR result code to be returned if no FTP connection has been opened yet Example Define PDP context AT CGDCONT 1 IP internet wind biz lt cr gt OK GPRS Context Activation as response gives IP of the module AT SGACT 1 1 lt cr gt SGACT 193 199 234 255 OK Opening of FTP connection i wer m Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 32 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 AT FTPTO 1000 lt cr gt FTP settings of time out OK AT FTPOPEN 199 188 25 77 user pass O lt cr gt OK In this case port of FTP server is not specified which means that it has the default value 21 AT FTPTYPE 0 lt cr gt FTP settings of file type OK FTP file transfer to the server in the file named file txt AT HFTPPUT file txt lt cr gt CONNECT send the file escape sequence to close the data connection NOCARRIER AT FTPCLOSE lt cr gt closing FTP connection OK Deactivation of GPRS context if required AT SGACT 1 0 lt cr gt OK 2 2 4 FIP File download from the server With th
11. some data on a socket a SRING message is raised Bp BYE er SE AERA ak EES es ee i ee 2 Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 53 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 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 4 2 1 Opening a socket connection in command mode To open a socket in command mode we must use the multisocket commands AT SD or AT SA After a PDP context activation with AT SGACT it is possible to open all sockets associated to this PDP context in command mode using AT SD lt connld gt lt txProt gt lt rPort gt lt IPaddr gt lt closure type gt lt IPort gt 1 In case of listening after an unsolicited indication for an incoming connection SRING lt connld gt we have to use AT SA lt connld gt 1 where the last parameter of AT SD and AT SA is lt ConnMode gt Default value is 0 which means classic online mode 1 is used for command mode Examples Open a co
12. value is omitted 1 on lt pd1 gt lt pdN gt zero to N string parameters whose meanings are specific to the lt PDP_type gt NOTE a special form of the Set command CGDCONT lt cid gt causes the values for context number lt cid gt to become undefined NOTE issuing ATtCGDCONT lt CR gt is the same as issuing the Read command NOTE issuing ATtCGDCONT lt CR gt returns the OK result code 2 E Hi a y A a D amp j 4 i 4 i d gt s fe 3 ase iby gt Ses Cf 7 z gt r ww ur h ST PET N BaD Bad Z CER PRS Bi Sa m A y T s Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 10 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 e wait for response Response Reason Action OK context parameters have been proceed ahead successfully stored ERROR some error occurred 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 it IP address dynamically assigned by the ISP Packet Data Protocol type Internet Protocol IP Data compression OFF Header compression OFF command AT CGDCONT 1 IP ibox tim it 0 0 0 0 0 0 lt cr gt response OK 1 2 2 Minimum Quality of the Service Requested The minimum quality of service requested parameters represen
13. with AT command ATHGPRS 1 and also some other AT commands e CONNECTED which roughly corresponds to the connected status A thing that must be noted on the GPRS connect is the fact that if the mobile IP address the internet address is assigned by the ISP dynamically then when the GPRS context of the device is not activated it has no address and therefore it cannot be reached by internet requests The same thing occurs in the case the GPRS device has a static IP address assigned to it by the ISP but it is DETACHED In these cases there s no possibility for the internet peer to call the GPRS device through internet the only way to alert it is to call it in GSM mode either a Data or a Voice call are suited and the GPRS module application must recognize the caller eventually abort the GSM call and connect to the internet in GPRS to receive the packets from the internet peer NOTE Mobile device can be reachable from internet network only if the IP assigned by the operator is public IP not all operators offer this service To explain further the differences between CSD and GPRS an example application made in both ways will be shown 1 1 1 CSD application example Let s suppose you have several remote meteorological measurement units spread around the territory and you want to access them wirelessly through a GSM module in CSD operation For each remote unit there s a modem to connect with the server application with its own SIM card
14. 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 com 0 0 When we receive the CONNECT indication then we are exchanging data with the HTTP server program on the remote host machine Now following the HTTP protocol we ask for the homepage by sending the following lines on the serial line GET HTTP 1 1 lt cr gt lt lf gt Host www telit com lt cr gt lt lf gt Connection keep alive lt cr gt lt lf gt lt cr gt lt lf gt TIP Remember that the strings which are sent to the HTTP server have to be ended by line feed character To see the issued commands enable the local echo As a response to our query the HTTP server will reply with the HTML code of the homepage and some debugging responses that we will see directly on the serial line HTTP 1 1 200 OK Date Thu 06 2003 10 21 58 GMT Server Apache 1 3 27 Unix Last Modified Thu 06 2003 10 21 58 GMT Content Type text html Connection close lt DOCTYPE HTML PUBLIC W3C DTD HTML 3 2 FINAL EN gt lt HTML gt here is all the HTML code of the page lt HTML gt lt pause gt lt pause gt OK AT SH 1 OK ag Reproduction forbidden without Telit Communica tions S p A written authorization All Rights Reserved page 37 of 63 Initial data Server to be contacted SMTP service Application
15. 3 Socket suspended with pending data 4 Socket listening 5 Socket with an incoming connection Waiting for the user accept or shutdown command Example AT SS SS 1 4 217 201 131 110 21 SS 2 2 217 201 131 110 1033 194 185 15 73 10510 SS 3 3 217 201 131 110 1034 194 185 15 73 10510 SS 4 1 217 201 131 110 1035 194 185 15 73 10510 SS 5 0 SS 6 0 OK In this case we can see Connection Id 1 in listen mode on port 21 number 2 suspended with no data pending number 3 suspended with pending data and number 1 is online The last two connections are closed 2 1 2 5 Using FTP and IP Easy together Another new functionality of multisocket is the simultaneous FIP client service with socket connections We can use socket suspension mode to give FTP commands as in the old IP Easy keeping socket alive and eventually resuming socket connections when we need to Note It is recommended to leave Connection Id 1 associated to context 1 for using this functionality for more explanation see also paragraph 2 1 1 2 2 1 2 6 Using CMUX and Multisocket Using CMUX we can have up to three virtual port to execute normal AT commands if we join CMUX with multisocket we can share the six connections on the three ports six is the total number in any case and we can have up to three sockets active online at the same time f i oe m j Reproduction forbidden without Telit Communications S p A written authoriz
16. A E EA E AAA A IE E T AE ANE E EE A T A AR 49 3 3 1 Easy GSM HTTP client application nennnnnnnnnnnnnnnnnnnnnnennrenesrrrrrrrrrrrrerrrrrrrrrrrrrrrrrrerrrrrrerrrrrreeeesseeesereeereeeeees 49 ee EEE E EEE E E EE 5I 3 3 3 Remote connection between two modules nnnnnonnnnoennnneeneneeesrrrerrrrrrerrrerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrresesseesererereeseees 51 Command Mode CGC COINS sessissdserr srein Tra On eE Narra aao oTe oan 53 4 1 ONTV ICW aeran EEE E E E E EE E EEEN 53 4 2 Conmands OV C8 VAC W a E E E E E EE EE 54 4 2 1 Opening a socket connection in command MOAEC ccc ceeeeeeeeeseseeseeeeseeseesesaeaaesaaaaasaaaaaaaaaaaaaaaaaaaaaaaaaaeeeeeeeeees 54 422 Configuring extended socket param tert S nuiras iE ian EE EAEE E Er NEE Eaa 55 4 2 3 Pend data in command mod connections s eisssissrsriesiissr nininini koisen isinir aksine r ninini Esine penisinin riain aia 56 4 2 4 Receive data in command mode connections cccccccccsecceceeceeeeeeeececececeeececaceeeceaeaeccecccecceeeeeeeeeeceeeeeeeeeeseseeees 56 425 Socket Iniornnaton command esaia e En E EEn aaier E ER a BrE EEn a 57 4 3 Examples ooe E E E A E 58 4 3 1 Open a command mode connection with Classic SRING L ccccccccccccccccsseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeseeeeseseeeeess 58 4 3 2 Open a command mode connection with Data amount SRING Lu cccccccccccceeeeeeeeeeeeeeeeeeseeeeeeseeseeeeeeeeess 58 4 3 3 Open a command mode connection wi
17. AT FTPCLOSE lt cr gt closing FTP connection OK Deactivation of GPRS context if required AT SGACT 0 lt cr gt OK TIP The SGACT command activates the context and it is necessary to start the FTP connection To get more information for other available commands on the FTP functionality please refer to the AT Commands Reference Guide NOTE FTP works only on context one ATHSGACT 1 1 it a _ rH gt a is 2 gt S n r a i83 3 z i Ss y g lt l H as fs PP a y L xiLOWATTHOURS l hta A F i i if A aie See ut J A Nt a s gi POG S A yi r A 5 p t fe ie E lt u we ais a YN j i a Yee f gt j i Ke i a A 4 5 CTR i ji a CIN i j x r t er lt BD Be gt 7 Wer 4 f a amp i j ve ence P Minis Y s f ms ee Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 34 of 63 rA Telit Easy GPRS User Guide 80000ST 10028 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 Below you can find compatibility table for old and new commands IPEasy old AT commands AT HSKTOP AT SKTD AT SKTL ATHSKTSET ATHSKTSAV AT GPRS after ATHSKTD after ATHSKTOP AT USERID AT PASSWD AT HPKTSZ AT DSTO AT HSKTTO
18. ATHSKTCT IPEasy new AT commands AT SGACT AT SD AT SD AT SL not required not required AT SGACT ATHSH ATHSH ATHSGACT AT SGACT AT SGACT AT SCFG AT SCFG AT SCFG AT SCFG Operation description socket open socket dial socket listen activation of GPRS context socket close authentication socket configuration It is strongly recommended to not mix the new commands with the old ones lt _ z z i A g 7 7 f lt A BVT hE Re he a a Reproduction forbidden without Telit Communica E i ARR z ees BEN ie AIIE A 3 EEE o en a a tions S p A written authorization All Rights Reserve d page 35 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 2 4 Examples 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 Initial data Server to be contacted www telit com Application Layer Protocol HTTP1 0 RFC1945 HTTP1 1 RFC2068 Page to be retrieved homepage of server GPRS settings APN internet gprs IP of GPRS device dynamically assigned by the network DNS assigned by the network USERID EASY GPRS PASSWORD EASY GPRS Socket parameters Connection Identifier 1 Packet size used by TCP UDP IP stack for data 300 sending Socket inactivity timeout 90 Connection timeout 600 Data sending time out 50 Che
19. G 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 The command syntax is AT HSI lt connld gt Where connld is an optional parameter we can see info on a specific socket or for all sockets The information shown by the command are e Data sent on the socket e Data extracted from the socket buffer e Data pending on the socket buffer e Data not acknowledged by the remote at s SI 1 123 400 10 50 SI 2 0 100 0 0 SI 3 589 100 10 100 SI 4 0 0 0 0 SI 5 0 0 0 0 SI 6 0 98 60 0 OK Sockets 1 2 3 6 are opened with some data traffic H y i _ a f h i ES De e z 8 y a af Sa A o 2 2 agf f f r A KILO D F iH id F ib r 4 ips N j 4 f Mys aa die Z ye F 5 Be 5 a i IN Le 1 lt ee ye Pa aN i P d d 5 d k i gt z 4 d E 7 A A a 5 BEE te WG t gt p F a fA s T D igh F P A j z _ _ j A n yf a of Sr meh ee A Ly ee 4 eae ero 5 l pune pi ee ed x x 7 hr siin mers p j 4 ee f z b Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 57 of 63 7 Telit Easy GPRS User Guide 80000ST10028 Rev 4 16 07 08 For example socket 1 has 123 bytes s
20. SD The connection establishment procedure defines a particular path where all the information exchanged between the two peers flows and this path is reserved for exclusive use of these 2 peers for all the time the connection is active This approach has the drawbacks of a long time to set up the link between the two peers up to a minute and a time counting bill which proceeds even if no data is exchanged because the path resources are reserved anyway furthermore the speed of the data transfer is limited to 14400 bps An example of this kind of operation is shown in the following picture where the point to point connection is between the two peers as if all the devices inside the dashed line are not present CSD interconnectivity r Network Interworking originator sah ieee poetver receler HSCSD Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 6 of 63 A Telit 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 An example of GPRS connection is shown in
21. T Command AT SGACT 2 1 Answer SGACT 212 195 45 65 OK if activation success ERROR f activation fails page 22 of 63 7 2 Telit Easy GPRS User Guide 80000ST10028 Rev 4 16 07 08 The response code to the ATHSGACT 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 4 Open the connection with the internet host With the AT command SD socket Dial the TCP UDP request to connect with the internet host starts e DNS query is done to resolve the IP address of the host name internet peer if required e Telit module establishes a TCP UDP depending on the parameter request connection with the given internet host e Once the connection is up the module reports the code CONNECT The command syntax is AT SD lt Conn Id gt lt Protocol gt lt Remote Port gt lt IP address gt lt Closure Type gt lt Local Port gt Where Conn ld is the connection identifier Protocol is 0 for TCP and 1 for UDP Remote Port is the port of the remote machine IP address is the remote address To open the remote connection the context to which the Connection Id is associated must be active otherwise an error will appear
22. ack 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 An example of the protocol stack involved in the devices is reported A lt Virtual Serial Link gt gt Serial Line Driver In this case the speed at which packets can be downloaded is limited to the maximum data rate for a data call 14400 bps All the features of Telit multisocket FTP and EMAIL can be used over the GSM carrier In order to enable GSM carrier a particular context has to be activated with identification number 0 The use of this context is analogue to that of GPRS contexts lin E page 45 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 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 NOTE For more detailed AT commands and parameters definitions consult the AT Commands Reference Guide 3 2 1 Configuring GSM access GSM context definition differs from GPRS one and requires a new command GSMCONT that replaces
23. application of the device must comply with the safety standards of the applicable country and where applicable with the relevant wiring rules Telit reserves the right to make modifications additions and deletions to this document due to typographical errors inaccurate information or improvements to programs and or equipment at any time and without notice Such changes will nevertheless be incorporated into new editions of this application note All rights reserved 2007 2008 Telit Communications S p A ag Reproduction forbidden without Telit Communica tions S p A written authorization All Rights Reserved page 5 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 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 In CSD operations the modem establishes a connection with the other party another modem in such a way that all the Network devices in between are transparent to the data exchanged simulating a real point to point connection just as if the other party is directly connected with the controlling application of the modem The other party can be either an Internet Service Provider ISP or a private server but in any case the arrival point must have a modem to connect to Landline ISDN or GSM C
24. ation All Rights Reserved page 29 of 63 7 Telit 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 FIP 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 1 Using old interface command on Multisocket The old commands like SKTD or SKTL are available also on multisocket platform and they work like in the old IP Easy platform If we open a connection with SKTD we can t suspend the connection and the sequence will close definitively the connection In particular with SKTD command we have the possibility to open three simultaneous connections using CMUX virtual ports They are closed using the sequence Note SKTOP has some limitations It is available only on the first virtual port of CMUX and it is recommended not to use it with the new multisocket commands because SKTOP deactivates the context when the connection is closed This can generate the closure of suspended sockets It s strongly recommended in any case to avoid using old IP Easy command with new multisocket commands 2 1 2 8 5 1 Dial Up with Multisocket With multisocket we recommend you to use the first context for a dialup conne
25. cket 1 set with SRING data amount e AT HSCFGEXT 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 At the prompt we can write data and send immediately on the socket with CTRL Z sequence Maximum number of bytes is 1024 if more characters are written they are truncated in upload The command syntax is AT SSEND lt connld gt Where lt connld gt is the connection Id of the socket that we want to use to send data socket must be opened otherwise an error is raised Example We send the string hello on an echo socket with SRING mode set to Data amount ATHSSEND 1 gt hello lt C TRL Z gt OK SRING 1 5 4 2 4 Receive data in command mode connections To receive data in command mode it is possible to use the ATHSRECV If we receive an unsolicited message SRING we can extract the data from the socket buffer in command mode The syntax of the command is AT SRECV lt connld gt lt maxByte gt p p Reproduction forbidden without Telit Communica tions S p A written authorization All Rights Reserved page 56 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 Where e lt connid gt is the connection Id of the socket with data pending e lt maxbytes gt is the number of pending bytes we want to extract maximum value is 1500 Example We receive a SRIN
26. cket default size e the data sending timeout e the socket inactivity timeout Before opening a connection we have to set the socket parameters with the new SCFG command It is possible to set all the timeout values and packet size for each socket connection with a single AT command The command syntax is AT SCFG lt Conn Id gt lt Cntx Id gt lt Pkt sz gt lt Global To gt lt Conn To gt lt Tx To gt Where e Connid the connection identifier e Cntxid the context identifier e Pkt sz the minimum data packet sent to the net default 300 bytes e Global To inactivity timeout default 90 sec e Conn To connection timeout default 60 sec expressed in tenths of second e TxTo data sending timeout default 5 sec expressed in tenths of second The first two parameters are new and they represent the association between the socket connection and the context set with CGDCONT It means that we can have socket connection working on different IP addresses The other parameters replace the old IP Easy commands DSTO SKTTO SKTCT and PKTSZ If we try to modify the socket configuration of an online connection an error will appear So it s recommended to set the socket configuration at the beginning It is strongly recommended to leave the first Connection Id associated to context one to allow simultaneous FTP SMTP and IPEasy services The values set with this command are saved in NVM t Pd Mie 224 or OR a U bd i at i a
27. cking on the RFC990 the HTTP service we can found that the port 80 is dedicated for HTTP service therefore our HTTP 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 80 Second thing we have to discover is whether the transport protocol has to be TCP or UDP on the RFC1945 we can read that the HTTP Application layer protocol is meant to be on top of TCP IP protocol therefore the transport protocol choice will fall on TCP Now we have all the information needed to configure our system With our microcontroller we issue to the Telit module the following AT commands AT CGDCONT 1 IP internet gprs 0 0 0 0 0 0 lt cr gt GPRS context setting 1 NOTE For the detailed information about AT commands reported in examples please consult AT Commands Reference Guide ej 4 n f oo F i t 4 i A it A P 4 WN ee a 5 i fe 3 te Aby A SE a rA 4 gt ek ii d eh Vid PN Bu Bad igi i Sg Ga aa 4 mh ne J p Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 36 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 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
28. 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 e send command AT CGDCONT lt cid gt lt PDP_type gt lt APN gt lt PDP_addr gt lt d_comp gt lt h_comp gt lt pd 1 gt L PAN I lt er gt where lt cid gt PDP Context Identifier numeric parameter which specifies a particular PDP context definition 1 max where the value of max is returned by the Test command lt PDP_type gt Packet Data Protocol type a string parameter which specifies the type of packet data protocol IP Internet Protocol PPP Point to Point Protocol lt APN gt Access Point Name a string parameter that represents logical name used to select GGSN or external packet data network If the value is null or omitted then the subscription value will be requested lt PDP_addr gt a string parameter that identifies the terminal in the address space applicable to the PDP The allocated address may be read using the CGPADDR command lt d_comp gt numeric parameter that controls PDP data compression O off default if value is omitted 1 on lt h_comp gt numeric parameter that controls PDP header compression O off default if
29. ction and use the other available context for IP Easy socket connection The first context must be deactivated to make dialup connection work correctly if we activate IP Easy and dialup at the same time the performance get worse It is possible to make web browsing and IP Easy socket connection at the same time 2 1 3 Known limitations The implementation of the EASY GPRS feature has the following known limitations e SKTOP is available only on the first virtual port of CMUX e PPP and IPEasy functionalities not on the same IP Address PPP uses always the first Cntx Id e Multi listen only on different IP ports 7 2 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 2 2 FIP 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 lt tout gt Parameter lt tout gt time out in 100 ms units 100 5000 hundreds of ms factory default is 100 NOTE The parameter is not saved in NVM NOTE if parameter lt tout gt is omitted the behaviour of Set command is the same as Read command Example AT FTPTO 1000 lt cr gt set the timeout to 100sec OK 2 2 1 Opening and Closing an FTP Connection With the command AT FTPOPEN lt server port gt lt username gt lt password gt
30. d state or online an error will be occur If a suspended connection receives some data the user will receive an unsolicited SRING indication from the module In case we receive some data from the suspended connection with Telit server we ll receive this unsolicited message SRING 3 where 3 is the number of the Connld with data pending NOTE The unsolicited SRING indication appears only in command mode 2 1 1 5 Resuming a suspended connection with SO This is the new command to resume a Suspended connection the command syntax is AT SO lt Conn Id gt Example AT SD 2 0 80 www google com CONNECT data sending OK SRING 2 page 24 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 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 ld in idle state no socket open or suspended we obtain a NO CARRIER message 2 1 1 6 Close the Socket without deactivating the context The connection can be closed for the following reasons e remote host TCP connection close e socket inactivity timeout e Terminal Equipment by issuing the escape sequenc
31. e and AT SH that specifies the Connection Id e Network deactivation With the new management of the escape sequence we need a command to close the socket connection The AT command syntax to use is AT SH lt conn Id gt Example AT SD 2 0 80 www google com CONNECT data sending OK AT SH 2 OK Now the connection is closed If we send this command with an idle Connection Id we obtain in any case an OK message us N JEA 7 ji re a PAN SMES Qe en without Telit Communications S p A written authorization All Rights Reserved page 25 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 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 2 Easy GPRS Incoming Connection The Easy GPRS feature provides a way to accept incoming TCP UDP connections and keep the same IP address after a connection leaving the GPRS context active The steps that will be required to open a socket in listen waiting for connection requests from remote hosts and accept these request connections only from a selected set of hosts then close it without closing the GRPS context are configuring the GPRS Access configurin
32. e command AT FTPGET lt filename gt to issued during an FTP connection opens a data connection and starts getting a file lt filename gt from the FTP server If the data connection succeeds a CONNECT indication is sent otherwise a NO CARRIER indication is sent The file is received on the serial port Parameter lt filename gt file name string type NOTE The command causes an ERROR result code to be returned if no FTP connection has been opened yet Example Define PDP contest AT CGDCONT 1 IP internet wind biz lt cr gt OK page 33 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 GPRS Context Activation as response gives IP of the module ATHSGACT 1 1 lt cr gt SGACT 193 199 234 255 OK Opening of FTP connection AT FTPTO 1000 lt cr gt FTP settings of time out OK AT FTPOPEN 199 188 25 77 user pass O lt cr gt OK In this case port of FTP server is not specified which means that it has the default value 21 AT FTPTYPE 0 lt cr gt FTP settings of file type OK AT FTPCWD incoming change working directory if requiered OK In order to get the list of files on the working directory from the server AT command AT FTPLIST should be used Downloading FTP file file txt from the server AT FTPGET file txt lt cr gt CONNECT receive the file Data connection will be closed automatically when the file sending is terminated NO CARRIER
33. e sccsiccssscstsseissais stacctiacesssesssnctsauaseiavciesvapetescarsdvaseuessssesessaviewenseicetaass 35 2 4 Examples coarrcnoadine i EE NE E E NEEE E A A 36 2 4 1 Easy GPRS HTTP client application ices ti cceceanntiieccaes sncdeaceniiestaes axedasansiadiatanasaecdasesavaniinstoceseedtseetoesesedsutsteantiances 36 2 4 2 Easy GPRS EMAIL Sending application cccccccccsscccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseseeseeseeeesess 38 2 4 3 Easy GPRS EMAIL receiving application ccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeesesessesseseeeess 42 2 4 4 Remote connection between two modules eececsesssscceeeeeeeeeeeeeeeseeeesssssneeeeeeeeeeeeeeessseeeeeesseaeeeeeeeeeeeeseeeeeegs 44 Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved ee page 3 of 63 3 4 7 2 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 TEAS Y GS Vi PE A E E E E E E T E E E 45 3 1 WOON CL VOW EE E E E E E E E A E saciaqaesuuts 45 3 2 COn S OV CE VIIN aeaa E 46 a EC E M CEE ay T E E E E E E E eee ere 46 Sele COMMUTE TS CMD SUG TOPP ACK secs Ei 47 323 Request GSM context to be ACH V Ab CC cissie E a E E N e 47 i aie IPaddress a0 g 0117210 0 NE E nee Ty T E rete eee 48 3 2 5 Limitations and connections with other AT Commands ccccccccccccccccccecceeeceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 48 3 3 DE E a A
34. ed some error occurred Action proceed ahead with the authentication amp Packed data protocol check context parameters and retry See par 1 2 1 1 2 2 1 2 3 check also Network registration status check context parameters and retry See par 1 2 1 1 2 2 1 2 3 check also Network registration status 1 Let s assume you want to activate and enter the GPRS state with context number 1 cid written before with your GPRS requested QoS parameters command ATD 99 1 lt cr gt response CONNECT At this point your application should start the PPP protocol with the LCP Exchange phase m p Reproduction forbidden without Telit Communica tions S p A written authorization All Rights Reserved page 15 of 63 rA Telit Easy GPRS User Guide 80000ST 10028 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 Further information on the PAP protocol definition can be found in the RFC1334 Further information on the IPCP protocol definition can be found in the RFC1332 o NOTE The CONNECT result code is raised before comp
35. ent 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 gt hello OK SRING 2 AT SSEND 2 gt hello OK Only one SRING unsolicited also if we have other data pending the user is informed only once 4 3 2 Open a command mode connection with Data amount SRING Open a connection on an Echo port AT SD 2 0 10510 88 37 127 146 0 0 1 OK AT SSEND 2 gt hello OK SRING 2 5 AT SSEND 2 gt hello OK SRING 2 10 Pee eduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 58 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 SRing data amount unsolicited is updated every time new data arrives on the socket Now we use ATH SI to see info on connection Id 2 AT SI 2 51 2 10 0 10 0 Ten bytes sent and ten pending on the socket 4 3 3 Open a command mode connection with Data view SRING We configure connection Id 1 for data view in text mode AT SCFGEXT 1 2 0 0 OK We configure connection Id 2 for data view in hex mode AT SCFGEXT 2 2 1 0 OK Open the two echo connections in command mode AT SD 1 0 10510 88 37 127 146 0 0 1 OK AT SD 2 0 10510 88 37 127 146 0 0 1 OK Send some data on the fi
36. g the embedded TCP IP stack behaviour see par 2 1 1 2 defining the Internet Peer that can contact this device firewall settings See par 2 1 2 1 request the GPRS context to be activated see par 2 1 1 3 request the socket connection to be opened in listen see par 2 1 2 2 receive connection requests see par 2 1 2 3 exchange data close the TCP connection while keeping the GPRS active see par 2 1 1 6 All these steps are achieved through AT commands As for common modem interface two logical statuses are involved command mode and data traffic mode e In Command Mode CM some AT commands are provided to configure the Data Module Internet stack and to start up the data traffic e In data traffic mode Socket Mode SKTM the client can send receive a raw data stream which will be encapsulated in the previously configured TCP IP packets which will be sent to the other side of the network and vice versa Control plane of ongoing socket connection is deployed internally to the module 2 1 2 1 Defining the Internet Peer that can contact this device firewall settings The Telit module has an internal Firewall that controls the behaviour of the incoming connections to the module The firewall applies for INCOMING listening connections OUTGOING connections will be always done regardless of the firewall settings Firewall General policy is DROP therefore all packets that are not included into an ACCEPT chain rule will be sile
37. isonciastsaisuessivaesdsessiecesbosseiactssscienbiasauesscaeatanseateesdeesnids 17 2 Enhanced Easy GPRS EP XtensiO ih csscecssscwctersceccsseccesaesascases caasesceneseuantesueveaseassaceosssaseseustecansssuesseess 18 Zil MOV OE VOW oaia E E Ea EE 18 2 1 Commands OVER VICW sctieiisassccssdecaiviasisssssosccaioisnucsensesesdivisdedetosainandosseadsvesaneisintachsusssainaoiuietesensaaansdicsseess 20 2il Easy GPRS Outecoimng Comme CU OM icrcccescaccccnaccseselasssesanaevsassdeessanorttesesetessieseutteeessdeieeene aso eriari a ni 20 LLLI Commie ovine the GPRS ACCESS acronis EE E E S EEE ERNE E EEDE E ANE 21 ALl Comhisunmnie the embedded TCP IP Stack ccc sccecsciesiesocacesaxsnacecenslacesensnteeensdeessaueneeecanodsevucduebtevedguanatumensteecss 21 2 1 1 3 Request the GPRS context to be activated 22 cccccccce cece eee e cece eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeeess 22 2 1 1 4 Open the connection with the internet host onnennnnnnnnennnnnsnnnnrnrerrrererrrrrrrrerrrrrrrrrrrrerrrrrrrrrrrrrrrereerereeens 23 2 1 1 5 Resuming a suspended connection with SO cccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeseeess 24 2 1 1 6 Close the Socket without deactivating the COMtEXt cc cccccccccceceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeees 25 2 1 2 Easy GPRS Incoming Connection cccccccccccccccecseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeceEEEEEeEEEEEEEEEE EERE EEE 26 2 1 2
38. just in GSM case the standard CGDCONT The only parameter to set is the number of the Internet Service Provider The command syntax is AT GSMCONT 0 IP lt CSD num gt Where e 0 is the context identifier for the GSM context e CSD num is the Internet Service Provider number Wy E a a N x gt 3 38 i t 7 Ta aX SS oe lt lt a 7 j mel d FH i p 7 eet A Ni gt 7 a j A yi it f p ies 5 wwr eo Bp x i 3 ait j a o i P a j p i F TE 7 f 4 A A ee Pa y j a i f Y j er TF E lt ABAR BaF gt 77 Ve f me fS a r s s j ay PA EBL He c Binsen j A be ment p j bca Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 46 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 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 We cannot activate more than one GSM context at the same time The activation may require also in this case two Authentication parame
39. lete GPRS connection establishment 7 2 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 1 4 GPRS data state exit gt LCP Terminate Request LCP Terminate Acknowledge e Wait for NO CARRIER response or in alternative send escape sequence e wait for 2s default silence time e wait for response Response Reason Action OK Telit module is in command proceed ahead mode now ERROR some error occurred check command syntax and timing and retry NO CARRIER connection has been closed proceed ahead e send command ATH lt cr gt e wait for response Response Reason Action OK GPRS connection has been closed ERROR some error occurred check command syntax and retry TRT gt gt 7 f h gt 3 7 J j 7 s af f 7 HY f W s E a Dh fi d fe 3 i i o Ed BEY 4 i s eee a Z B be mn ee i Reproduction forbidden without Telit Communica tions S p A written authorization All Rights Reserved page 17 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 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
40. mically assigned by the network DNS assigned by the network USERID Userid of the TIM account PASSWORD Password of the TIM account Socket parameters Connection Identifier 0 Packet size used by TCP UDP IP stack for data 300 sending Socket inactivity timeout 90 Connection timeout 600 Data sending time out 50 Our HTTP server will be waiting for incoming connections on port 80 and we will fix the port to be contacted on the remote server exactly to 80 As transport protocol we choose TCP With our microcontroller we issue to the Telit module the following AT commands AT GSMCONT 0 IP 3359009000 lt cr gt GSM context setting For the all socket settings the following AT command will be used AT SCFG 1 0 300 90 600 50 OK Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 49 of 63 rA Telit Easy GPRS User Guide 80000ST 10028 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 Now following the HTTP protocol we ask for the homepage by sending the following line
41. mmand mode socket on connection Id number 1 AT SD 1 0 10510 88 37 127 146 0 0 1 OK After an unsolicited indication for an incoming connection on a listening connld SRING 1 AT SA 1 1 OK z her p J Reproduction forbidden without Telit Communica tions S p A written authorization All Rights Reserved page 54 of 63 7 Telit 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 2 Configuring extended socket parameters Before opening socket connections it is possible to set extended configuration parameters on each of six sockets available with multisocket The main feature regards SRING unsolicited messages These messages inform the user that there are pending data on a specific connection Id We have three modes e Classic SRING only one message SRING lt connld gt when some new data arrive on a socket connection like it was for a socket connection of multisocket This message is received also when there s an incoming connection on li
42. nce gt is the precedence class lt delay gt is the delay class lt reliability gt is the connection reliability class lt peak gt is the peak data transfer throughput lt mean gt is the mean data transfer throughput Parameters assume the same values as in the previous section e wait for response Response Reason Action OK context parameters have been proceed ahead successfully stored ERROR some error occurred check parameters and retry For example 1 Let s assume you want to set up the GPRS context number 1 cid written before with your GPRS requested QoS parameters Precedence class High priority Delay class subscribed Reliability class subscribed Peak throughput subscribed Mean throughput best effort command AT CGQREQ 1 1 0 0 0 31 lt cr gt response OK NOTE Telit suggests to setup AT CGQMIN 1 0 0 3 0 0 page 14 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 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 e send command ATD 99 lt cid gt lt cr gt where lt cid gt is the index number of the desired context to be used up to 5 different context e wait for response Response CONNECT ERROR CME ERROR lt error code gt For example Reason GPRS connection is being processed some error occurr
43. network DNS assigned by the network USERID EASY GPRS PASSWORD EASY GPRS Socket parameters Connection Identifier 1 Packet size used by TCP UDP IP stack for data 300 sending Socket inactivity timeout 90 Connection timeout 600 Data sending time out 50 Checking on the RFC1785 we can found that the port 110 is dedicated for POP3 service therefore our POP 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 110 Second thing we have to discover is whether the transport protocol has to be TCP or UDP on the RFC1785 we can read that the POP3 Application layer protocol is meant to be on top of TCP IP protocol therefore the transport protocol choice will fall on TCP Now we have all the information needed to configure our system With our microcontroller we can now issue to the Telit module the following AT commands AT CGDCONT 1 IP internet gprs 0 0 0 0 0 0 lt cr gt 1 GPRS context setting For all the socket settings the following AT command will be used AT SCFG 1 1 300 90 600 50 OK Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 42 of 63 rA Telit Easy GPRS User Guide 80000ST 10028 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
44. nnection because the network has not enough resources to guarantee that quality of service If does this happen then you shall try reducing your minimum quality requirements For example 1 Let s assume you want to set up the GPRS context number 1 cid written before with your GPRS min QoS parameters Precedence class Normal priority Delay class subscribed Reliability class subscribed Peak throughput not less than 15 6 kbps Mean throughput not less than 7 8 kbps command AT CGQMIN 1 2 0 0 5 4 lt cr gt response OK NOTE Telit suggests to setup AT CGQMIN 1 0 0 0 0 0 1 2 3 Requested Quality of the Service The requested quality of service parameters represents the connection quality that is requested to the network on GPRS context activation e send command AT CGQREQ lt cid gt lt precedence gt lt delay gt lt reliability gt lt peak gt lt mean gt lt cr gt where lt cid gt is the index number of the desired context to be written up to 5 different context rill fena s j a f gt i _ ee 4 ME e De f h fe 3 ase 22h E 4 i o 2 f 7 r i ue gt l j f ti teh R AMD B ie j ll 4 i P p ERES A GVN A met 4 m j a a r _ b Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 13 of 63 rA Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 lt precede
45. nowledged GTP acknowledged LLC and RLC protected data 3 reliability class 3 unacknowledged GTP and LLC acknowledged RLC protected data 4 reliability class 4 unacknowledged GITP LLC and RLC protected data 5 reliability class 5 unacknowledged GTP LLC and RLC unprotected data lt peak gt is the peak data transfer throughput 0 subscribed default 1 up to 7 8 kbps 2 upto15 6 kbps 3 up to 31 3 kbps 4 up to 62 5 kbps 5 up to 125 kbps 6 up to 250 kbps 7 up to 500 kbps 8 up to 1000 kbps 9 up to 2000 kbps lt mean gt is the mean data transfer throughput 0 subscribed default 1 up to 0 8 kbps 2 upto 1 6 kbps 3 upto 3 9 kbps 4 upto 7 8 kbps 5 up to 15 6 kbps 6 up to 39 kbps 7 up to 78 kbps 8 up to 156 kbps 9 up to 390 kbps 10 up to 7 6 Mbps 11 up to 15 2 Mbps 12 up to 38 2 Mbps 13 up to 76 3 Mbps 14 up to 152 Mbps 15 up to 381 Mbps 16 up to 762 Mbps 17 up to 1525 Mbps 18 up to 3815 Mbps p p tions S p A written authorization All Rights Reserve d page 12 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 31 Best Effort e wait for response Response Reason Action OK context parameters have been proceed ahead successfully stored ERROR some error occurred check parameters and retry NOTE If your minimum requirements are too high then it can happen that it is impossible to establish a GPRS co
46. ntly discarded d Ea Hi a y A a TA bog i 4 Zs 4 i i gt Pa r fe E ase iby gt A Sin 7 A 5 7 gt j ur fa Fim T NS Bb Fee j A T E RZ pi r a 4 mis J Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 26 of 63 7 Telit Easy GPRS User Guide 80000ST10028 Rev 4 16 07 08 When packet incomes from the IP address lt incoming IP gt the firewall chain rules will be scanned for matching with the following criteria lt incoming IP gt amp lt net mask gt lt ip address gt 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 For example let s assume we want to accept connections only from our devices which are on the IP addresses ranging from 197 158 1 1 to 197 158 255 255 We need to add the following chain to the firewall AT FRWL 1 197 158 1 1 255 255 0 0 2 1 2 2 Request the socket connection to be opened in listen The new listen command is now extended to 6 connections it s possible to set from 1 to 6 socket listening on a specific port for the incoming connections Another difference with the old IP Easy is that now we receive an unsolicited indication when someone tries to connect so we can decide to accept AT SA
47. on the remote server exactly to 25 Second thing we have to discover is whether the transport protocol has to be TCP or UDP on the RFC821 we can read that the SMTP Application layer protocol is meant to be on top of TCP IP protocol therefore the transport protocol choice will fall on TCP Now we have all the information needed to configure our system 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 0 0 0 lt cr gt GPRS context setting 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 The command gives as response 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 25 smtp domain com 0 0 lt cr gt When we receive the CONNECT indication then we are exchanging data with the SMTP server program on the remote host machine Following the SMTP protocol we proceed with the HELO presentation and mail delivery directly over the serial line in blu you can find the data sent by us in violet the one received from host 220 smtp domain com ESMTP Service 7 0 027 DD01 ready HELO pcprova lt cr gt lt lf g
48. one VA a massene he Sa wet mas Aj e Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 60 of 63 ne rA Telit Easy GPRS User Guide 80000ST 10028 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 Je 7 P gt Ky bs J Rist gt E Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 61 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 5 List of acronyms Abbreviation Description Ack APN AT CM CR CSD CTS DCD FTP GGSN GPRS GSM GTP HTML HTTP HSCSD IP ISDN ISP LCP LLC MS MT NCP OEM PAP PDP PDU PLMN PPP QoS RLC RoHS RTS SIM SKTM SMTP TCP Reproduction forbidd mH en without Telit Communications S p A written authorization All Rights Reserved Acknowledge Access Point Name Attention commands Command mode Carriage Return Circuit Switched Data Clear To Send Data Carrier Detected File Transfer Protocol Gateway GPRS Serving Support Node General Radio Packet Service Global System for Mobile communication GPRS Tunnelling Protocol Hyper Text Mark up Language Hypertext Transfer Protocol High Speed Circuit Switched Data Internet P
49. or refuse AT SH the incoming connection NOTE In case you decide to reject an incoming connection request the listening socket will be closed and if you want to re open it the AT command AT SL needs to be re issued The command syntax is AT SL lt Conn Id gt lt Listen state gt lt Listen port gt lt Closure Type gt It s not possible to have two Connld listening on the same port Example Suppose that we want to listen on port 6543 Connection Id number 2 AT SL 2 1 6543 OK Now the module is listening for incoming connection on port 6543 with Connection Id number 2 if a remote host is trying to connect we ll receive a SRING unsolicited indication with the listening Connection Id SRING 2 x Wis 25 ao TR ba wcetiil gt MAE Bae n e A tht 2 y ers bh E AEA t D i LII r ee en Ag a 4 ren lt these d E ean i 7 wer m j Ta Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 27 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 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 lt conn Id gt Example We are listening on Connection Id 3 and port 6543 AT SL 3 1 6543 OK A remote h
50. ost is trying to connect we receive the unsolicited indication SRING 3 Now we accept the connection AT SA 3 CONNECT We pass in online mode and the connection is established With the escape sequence we suspend the socket and the module is back to command mode To resume the suspended connection we can use the SO command described above 2 1 2 4 Checking the socket status with SS With the old IP Easy socket connection the possible states were online state or closed while with multisocket suspension we have other socket states With the new command AT SS we can see the status of all the six sockets The command syntax is AT SS Suppose that we have suspended some sockets and we are in command mode in order to verify which Connection Id has been opened we can use AT SS command to have a snapshot of sockets Status The command result is ag Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 28 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 SS lt Connld gt lt Status gt lt Local IP gt lt Local Port gt lt Remote IP gt lt Remote Port gt 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
51. plain lt cr gt lt lf gt charset iso 8859 1 lt cr gt lt lf gt Content Transfer Encoding 7bit lt cr gt lt lf gt lt cr gt lt lf gt This message is sent in order to test Easy GPRS feature Hello World lt cr gt lt lf gt lt cr gt lt lf gt lt cr gt lt lIf gt 250 2 0 0 h8J9QNH3008461 Message accepted for delivery QUIT lt cr gt lt lf gt 4 i ra aie 7 Vy ais A 4 GiT fa s E mess oe J a f Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 40 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 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 lt cr gt 1 GPRS context setting AT ESMTP smtp domain com lt cr gt 2 SMTP server setting AT EUSER module domain com lt cr gt 3 Authentication setting AT EPASSW telit lt cr gt 4 Authentication setting AT EADDR2 module telit net lt cr gt 5 Sender address setting AT HESAV 6 save settings NOTE Authentication settings could be different between GPRS and SMTP This is due to the fact that in the GPRS authentication it is requested user and password of your internet provider instead of the SMTP authentica
52. rom GPRS and encode the ones to be sent through the internet There are few considerations than must be done on the GPRS connections 7 Telit Easy GPRS User Guide 80000ST10028 Rev 4 16 07 08 e 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 e The controlling application of the module must have a TCP IP PPP software stack to interface with the GPRS modems e 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 e Because of the point before the receiving application must have internet access either e Since the communication is based upon TCP IP packets then it is possible to talk contemporarily with more than one peer e When required the data security in internet shall be guaranteed by security protocols over the TCP IP that must be managed by the controlling application A modem can be in 4 different states e GPRS DETACHED which corresponds to the not reachable condition for the GPRS service e GPRS ATTACHED which corresponds roughly to the registered condition for the GPRS service e GPRS context activated which corresponds to the reachable on the network condition with IP address assigned this is possible
53. rotocol Integrated Services Digital Network Internet Service Provider Link Control Protocol Logical Link Control Mobile Station Mobile Terminated Network Control Protocol Other Equipment Manufacturer Password Authentication Protocol Packet Data Protocol Protocol Data Unit Public Land Mobile Network Point to Point Protocol Quality Of Service Radio Link Control Reduction of Hazardous Substances Ready To Send Subscriber Identity Module Socket Mode Simple Mail Transfer Protocol Transmission Control Protocol 7 2 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 6 Document Change Log Revision ISSUE 0 ISSUE 1 ISSUE 2 ISSUE 3 ISSUE 4 Date 02 01 2007 14 03 2007 03 09 2007 29 11 2007 16 07 2008 wer Wy s H a li Ld 4 F ip 1i nt Jl e li lh A 4 a Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 63 of 63 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 05 such as command mode connections and IPEasy over GSM i ETA T Wty f gt l Y a Ee T7 a Is h P82 gt yy i l A ee ry Aes See a aren a mek o h
54. rst text mode AT SSEND 1 gt hello OK SRING 1 5 hello Send some data on the second hex mode AT SSEND 2 gt hello OK SRING 2 5 68656C6C6F Te 1 page 59 of 63 7 Telit 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 ATHSSEND 1 gt 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 4 Open a command mode connection with AT SA After using AT SL we have a lt connld gt listening on a specific port only for TCP connections If we receive an incoming connection an unsolicited code is raised AT SL 1 1 1000 SRING 1 Now we can accept the incoming connection AT SA 1 1 OK and we stay in command mode but the connection has been opened 4 3 5 Passing from command mode to online mode interface It s always possible to come back to online mode interface using the command AT SO lt connld gt Open an echo socket in command mode AT SD 1 0 10510 88 37 127 146 0 0 1 OK SRING 1 5 if LF i Cn wee ie e ar ur f WA lt ABA RYT Wel i i 7 A f f SS geass B
55. s on the serial line GET HTTP 1 1 lt cr gt lt lf gt Host www telit com lt cr gt lt lf gt Connection keep alive lt cr gt lt lf gt lt cr gt lt lf gt As a response to our query the HTTP server will reply with the HTML code of the homepage and some debugging responses that we will see directly on the serial line HTTP 1 1 200 OK Date Thu 06 2003 10 21 58 GMT Server Apache 1 3 27 Unix Last Modified Thu 06 2003 10 21 58 GMT Content Type text html Connection close lt IDOCTYPE HTML PUBLIC W3C DTD HTML 3 2 FINAL EN gt lt HTML gt here is all the HTML code of the page lt HTML gt lt pause gt lt pause gt OK AT SH 1 OK The Telit module is now back to command mode and the socket is closed page 50 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 3 3 2 FIP file transfer Let s suppose we want to send a file to a FTP server Define GSM context AT GSMCONT 0 IP 3359009000 lt cr gt OK GSM Context Activation as response gives IP of the module AT SGACT 0 1 lt cr gt SGACT 10 137 93 60 OK Opening of FTP connection AT FTPTO 1000 lt cr gt FTP settings of time out OK AT FTPOPEN 199 188 25 77 userid password O lt cr gt OK In this case the port of the FTP server is not specified which means that it has the default value 21 AT FTPTYPE 0 lt cr gt FTP settings of file type OK FTP file transfer
56. stening connection Id e Data amount SRING an unsolicited message is raised for every new packet received on a socket connection The message gives information on the connection id and on the number of bytes pending in the socket buffer e View data SRING in this message we have connection Id amount of buffered data by the socket and a string up to 64 chars with the dump of data extracted from the socket buffer An unsolicited is raised until the socket buffer is empty In this specific case we can decide to see data as text or as hex using the lt dataMode gt parameter default value is 0 text Note the data amount is updated until the maximum TCP windows size for reception is reached The command syntax is AT SCFGEXT lt connld gt lt srMode gt lt dataMode gt lt keepalive gt Where e lt connld gt is the connection identifier f i P y ERA g VR U f jf di Paes Beas n A iit PI lt ABA op Be gt LR AA zE E Le N 4 wane esz E i 7 em ig I wer m j f j Ta Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 55 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 e lt srMode gt is the unsolicited Sring mode e lt dataMode gt sets text or hex data view e lt KeepAlive gt sets TCP keepalive parameter in minutes up to 240 0 means keepalive disabled Examples e ATHSCFGEXT 1 1 0 0 So
57. sumption as shown in the figure below Socket is still alive Data l S i a ae On Line Suspend On Line Suspend This new feature allows users to switch between online mode and command mode without closing the connection and eventually opening another socket or resuming the suspended one FTP or EMAIL connection Cad Pi Z f Mes fe z En 2 A f Pa P i bf 7 9 FS EN Sig 4 j E rs L A as mh 7 Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 19 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 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 1 Commands Overview In the following paragraphs you can find new AT commands sequence that activates GPRS context sets and opens the socket connection You can also find the explanation regarding new listen command and how to use FTP and IP Easy at the same time NOTE For more detailed AT commands and parameters definitions remember to consult the AT Commands Reference Guide 2 1 1 Easy GPRS Outgoing Connection The Easy GPRS feature provides a way to place outgoing TCP UDP connections and
58. t 250 smtp domain com AUTH LOGIN lt cr gt lt lf gt authentication method i wer m Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 39 of 63 rA Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 334 VXRicm8gkXU6 Z204Nj JAZG9ItYWluLmMNvbQ lt cr gt lt lf gt module domain com base64 encoding 334 UHFzc6dcvmQ6 dGVsaXQ lt cr gt lt lf gt telit base64 encoding 235 2 0 0 OK Authenticated MAIL FROM module domain com lt cr gt lt lf gt Sender 250 2 1 0 module domain com Sender ok RCPT TO receiver server net lt cr gt lt lf gt Receiver 250 2 1 5 receiver server net Recipient ok DATA lt cr gt lt lf gt 354 Enter mail end with on a line by itself Return Receipt To lt module domain com gt lt cr gt lt lf gt Reply To lt module domain com gt lt cr gt lt lf gt From lt module domain com gt lt cr gt lt lf gt To lt receiver server net gt lt cr gt lt lf gt Subject Email test lt cr gt lt lf gt Date Fri 19 Sep 2003 11 41 32 0200 lt cr gt lt lf gt MIME Version 1 0 lt cr gt lt lf gt X Priority 3 Normal lt cr gt lt lf gt X MSMail Priority Normal lt cr gt lt lf gt X Mailer GM862 TELIT SW Build 1 0 1000 1 0 1111 0 lt cr gt lt lf gt Importance Normal lt cr gt lt lf gt X MimeOLE Produced By GM862 TEST SW lt cr gt lt lf gt lt cr gt lt lf gt Content Type text
59. t the boundary under which the connection quality is not anymore acceptable and will be terminated e send command AT CGQMIN lt cid gt lt precedence gt lt delay gt lt reliability gt lt peak gt lt mean gt lt cr gt where lt cid gt is the index number of the desired context to be written up to 5 different context lt precedence gt is the precedence class It is applied when the network has a heavy duty and user precedence must be followed to ensure operations the higher the priority the better the service 0 subscribed default 1 High priority 2 Normal priority 3 Low priority lt delay gt is the delay class It represents the maximum allowable time delay class between the sending and the reception of a packet z her p pij J Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 11 of 63 Reproduction forbidden without Telit Communica O subscribed default 1 delay class 1 2 delay class 2 3 delay class 3 4 delay class 4 best effort O subscribed default 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 lt reliability gt is the connection reliability class It represents the connection reliability requested the higher is the number the less reliable is the data exchanged 1 reliability class 1 acknowledged GITP LLC and RLC protected data 2 reliability class 2 unack
60. ters User Name and Password depending on the Internet Service Provider that we want to connect to So the command syntax is the same as for GPRS SGACT 0 lt Status gt lt Username gt lt Password gt Where e Q0 is the context that we want to activate deactivate e Status is the context status 0 means deactivation 1 activation Example We want to activate GSM context defined with GSMCONT Command AT SGACT 0 1 Answer SGACT 10 137 93 60 OK if activation success ERROR if activation fails The response code to the AT SGACT 0 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 ag Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 47 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 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 HSGACT 10 137 93 60
61. text filling in the information of APN in this example ibox tim it Next step is activation of GPRS context which gives as reply the IP of the module assigned by network AT SGACT 1 1 SGACT 217 201 142 223 OK Before opening socket in listen it is possible to define an accept firewall chain in order to filter IP of the senders At the end with AT command AT SL 1 1 1024 0 the socket will be set in listen on the port 1024 Configuration for the module that opens connection client Define PDP Context AT CGDCONT 1 IP ibox tim it 0 0 0 0 GPRS Context Activation ATHSGACT 1 1 Socket Dial AT SD 2 0 1024 217 201 142 223 First you have to define PDP context filling in the information of APN in this example ibox tim it Next step is activation of GPRS context which gives as reply the IP of the module assigned by network Now you can open the connection with the remote host with IP address 217 201 142 223 on the port 1024 as in example NOTE IP of the modules can be verified with the following AT command line ATHCGPADDR a wer m j tions S p A written authorization All Rights Reserved page 44 of 63 Reproduction forbidden without Telit Communica 7 Telit Easy GPRS User Guide 80000ST 10028 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 st
62. th Data view SRING Qu ccccceccceeeeeeeeeeeeeceeeceeeceeeceeeeeeeeeceeeeeeeeeeeees 59 4 3 4 Open a command mode connection With ATHSA cc ccccccccscssscseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeess 60 4 3 5 Passing from command mode to online mode interface 00 0 ceeseeeeeeeeeeeenceeceeeeeceeececeeeeeeeeeeeeeeeeeeeeeeeeeeeees 60 Listof acronyms soso cece s eee cenescoceccessescegeesececueseeaceaecceseesseeysceqescecesuceuetseeseaesuedceupsseeeuceseeeteuesceestaeeeece 62 DOC UMMC INE Chanot TO aiaa E EE E E E 63 page 4 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 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 Telit makes every effort to ensure the quality of the information it makes available Notwithstanding the foregoing Telit does not make any warranty as to the information contained herein and does not accept any liability for any injury loss or damage of any kind incurred by use of or reliance upon the information Telit disclaims any and all responsibility for the application of the devices characterized in this document and notes that the
63. the server with the meteorological data and gives them to the Telit module to deliver The central server has a single modem to connect to the internet receives the TCP IP packets from all the remote units and places the contained data in the central database The advantage of using GPRS is that the remote unit is always connected and reachable and it pays only for the amount of data small transferred and not for the connection time as in CSD operations in addiction the call billing is equal for devices placed anywhere in the Network Operator State and the server can be anywhere in the World Furthermore in the CSD operation the server shall have a set of modems and multiple phone lines to ensure that the calling units will not find it busy while a single modem is enough for GPRS operation The speed at which the packets can be downloaded is up to 57600 bps class 10 device working at 4 1 4 times faster than CSD In the following paragraphs more detailed information will be given on how to establish GPRS connection 2 E Hi a y A a D amp j 4 i 4 i d gt s fe 3 ase iby gt Ses Cf 7 z gt r ww ur h ST PET N BaD Bad Z CER PRS Bi Sa m A y T s Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 9 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 1 2 Preliminary GPRS
64. the IP address assigned to the module by the network AT SD 1 0 110 POP mail server 0 0 lt cr gt When we receive the CONNECT indication then we are exchanging data with the POP3 server program on the remote host machine Following the POP3 protocol we can proceed with the authentication directly over the serial line in blue you can find the data sent by us in violet the one received from host OK POP3 PROXY server ready 7 0 027 lt A6B4DDEA93433C73A01 pop4 libero it gt USER module domain com lt cr gt lt lf gt OK Password required PASS telit lt cr gt lt lf gt OK 1 messages LIST r n OK 1 19550 RETR 1 lt cr gt lt lf gt OK 19550 bytes Return Path lt module domain com gt Received from smtp5 libero it 193 70 192 55 by ims2d libero it 7 0 028 id 40DFC49A010E5708 for test libero it Tue 17 Aug 2004 12 24 02 0200 Received from smtp telital com 194 185 15 65 by smtp5 libero it 7 0 027 DD01 QUIT lt cr gt lt lIf gt OK POP3 server closing connection OK AT SH 1 OK page 43 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 2 4 4 Remote connection between two modules Configuration for the module that receives data server Define PDP Context AT CGDCONT 1 IP ibox tim it 0 0 0 0 GPRS Context Activation AT SGACT 1 1 Firewall Setup ATHFRWL 1 198 158 1 1 0 0 0 0 Socket Listen AT SL 1 1 0 1024 First you have to define PDP con
65. the Telit module regardless of all the software stacks underlying An example of the protocol stack involved in the devices is reported N Virtual Serial Link Driver page 18 of 63 rA Telit 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 New functionality of the Telit modules multisocket is an extension of Telit Easy GPRS feature which allows the user to have two contexts activated that means two different IP address more than one socket connection with a maximum of 6 and simultaneous FTP client and EMAIL client service The basic idea of multisocket is the possibility of suspend a socket connection with the escape sequence With IP Easy we can use the command SKTD to open a socket connection and go online When the online activities are concluded we use sequence to close the connection see the figure below Online mode Data Iraftic On Line The green part represents the module command mode while the red part is the online mode Now the online mode can be suspended with the escape sequence by using the multisocket feature During suspend mode the data received by the socket will be buffered These data will be displayed after socket re
66. the following picture where the GPRS connection is between the GPRS modem and the internet as if all the devices inside the dashed line are not present j aiie M CSP ma Public i EE Internet OEM er intranet GPRS interconnectivity Due to this kind of connection when activating the GPRS connection you must provide the network parameters to enter through the internet point of the GPRS network ISP Internet Service Provider and not the phone number to be dialled therefore it is not possible to establish a direct point to point GPRS connection between two modems as in CSD case instead an internet tunnelling must be done to achieve a point to point connection between two peers This approach as the immediate advantage of projecting the controlling application of the GPRS modem directly on the internet ready to be accessed virtually from anywhere in the world at the same cost on the GPRS actually the billing of the GPRS connection is based on the amount of data exchanged number of packets transferred independently from the time the connection is active or where these packet must be delivered Therefore it is possible to leave the controlling application always connected and ready to receive send data on demand while paying only for the data really exchanged The drawback of the GPRS connection is that the controlling application must have its own TCP IP protocol stack embedded to decode the packets that arrive f
67. tion of APN in this example ibox tim it Next step is activation of GPRS context which gives as reply the IP of the module assigned by network AT SGACT 1 1 SGACT 217 201 142 223 OK Now on the server side before opening socket in listen it is possible to define an accept firewall chain in order to filter IP of the senders Then with the AT command AT SL 1 1 1024 0 the socket will be set in listen on the port 1024 Firewall Setup AT HFRWL 1 217 201 142 223 0 0 0 0 Socket Listen AT SL 1 1 1024 On the client side you can open the connection with the remote host with IP address 217 200 58 225 on the port 1024 as in example socket Dial AT SD 2 0 1024 217 200 58 225 NOTE IP of the modules can be verified with the following AT command line ATHCGPADDR i wer m Reproduction forbidden without Telit Communica tions S p A written authorization All Rights Reserved page 52 of 63 rA Telit 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 Data Iraiffi 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 If we receive
68. tion where user and password is used to connect to the SMTP server Now we need to activate the GPRS context AT SGACT 1 1 EASY GPRS EASY GPRS SGACT 193 199 234 255 OK This AT command gives as response the IP address of the module assigned by the network After receiving the OK indication we can finally send an EMAIL AT EMAILD receiver domain com Email test 0 gt this message is sent in order to test the Easy GPRS feature Hello World CTRL Z NOTE SMTP works only on context one ATHSGACT 1 1 Imi gt gt 7 f j E 7 J Ee i s A IIE 7 gt 5 5 A Pe j i o 48 BEY 7 j s n 4 bi f JGR 4 v j 4 A AE B Ha f ti tye lt FEM Bg VNA i TESS 4 i F A 7 Be 2 D G 4 ern 3 ve lt poe a 2 A ms d ee b Reproduction forbidden without Telit Communications S p A written authorization All Rights Reserved page 41 of 63 7 2 Telit Easy GPRS User Guide 80000ST 10028 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 POPS server Initial data Server to be contacted POP mail server POP service port 110 Application Layer Protocol POP3 RFC1785 Receiver module lt module domain com gt Email account username module domain com Email account password telit GPRS settings APN internet gprs IP of GPRS device dynamically assigned by the
69. to the server in the file named file txt AT HFETPPUT file txt lt cr gt CONNECT send the file escape sequence to close the data connection NOCARRIER AT FTPCLOSE lt cr gt closing FTP connection OK Deactivation of GSM context if required AT HSGACT 0 0 lt cr gt OK 3 3 3 Remote connection between two modules In this example we send data from a module using EASY GPRS to a module using EASY GSM Configuration for the module that receives data server ia 7 Eeppi 3 E Al f if ae z aN b ATTA SNA a f IH g r Pan y pu m a AS zm j P ast es i j 5 7 ee F r as y f eo S E 7 OO Bg 3 ha F ta r r A wg i A aa iy WA 4 a aiiis ere l raki etit pr i m f j page 51 of 63 7 Telit Easy GPRS User Guide 80000ST 10028 Rev 4 16 07 08 Define GSM Context AT GSMCONT 0 IP 3359009000 0 0 0 0 GPRS Context Activation AT HSGACT 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 225 OK Configuration for the module that opens connection client Define PDP Context AT CGDCONT 1 IP ibox tim it 0 0 0 0 GPRS Context Activation AT HSGACT 1 1 You have to define PDP context filling in the informa

Download Pdf Manuals

image

Related Search

Related Contents

2:4 Échappement, système de `    

Copyright © All rights reserved.
Failed to retrieve file