Hi,
I'm trying to update a google form using a sim900 module via AT Commands
Below is the blank google form one would usually fill in and submit, and below that is the link that submits prewritten data to the form.
i have been using the HTTP GET action to post data previously and replaced the url with the one above that submits the data however i receive the following error.
+HTTPACTION:0,301,344
AT+HTTPREAD
+HTTPREAD:344
Moved PermanI have tried with both HTTPACTION 1 and 0 but it still doesn't work, it seems to think the page has been permanently moved which is not the case.
below is the code i'm using
any help would be appreciated.
String string1 = "AT+HTTPPARA=\"URL\",\"www.docs.google.com/forms/d/1mnbwJdwlmSv_bVcAERTv1iUyFLDkN-O7VzE1KDe2XDo";
String string2 = "/formResponse?ifq&entry.157322808=62&entry.1562700430=99&submit=Submit\"";
void SubmitHttpRequest()
{
mySerial.println("AT+CSQ");
delay(100);
ShowSerialData();// this code is to show the data from gprs shield, in order to easily see the process of how the gprs shield submit a http request, and the following is for this purpose too.
mySerial.println("AT+CGATT?");
delay(100);
ShowSerialData();
mySerial.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");//setting the SAPBR, the connection type is using gprs
delay(1000);
ShowSerialData();
mySerial.println("AT+SAPBR=3,1,\"APN\",\"internet\"");//setting the APN, the second need you fill in your local apn server
delay(4000);
ShowSerialData();
mySerial.println("AT+SAPBR=1,1");//setting the SAPBR, for detail you can refer to the AT command mamual
delay(2000);
ShowSerialData();
mySerial.println("AT+HTTPINIT"); //init the HTTP request
delay(2000);
ShowSerialData();
mySerial.print(string1);
mySerial.println(string2);
delay(1000);
ShowSerialData();
mySerial.println("AT+HTTPACTION=0");//submit the request
delay(10000);//the delay is very important, the delay time is base on the return from the website, if the return datas are very large, the time required longer.
//while(!mySerial.available());
ShowSerialData();
mySerial.println("AT+HTTPREAD");// read the data from the website you access
delay(300);
ShowSerialData();
mySerial.println("");
delay(100);
}