Arduino Forum

Products => Arduino GSM Shield => Topic started by: nchstp30 on May 14, 2013, 08:49 am

Title: submitting data to google docs/form using httpPOST/ httpGET
Post by: nchstp30 on May 14, 2013, 08:49 am
Hi,

I am a newbie and trying to post data to google forms using httpPOST/ httpGET with arduino duemilanove and Icomsat v1.1. I have tried the following syntax address in my web browser and succeeded, but failed with arduino.

https://docs.google.com/forms/d/1HX*************I/formResponse?pli=1&ifq&entry.1******5=1016&entry.4********6=235.65&submit=Submit

The following are the POST & GET used with arduino

numdata=inet.httpGET("https://docs.google.com", 80,"/forms/d/1HX**************************/formResponse?entry.1******5=1016&entry.4******6=235.65&submit=Submit", msg, 50);

numdata=inet.httpPOST("https://docs.google.com", 80, "/forms/d/1HX**************************/","formResponse?entry.1******5=1016&entry.4******6=235.65&submit=Submit", msg, 50);

Both of the above are failed! Please help me out! whether it doesn't work with https:// or where am i doing wrong? if it is not possible this way, is there any other way? I have problems with AT commands also!

Thank you!
--Santhosh
Title: Re: submitting data to google docs/form using httpPOST/ httpGET
Post by: nchstp30 on May 14, 2013, 02:30 pm
it seems https (secured) might not work! and I found a solution at http://productforums.google.com/forum/#!topic/docs/f4hJKF1OQOw (http://productforums.google.com/forum/#!topic/docs/f4hJKF1OQOw). But we have to work on direct submission to google forms as we dont know what if the pushingbox.com shuts down. But a great free service provided by pushingbox.com and must be appreciated!

regards
--Santhosh
Title: Re: submitting data to google docs/form using httpPOST/ httpGET
Post by: nchstp30 on May 14, 2013, 07:07 pm
Now i got one more problem with inet.httpGET char*path below. the following syntax is working

inet.httpGET("api.pushingbox.com", 80, "/pushingbox?devid=v****8&Temperature=30.65", msg, 0);

But I need to put a variable in place of 30.65 in a void loop() as in the following code

float Temp;

void loop()
{
Temp  =  analogRead(tempPin);
inet.httpGET("api.pushingbox.com", 80, "/pushingbox?devid=v****8&Temperature=?Temp?", msg, 0);
delay(1000);
}

What should i place instead of ?Temp? in above line?

Thank you
--Santhosh
Title: Re: submitting data to google docs/form using httpPOST/ httpGET
Post by: atkam on Nov 14, 2013, 07:24 pm

Anyone already solve this problem?

How to put variable in inet.httpGET or inet.httpPOST    ?:

Is a similar problem as describe "nchstp30" in previous post.

thankyou
 
Title: Re: submitting data to google docs/form using httpPOST/ httpGET
Post by: LABwilliam2015 on Dec 15, 2015, 06:18 pm
I got this working using the SIM900A. This has been open since 2013.

nchstp30 got it right.

Google Forms (Docs) accepts https by default. In other words, the Arduino would send the message but Google would direct to secure communication (https) and then issues a 301 (page moved). You will need to use a 3rd party service that would accept http traffic and then encrypt (https) to submit to Google Forms.

pushingbox.com still works.

numdata=inet.httpGET("api.pushingbox.com", 80, "/pushingbox?devid=vXXXXXXXXXXXX&status=speaking", msg, 300);

I would have though that posting data from Arduino to Google services would have been easier using a GSM shield. Most tutorial makes use of an Ethernet connection but this is not always available. Yes the SIM900A is an older module but one has to use what you can get your hands on.