4 examples, 1 easy gprs - http client application – Rainbow Electronics GM862-QUAD-PY User Manual

Page 36

Advertising
background image





Easy GPRS User Guide

80000ST10028 Rev. 4 - 16/07/08

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

page 36 of 63

2.4 Examples

1

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
sending)

300

Socket inactivity timeout

90

Connection timeout

600

Data sending time out

50




Checking 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<cr>

(GPRS context setting)


1

NOTE: For the detailed information about AT commands reported in examples please consult AT Commands

Reference Guide

Advertising