AT+CREG?
+CREG: 0,1
OK
AT+CGATT=1
OK
AT+CGDCONT=1,"IP","MCINET",,0,0 (///// [url]www.mci.ir[/url])
OK
AT+CDNSCFG="62.193.15.159","206.223.171.254"
ERROR
AT+CDNSORIP=1
ERROR
AT+CSTT="MCINET"
ERROR
AT+CIICR
ERROR
at+cifsr
ERROR
AT+CIPSTATUS
ERROR
AT+CIPHEAD=1
ERROR
AT+CIPSTART="TCP","www.yahoo.com","80"
ERROR
AT+CIPSEND
ERROR
>> AT+CGATT=1 - Attach to GPRS Service
<< OK
>> AT+CGDCONT=1,"IP","telkomsel" -
<< OK
>>AT+CSTT="telkomsel","wap","wap123"
<< OK
>> AT+CIICR
<< OK
>> AT+CIFSR
<< 182.8.224.31
<< OK
>> AT+CDNSCFG="167.205.44.3","167.205.30.5"
<< OK
>> AT+CIPSTATUS
<< OK
<< STATE: IP STATUS
>> AT+CIPHEAD=1 - Tells module to add an 'IP Header' to receive data
<< OK
>> AT+CIPSTART="TCP","167.205.55.7","80"
<< OK
<< CONNECT OK
>> AT+CIPSEND
<< >
>> GET /sensor/indexx2.php?websensorco=7.8 HTTP/1.1
<?php
$outputCO=$_GET["websensorco"];
$con = mysql_connect("localhost","admin","admin");
mysql_select_db("ichi", $con);
$query = "INSERT INTO tabel5( tabelCO, tabelNO, tabelSO, Temp, date) VALUES ('$outputCO', '$outputNO', '$outputSO', '$outputTEMP', '$today')";
$result = mysql_query($query) or die("Anfrage fehlgeschlagen: " . mysql_error());
mysql_close($con);
?>
i am doing project vehicle tracking using gps and gprs . i have used same commands using hyperterminal . however TCP connection to google is successful using IP address instead domain name . then after > FET/HTTP/1.1 Then modem becomes hang and no respone is obtained untill modem is restarted. please help me. what can i do?Here's the commands you need to send. In the example below '>>' indicates data you send to the module, while'<<' indicates data returned from the module. This example is for connecting through the AT&T/Cingular network. You'll need to get the APN, user name and password for the network you are using.
First you need to open a PDP context.
Code:>> AT+CGATT=1 - Attach to GPRS Service << OK >> AT+CGDCONT=1,"IP","wap.cingular" - Define PDP Context (cid, PDP type, APN) << OK >> AT+CDNSCFG="208.67.222.222","208.67.220.220" - Configure Domain Name Server (primary DNS, secondary DNS) << OK >> AT+CSTT="wap.cingular","wap@cingulargprs.com","cingular1" - Start Task & set APN, User ID, and password << OK >> AT+CIICR - Bring up wireless connection with GPRS - THIS MAY TAKE A WHILE << OK >> AT+CIFSR - Get Local IP address << 10.190.245.172 - returns IP address assigned to your module << OK >> AT+CIPSTATUS - Get Connection Status << OK << STATE: IP STATUS - returns status of connection, needs to be 'IP STATUS' before you can connect to a server
After you have context, you need to make a connection to the server and then send your data.
Code:>> AT+CIPHEAD=1 - Tells module to add an 'IP Header' to receive data << OK >> AT+CDNSORIP=1 - Indicates whether connection request will be IP address (0), or domain name (1) << OK >> AT+CIPSTART="TCP","www.google.com","80" - Start up TCP connection (mode, IP address/name, port) << OK << CONNECT OK - Indicates you've connected to the server - IT MAKE TAKE A WHILE FOR THIS TO BE RETURNED >> AT+CIPSEND - Issue Send Command << > - wait for module to return'>' to indicate it's ready to receive data >> GET / HTTP/1.1 - Send data - this example is an HTTP request for the default page >> Host: [url]www.google.com[/url] >> Connection: Keep-Alive >> Accept: */* >> Accept-Language: en-us >> << data from server returned - Server will return data here
Here's the commands you need to send. In the example below '>>' indicates data you send to the module, while'<<' indicates data returned from the module. This example is for connecting through the AT&T/Cingular network. You'll need to get the APN, user name and password for the network you are using.
First you need to open a PDP context.
Code:>> AT+CGATT=1 - Attach to GPRS Service << OK >> AT+CGDCONT=1,"IP","wap.cingular" - Define PDP Context (cid, PDP type, APN) << OK >> AT+CDNSCFG="208.67.222.222","208.67.220.220" - Configure Domain Name Server (primary DNS, secondary DNS) << OK >> AT+CSTT="wap.cingular","wap@cingulargprs.com","cingular1" - Start Task & set APN, User ID, and password << OK >> AT+CIICR - Bring up wireless connection with GPRS - THIS MAY TAKE A WHILE << OK >> AT+CIFSR - Get Local IP address << 10.190.245.172 - returns IP address assigned to your module << OK >> AT+CIPSTATUS - Get Connection Status << OK << STATE: IP STATUS - returns status of connection, needs to be 'IP STATUS' before you can connect to a server
After you have context, you need to make a connection to the server and then send your data.
Code:>> AT+CIPHEAD=1 - Tells module to add an 'IP Header' to receive data << OK >> AT+CDNSORIP=1 - Indicates whether connection request will be IP address (0), or domain name (1) << OK >> AT+CIPSTART="TCP","www.google.com","80" - Start up TCP connection (mode, IP address/name, port) << OK << CONNECT OK - Indicates you've connected to the server - IT MAKE TAKE A WHILE FOR THIS TO BE RETURNED >> AT+CIPSEND - Issue Send Command << > - wait for module to return'>' to indicate it's ready to receive data >> GET / HTTP/1.1 - Send data - this example is an HTTP request for the default page >> Host: [url]www.google.com[/url] >> Connection: Keep-Alive >> Accept: */* >> Accept-Language: en-us >> << data from server returned - Server will return data here
HTTP/1.1 302 Found
Location: [url]https://www.google.co.in/[/url]
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: expires=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=wwwm
Set-Cookie: path=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=www.gom
Set-Cookie: domain=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=www.m
Set-Cookie: expires=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=.wwm
Set-Cookie: path=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=.[url]www.gm[/url]
Set-Cookie: domain=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=.wwwm
Set-Cookie: expires=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=goom
Set-Cookie: path=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=googlem
Set-Cookie: domain=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=googm
Set-Cookie: expires=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=.gom
Set-Cookie: path=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=.googlm
Set-Cookie: domain=; expires=Mon, 01-Jan-1990 00:00:00 GMT; path=/; domain=.goom
Set-Cookie: PREF=ID=a6aefc62c773b35f:FF=0:TM=1339691202:LM=1339691202:S=sL0yNVAm
Set-Cookie: NID=60=hMlSicQa9v8HrY0fV9ha1233WUvrv-Mh5p3iej6oNkSiLlWbAXb8LSXi4UW6y
P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/b"
Date: Thu, 14 Jun 2012 16:26:42 GMT
Server: gws
Content-Length: 221
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<>
>
d
.
</BODY></HTML>
at+cipstart="TCP","http://www.gsmtelemetry.ir/.....","80"
ok
connect ok
at+cipsend
>
get/post [I]**broken link removed**[/I] http/1.1
send ok
at+cipstart="TCP","http://www.gsmtelemetry.ir","80"
OK
CONNECT OK
at+cipsend
> get [I]**broken link removed**[/I]
Connection:Keep-Alive
SEND OK
+IPD195:HTTP/1.1 200 OK
Content-Type: text/html
Pragma: no-cache
Refresh: 1; URL=http://www.gsmtelemetry.ir/dataSR.aspx?devicenumber=123456789abcdef&Ana1=10&A na2=20
Connection: Close
<HTML></HTML>
CLOSED
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?