user18525: I am working on a project for tracking cars. I am using an Arduino UNO to receive the position from GPS/GPRS shield. I am OK on obtaining the coordinates position.
Now I need to send the position to a webserver and then show it on a webpage using the Google Maps API. Which accepts it in a POST or GET method.
Here is the shield model:
U-blox Sara G-350
and this is its manual here 
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

user18572: I worked on a project similar to yours. I think you forgot to establish a connection first.
Just add those lines of code at the top of setup() method:
 gprsSerial.println("AT+UPSDA=2,0"); //Reset connection
 toSerial();
 delay(2000);
  gprsSerial.println("AT+UPSD=2,1,\"weborange\""); //Establish a new one
 toSerial();
 delay(2000);
 gprsSerial.println("AT+UPSDA=2,3"); 
 toSerial();
 delay(2000);
 gprsSerial.println("AT+UPSND=2,0");
 toSerial();
 delay(2000);

I hope it works for you. Else, you can use AT+UHTTPER=2 after all to check for error source.

18525: <p>I am working on a project for tracking cars. I am using an Arduino UNO to receive the position from GPS/GPRS shield. I am OK on obtaining the coordinates position.
Now I need to send the position to a webserver and then show it on a webpage using the Google Maps API. Which accepts it in a POST or GET method.
Here is the shield model:
<a href="https://i.stack.imgur.com/HfhAU.jpg" rel="nofollow noreferrer">U-blox Sara G-350</a>
and this is its manual <a href="https://www.u-blox.com/sites/default/files/u-blox-ATCommands_Manual_(UBX-13002752).pdf" rel="nofollow noreferrer">here</a> </p>

<p>Here is my approach:</p>

<pre><code>#include &lt;SoftwareSerial.h&gt;
#include &lt;String.h&gt;


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=&lt;profile_id&gt;,&lt;op_code&gt;,&lt;HTTP_server_name&gt;
 toSerial();
 delay(2000);

 gprsSerial.println("AT+UHTTP=0,5,80");
 toSerial();
 delay(2000);

}

void loop() {

 //gprsSerial.println("AT+UHTTP=2,1,\"submit\"");
                    //AT+UHTTP=&lt;profile_id&gt;,&lt;op_code&gt;,&lt;param_val&gt;[,&lt;param_val1&gt;]
 //toSerial();
 //delay(2000);

 gprsSerial.println("AT+UHTTPC=2,1,\"/add.php\",\"filename\"");  //Problem here!!!!!!!!
                   //AT+UHTTPC=&lt;profile_id&gt;,&lt;http_command&gt;,&lt;path&gt;,&lt;filename&gt;[,&lt;param1&gt;[,&lt;param2&gt;[,&lt;param3&gt;]]]
 toSerial();
 delay(2000);
}

void toSerial()
{
  while(gprsSerial.available()!=0)
  {
    Serial.write(gprsSerial.read());
  }

}
</code></pre>

<p>This is what I get:</p>

<blockquote>
  <p>+CGDCONT=3,"IP","weborange"</p>
  
  <p>OK
  +UHTTP=0</p>
  
  <p>OK
  +UHTTP=2,1,"www.navtec.16mb.com"</p>
  
  <p>OK
  +UHTTP=0,5,80</p>
  
  <p>OK
  +UHTTPC=2,1,/add.php,filename</p>
  
  <p>ERROR
  +UHTTPC=2,1,/add.php,filename</p>
  
  <p>ERROR
  +UHTTPC=2,1,/add.php,filename</p>
  
  <p>ERROR
  +UHTTPC=2,1,/add.php,filename</p>
  
  <p>ERROR ...</p>
</blockquote>

<p>Thanks for your time, I am waiting for your support, any ideas could help. Sorry for my bad English</p>
 18572: <p>I worked on a project similar to yours. I think you forgot to <strong>establish a connection first</strong>.
Just add those lines of code at the top of <code>setup()</code> method:</p>

<pre><code> gprsSerial.println("AT+UPSDA=2,0"); //Reset connection
 toSerial();
 delay(2000);
  gprsSerial.println("AT+UPSD=2,1,\"weborange\""); //Establish a new one
 toSerial();
 delay(2000);
 gprsSerial.println("AT+UPSDA=2,3"); 
 toSerial();
 delay(2000);
 gprsSerial.println("AT+UPSND=2,0");
 toSerial();
 delay(2000);
</code></pre>

<p>I hope it works for you. Else, you can use <code>AT+UHTTPER=2</code> after all to check for error source.</p>
