GSM_SERVER

Hi!

I'm trying to access a server and upload the data shown there.

This is an example, which is GsmWebClient, the only thing I changed was the PinNumber, APN, login, password and server char [] for the page to the server and want to access char path [].

I am using a one Arduino board, a shield module, a module SIM5218E S2-1048M-W002F and SIMCARD.

// libraries
#include <GSM.h>

// PIN Number
#define PINNUMBER "1234"

// APN data
#define GPRS_APN "internet.movistar.com.co" // replace your GPRS APN
#define GPRS_LOGIN "movistar" // replace with your GPRS login
#define GPRS_PASSWORD "movistar" // replace with your GPRS password

// initialize the library instance
GSMClient client;
GPRS gprs;
GSM gsmAccess;

// URL, path & port (for example: arduino.cc)
char server[] = "http://pruebagsmgprseddie.atwebpages.com/datalogger.php?temp=4&hum=9";
char path[] = "/";
int port = 80; // port 80 is the default for HTTP

void setup()
{
// initialize serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}

Serial.println("Starting Arduino web client.");
// connection state
boolean notConnected = true;

// After starting the modem with GSM.begin()
// attach the shield to the GPRS network with the APN, login and password
while (notConnected)
{
if ((gsmAccess.begin(PINNUMBER) == GSM_READY) &
(gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD) == GPRS_READY))
notConnected = false;
else
{
Serial.println("Not connected");
delay(1000);
}
}

Serial.println("connecting...");

// if you get a connection, report back via serial:
if (client.connect(server, port))
{
Serial.println("connected");
// Make a HTTP request:
client.print("GET ");
client.print(path);
client.println(" HTTP/1.1");
client.print("Host: ");
client.println(server);
client.println("Connection: close");
client.println();
}
else
{
// if you didn't get a connection to the server:
Serial.println("connection failed");
}
}

void loop()
{
// if there are incoming bytes available
// from the server, read them and print them:
if (client.available())
{
char c = client.read();
Serial.print(c);
}

// if the server's disconnected, stop the client:
if (!client.available() && !client.connected())
{
Serial.println();
Serial.println("disconnecting.");
client.stop();

// do nothing forevermore:
for (;:wink:
;
}
}

When I see the serial monitor, the result is as follows, nothing else happens.

Starting Arduino web client.

They may please help me, thanks.