Pages: [1]   Go Down
Author Topic: Does anyone have GPRS working with SM5100B GSM module on Arduino?  (Read 1902 times)
0 Members and 1 Guest are viewing this topic.
London
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Code:
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!
« Last Edit: June 26, 2012, 12:27:24 am by tobek » Logged

Ideally, if anything were any good, it would be indescribable.
- Edward Gorey

Maitland, Australia
Offline Offline
Jr. Member
**
Karma: 1
Posts: 88
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

http://arduinoetcetera.blogspot.com.au/2012/07/cellular-shield-sm5100b-troubleshooting.html

Thank you! Chris.
Logged

There are 3 kinds of people in the world. Those who are good at maths, and those who aren't.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Tobek,

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


Thanks.
Logged

London
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 https://github.com/tobek/SM5100B-GPRS - 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!
Logged

Ideally, if anything were any good, it would be indescribable.
- Edward Gorey

Pages: [1]   Go Up
Jump to: