Internet through GPRS using telit GL 865 GSM/GPRS modem

androidFan picture androidFan · Jul 13, 2011 · Viewed 12.2k times · Source

I'm working on the Telit GL-865 GSM/GPRS Modem kit for research purposes. I have connected it to my pc using a serial port and got the terminal access using Putty.

I can successfully execute all AT commands to send/receive sms, make voice calls, etc.

I can also set a GPRS context using AT+CGDCONT and open a connection to server using AT#SKTD and can send GET and POST requests. I also get the HTTP response with all headers properly.

However for some websites, I do not get proper response. For eg. - www.google.com If I send :

AT#SKTD=0,80,"www.google.com"
CONNECT
GET /<cr><lf>
<cr><lf>

I get the following response :

HTTP/1.0 302 Found
Location: http://www.google.co.in/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=80125e212d950ff8:FF=0:TM=1310555250:LM=1310555250:S=lwD7-OUKPeiBwCri; expires=Fri, 12-Jul-2013 11:07:30 GMT; path=/; domain=.google.com
Date: Wed, 13 Jul 2011 11:07:30 GMT
Server: gws
Content-Length: 221
X-XSS-Protection: 1; mode=block

<HTML>
<HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE>
</HEAD>
<BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.co.in/">here</A>.
</BODY>
</HTML>

Also I cannot access www.wiley.com to test CGI scripts. I get CONNECT as a response to AT#STKD but before I can complete typing the request header I get a NO CARRIER message.

Answer

Niko Gamulin picture Niko Gamulin · Jul 21, 2011

Have you established the PDP context correctly?

Below are the commands and responses I used working with Telit GM862 and it worked well:

AT#USERID="username" //set username provided by mobile operator
AT#PASSW="password" //set password provided by mobile operator
AT+CGDCONT=1, "IP", "internet","0.0.0.0",0,0
AT#SKTSAV //save settings

AT#GPRS=1 //check if PDP context is established - if it is it should return the IP

+IP: 188.196.98.28

OK

AT#SKTD=0,80,"google.si",0,0

CONNECT

GET / HTTP/1.1<cr><lf> 
Host: www.google.si<cr><lf>
Connection: keep-alive<cr><lf>
<cr><lf>
HTTP/1.1 200 OK
Date: Fri, 27 May 2011 09:39:49 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-2
Set-Cookie: PREF=ID=2420df534f6e850f:FF=0:TM=1306489189:LM=1306489189:S=i3qJtsLHuyMMmV9q; expires=Sun, 26-May-2013 09:39:49 GMT; path=/; domain=.google.si
Set-Cookie: NID=47=VGbr367EMHD9yp5XA61kWaWL37G_zBAIhy1CbRlEr3br0rcdM-H93M3Imfhm1ccDZiKjV2GhK3gZrg_LIbuz2ycgAZsGOGU1a29VXt7UahnmEqxcXMsG2JJc8GfaNsoM; expires=Sat, 26-Nov-2011 09:39:49 GMT; path=/; domain=.google.si; HttpOnly
Server: gws
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked

1000
<!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-2"><title>Google</title><script>...</script>
0

NO CARRIER