Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

data sent through gprs modem

Status
Not open for further replies.

lionheart123

Newbie level 3
Joined
Jan 16, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
nepal
Activity points
1,330
void Send_Via_GPRS(void)
{
printf("AT\r");
L_delay();


printf("AT+CGATT=1\r");
L_delay();


printf("AT+CGDCONT=1,\"IP\",\"APN\"\r")
L_delay();


printf("AT+CSTT=\"APN\"\r");
L_delay();


printf("AT+CIICR\r");
L_delay();


printf("AT+CIFSR\r");
L_delay();


printf("AT+CIPSTATUS\r");
L_delay();


printf("AT+CDNSORIP=0\r");
L_delay();
printf("at+cipstart=\"TCP\",\"ip address\",\"80\"\r");
L_delay();
printf("AT+CIPSEND\r");
L_delay();

printf("GET /test1.php?lat=40&long=30 HTTP/1.1");
putchar(0x0d);
putchar(0x0a);
printf("Host: www.xyz.com");
putchar(0x0d);
putchar(0x0a);
putchar(0x0d);
putchar(0x0a);
putchar(0x1a);
L_delay();
}
these are the command i tried in u-controller with baud rate at 4800 for simcom modem.

response of my modem is as follows:
AT+CGATT=1
OK
AT+CGDCONT=1,"IP","APN"
OK
AT+CSTT="APN"
OK
AT+CIICR
OK
AT+CIFSR
10.16.22.87
AT+CIPSTATUS
OK

STATE: IP STATUS
AT+CDNSORIP=0
OK
AT+CIPSTART="TCP","ip address","80"
OK

CONNECT OK
AT+CIPSEND
> GET /test1.php?lat=12&long=13 HTTP/1.1
Host: www.xyz.com

SEND OK

CLOSED
HTTP/1.1 400 Bad Request
Date: Sat, 06 Mar 2010 16:02:51 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passth
rough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Content-Length: 488
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Req
uest</title>
</head><body>
<h1>Bad Request</h1>


Your browser sent a request that
this server could not understand.

Request header field is missing ':' sepa
rator.

<pre>
</pre>
</p>
<hr>
<address>Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2
mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at 9e.80.
84ae.static.theplanet.com Port 80</address>
</body></html>



the same command i tried with huperterminal its ok.
i dont know whats the problem with my http request in program.
i am in great trouble.
can any body help me whats the problem as soon as possible.
 

any body have any idea on how to data sent through gprs modem....??Im also work on it but not using PIC....any body can help....
 

haiqal said:
any body have any idea on how to data sent through gprs modem....??Im also work on it but not using PIC....any body can help....

Did you get an answer?
 

check your server ok
restart gprs modul try it with same commands
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top