I am working on a project for sending data to a webserver with HTTP protocol (GET or POST method).
my problem is in the meaning and perpose of ""responseFilename"" and how could i work with it?
the Filename where the HTTP server response will be stored.
Here is my approach:
#include <SoftwareSerial.h>
#include <String.h>
SoftwareSerial gprsSerial(7 ,8);
void setup() {
// put your setup code here, to run once:
gprsSerial.begin(19200);
Serial.begin(19200);
delay(2000);
gprsSerial.println("AT+CGDCONT=3,\"IP\",\"weborange\"");
toSerial();
delay(2000);
gprsSerial.println("AT+UHTTP=0");
toSerial();
delay(2000);
gprsSerial.println("AT+UHTTP=2,1,\"www.navtec.16mb.com\"");
//AT+UHTTP=<profile_id>,<op_code>,<HTTP_server_name>
toSerial();
delay(2000);
gprsSerial.println("AT+UHTTP=0,5,80");
toSerial();
delay(2000);
}
void loop() {
//gprsSerial.println("AT+UHTTP=2,1,\"submit\"");
//AT+UHTTP=<profile_id>,<op_code>,<param_val>[,<param_val1>]
//toSerial();
//delay(2000);
gprsSerial.println("AT+UHTTPC=2,1,\"/add.php\",\"filename\""); //Problem here!!!!!!!!
//AT+UHTTPC=<profile_id>,<http_command>,<path>,<filename>[,<param1>[,<param2>[,<param3>]]]
toSerial();
delay(2000);
}
void toSerial()
{
while(gprsSerial.available()!=0)
{
Serial.write(gprsSerial.read());
}
}
This is what I get:
+CGDCONT=3,"IP","weborange"
OK +UHTTP=0
OK +UHTTP=2,1,"www.navtec.16mb.com"
OK +UHTTP=0,5,80
OK +UHTTPC=2,1,/add.php,filename
ERROR +UHTTPC=2,1,/add.php,filename
ERROR +UHTTPC=2,1,/add.php,filename
ERROR +UHTTPC=2,1,/add.php,filename
ERROR ...
Thanks for your time, I am waiting for your support, any ideas could help. Sorry for my bad English