SM5100B GPRS

Hello,
I have some problems with this GPRS module to connect it to the network and get an webpage. I succeed in opening a socket but when i want to receive the data it just close it after some time, it just stalls. I am using arduino as a serial communicator for the OSX, everything that goes in the arduino it passes to the SM5100B shield. These are my commands that i pass to the shield

AT+CGATT=1
AT+CGDCONT=1,"IP","wnw"
AT+CGPCO=0,"wnw","wnw", 1
AT+CGACT=1,1
AT+SDATACONF=1,"TCP","www.google.com",80
AT+SDATASTART=1,1 
AT+SDATASTATUS=1
AT+SSTRSEND=1,"GET /search?q=arduino HTTP/1.0"
AT+SDATAREAD=1

I get all ok`s for all the commands but i do not get +STCPD?1 which tells me that i have data to read. Instead i get +STCPC?1 that tells me the connection has been closed by the remote host. I have put it to access my local webserver but it does not log anything, how does it close the connection. Any ideas ?

Hi, any chance you are using Arduino 1.0 to communicate with your shield? Im using Arduino 1.0 and can't figure it out what is wrong with the next code. The original code contained the serial.print with byte keyword that is no longer supported as syntax in Arduino 1.0:

/*
  Example 26.3a
 GSM shield sending a SMS text message
 http://tronixstuff.com/tutorials > chapter 26
   This sketch only for Arduino Mega 
   Run jumpers from GSM shield pin 2 to Mega 19, and shield 3 to Mega 18
   Ensure that there is NOT a connection from shield pins RX and TX to anywhere. 
 */


char mobilenumber[] = "xxxxxxxxxx";  // Replace xxxxxxxx with the recipient's mobile number
void setup()
{
  //Initialize serial ports for communication.
  Serial1.begin(9600);
  delay(35000); // give the GSM module time to initialise, locate network etc. 
  // this delay time varies. Use example 26.1 sketch to measure the amount 
  // of time from board reset to SIND: 4, then add five seconds just in case
}

void loop() 
{
  Serial1.println("AT+CMGF=1"); // set SMS mode to text
  Serial1.print("AT+CMGS=");
  Serial1.print(34,BYTE); // ASCII equivalent of "  // byte is not correct usage, debugger recommends serial.write
  Serial1.print(mobilenumber);
  Serial1.println(34,BYTE);  // ASCII equivalent of "   // byte is not correct usage, debugger recommends serial.write
  delay(500); // give the module some thinking time
  Serial1.print("text message content");
  Serial1.println(26,BYTE);  // ASCII equivalent of Ctrl-Z   //// byte is not correct usage, debugger recommends serial.write
  delay(15000); // the SMS module needs time to return to OK status
}
  Serial1.println(34,BYTE);  // ASCII equivalent of "   // byte is not correct usage, debugger recommends serial.write

Replace this with:

Serial1.write((byte)34);
Serial1.println();

ungureanuvlad - I have the exact same problem. I have tried many different variations and combinations of AT commands to make an HTTP request and all I get are OK’s from the shield with no response data.
Here are the commands I have tried:

AT+CGATT=1
AT+CGDCONT=1,"IP","uinternet" //(uinternet is my providers APN code. I also tried - AT+CGDCONT=1,"IP","internet" and got an OK from the SM5100B)
AT+CGPCO=0,"internet","internet",1 //(also tried AT+CGPCO=0,"","",1 and also tried not running this line at all)
AT+CGACT=1,1
AT+SDATACONF=1,"TCP","www.google.com",80
AT+SDATASTART=1,1
AT+SSTRSEND=1,"GET / HTTP/1.1" //(also tried to use AT+SDATATSEND=1,14 and at the prompt sent: GET / HTTP/1.1<ctr+z>)

I got OK’s for every line.

Also, I checked the socket:

AT+SDATASTATUS=1

and got the following reply:
+SOCKSTATUS: 1,1,0102,288,158,0

Which tells me the SM5000B is sending data but not receiving any response back.

I also tried pointing to my own web server. The logs on the server didn’t show any requests coming in. Unfortunately, I have limited access to this server and can’t run commands to check if ports are actually being opened, but my guess is that they aren’t.

Did you find a solution to this? I would appreciate any help! I’ve been trying to make this work for days with no progress.