4 request the gprs context to be activated, 5 open the connection with the internet host – Telit Wireless Solutions Easy GPRS User Manual

Page 19

Advertising
background image





Easy GPRS User Guide

80000ST10028 Rev. 1 - 14/03/07

Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved

page 19 of 37

2.1.1.4 Request the GPRS context to be activated

With the command #GPRS you can activate or deactivate a GPRS context INDEPENDENTLY from
the TCP socket opening:

AT#GPRS=1 activates the context,
AT#GPRS=0 deactivates the context


Therefore with the AT#GPRS=1 command the module:

• Telit module activates the context previously defined with AT+CGDCONT
• Telit module proceeds to the authentication with the parameters specified


Note that activating a context implies getting an IP address from the network and this will be
maintained throughout the session.
The response code to the AT#GPRS=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.

2.1.1.5 Open the connection with the internet host

With the AT command #SKTD (socket Dial) the TCP/UDP request to connect with the internet host
starts:

• DNS query is done to resolve the IP address of the host name internet peer

• Telit module establishes a TCP/UDP (depending on the parameter request) connection with the

given internet host

• Once the connection is up the module reports the code: CONNECT


NOTE: all peer specifications of this socket Dial are within the command and not the one stored with
#SKTSET command.
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.

NOTE: when disconnecting the #SKTD command does not close the GPRS context, leaving it active
for next connections until an AT#GPRS=0 command is issued or the network requests a context
closing.

2.1.1.6 Close the Socket without deactivating the context

The connection can be closed for the following reasons:

• remote host TCP connection close

• socket inactivity timeout

• Terminal Equipment by issuing the escape sequence "+++"

• Network deactivation

Advertising