Does anyone have GPRS working with SM5100B GSM module on Arduino?

I would like to be able to post some data to a php script using HTTP using the SM5100B GSM module - should be really simple. There are many, many, many threads out there with people posting their GPRS problems, and I haven't seen a single solved thread. Someone out there must have this thing working! The code should be pretty simple. Here's the series of AT commands we think should work, but isn't working:

AT+CGATT=1
AT+CGDCONT=1,"IP","airtelgprs.com"
AT+CGACT=1,1
AT+SDATACONF=1,"TCP","174.120.246.220",80
AT+SDATASTART=1,1
AT+SSTRSEND=GET /somerandomphpfile.php?data=testdata HTTP/1.1<CR><LF>Host: avantari.co.uk<CR><LF>User-Agent: Mozilla/5.0<CR><LF><CR><LF>"

If this were to work, testdata would show up in an SQL database. It doesn't work. Sometimes the module resets at SDATACONF. But the real show-stopper is the CME error 33 after SSTRSEND. Except for these 2 errors, at every step of the way the module responds as it should do.

We've ensured that the module is getting the right amount of power (5V at 3A), and that the antenna is working. We can send SMSs, and make and receive phone calls with it. But no GPRS.

Other things we've tried:

  • Using a web address instead of IP address at SDATACONF
  • Confirmed with telnet that sending this packet to the IP address does work - so it's the right packet.
  • Triple-checked the APN in the CGDCONT command
  • Sent a blank user-name and password after CDGCONT, using AT+CGPCO=0,"","", 1

We're using software serial on the Arduino Uno, so that we can use the hardware serial to send commands through the terminal. I've read that software serial can't keep up with the module for phone calls and receiving data, but all we want to do is send a tiny piece of data so I was hoping this wouldn't be a problem. I'm about to start trying connecting to the module via hardware serial, but it's slow going cause it's hard to debug.

If anyone has any idea what's going wrong, I would be eternally grateful. In addition, the Internet would be eternally grateful if someone could post an example of any string of AT commands that successfully gets GPRS working on this thing.

Thanks!

Tobek,

You're ahead of me! I can't get a call dialled or an SMS out yet. Can you have a look at my blog entry and see if you can spot something I've done wrong, or that you've done differently?

Thank you! Chris.

Hi, Thanks for your detail explanation of your situation.
Right now I am working with the eval board and try to ctrl the GSM using Arduino itself instead of PC or ...

The GSM module reboots sometimes when I type in sdataconf command, which is the same as yours. But, that never happened when I control the module using PC. Taking the SoftwareSerial library into consideration, I highly doubt it gonna be an easy work to just send data using TCP/IP.

I think the core problem later gonna lead to the NewSoftSerial library instead of the GSM module itself.

Let us know when you figure that out.

Hey Tobek,

Did you got your sm5100b to connect via web ? Could you show us how ?

Thanks.

Yes, I did eventually figure this out. A big part of the problem was that I was using AT+SSTRSEND instead of AT+SDATATSEND. Only AT+SDATATSEND can support the line breaks necessary for an HTTP request. I've put up my code at GitHub - tobek/SM5100B-GPRS: Arduino program for sending HTTP requests over GPRS using the SM5100B GSM module. It's possible. - the readme shows all of the commands I send and the content of the packet, and there's an Arduino file that does it all. Good luck!