omerjerk
Newbie level 2
- Joined
- Apr 20, 2013
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,293
I've got a SIM300 GPRS Module . And I want to make an HTTP Request to a PHP file with my GPRS Module.
This is the code of my AT Commands :
But in return from the server I'm getting 400 Bad Request. How to make it working ?
This is the code of my AT Commands :
Code:
{
if(firstTimeInLoop){
GPRS.write("AT+CGATT=1");
GPRS.write("\n\r");
GPRS.write("AT+CGDCONT=1,\"IP\",\"airtelgprs.com\"");
GPRS.write("\n\r");
GPRS.write("AT+CDNSCFG=\"208.67.222.222\",\"208.67.220.220\"");
GPRS.write("\n\r");
GPRS.write("AT+CSTT=\"airtelgprs.com\",\"\",\"\"");
GPRS.write("\n\r");
GPRS.write("AT+CIICR");
GPRS.write("\n\r");
GPRS.write("AT+CIFSR");
GPRS.write("\n\r");
GPRS.write("AT+CIPSTATUS");
GPRS.write("\n\r");
GPRS.write("AT+CIPHEAD=1");
GPRS.write("\n\r");
GPRS.write("AT+CDNSORIP=1");
GPRS.write("\n\r");
GPRS.write("AT+CIPSTART=\"TCP\",\"www.nationalyouthparty.org\",\"80\"");
GPRS.write("\n\r");
GPRS.write("AT+CIPSEND");
GPRS.write("\n\r");
GPRS.write("GET /stick/mail.php HTTP/1.1");
GPRS.write("Host: www.nationalyouthparty.org");
GPRS.write("Connection: keep-alive");
GPRS.write("Accept: */");
GPRS.write("*");
GPRS.write("Accept-Language: en-us");
GPRS.write(ctrlZ);
GPRS.write("\n\r");
firstTimeInLoop = 0;
}
But in return from the server I'm getting 400 Bad Request. How to make it working ?