Arduino Logger GSM API Not connecting

I’m using an arduino uno to monitor the environment (temp, humidity, pressure etc). I want to send the data collected on the device to my emoncsm account using a GSM shield. The device I’m using can’t use wifi or ethernet (most arduino projects I’ve seen are specific to these) and so I need a GSM solution.

I’ve managed to use the GSM shield to perform the default WebClient function, but when I change the information in the code to match the emoncms information, the device will not connect. I’ve tried all kinds of variations without any luck. If anybody could help with this, that would be great.

The serial monitor suggests the device connects to data, but cannot connect to emoncms.

The code I’ve used so far:

#include <GSM.h>
// PIN Number
#define PINNUMBER ""
// APN data
#define GPRS_APN       "mobiledata" // replace your GPRS APN
#define GPRS_LOGIN     ""    // replace with your GPRS login
#define GPRS_PASSWORD  "" // replace with your GPRS password
// initialize the library instance
GSMClient client;
GPRS gprs;
GSM gsmAccess;
// URL, path & port (for example:
char server[] = "";
int port = 80; // port 80 is the default for HTTP
void setup() {
  // initialize serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port 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) &
      notConnected = false;
    } else {
      Serial.println("Not connected");
  // if you get a connection, report back via serial:
  if (client.connect(server, port)) {
    // Make a HTTP request:
    client.print("GET ");
    client.println(" HTTP/1.1");
    client.print("Host: ");
    client.println("Connection: close");
  } 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 =;
  // if the server's disconnected, stop the client:
  if (!client.available() && !client.connected()) {
    // do nothing forevermore:
    for (;; )