GPRS connection via AT Commands

I have been trying to connect to GRPS via modem with Arduino USB host but I keep getting the below mentioned errors.

atd99**1#
NO CARRIER
at+cgdata="PPP",1
CONNECT
~ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0~~ÿ}!}!}!} }3}"}&} } } } }#}%Â#}%}'}"}(}"W}0~
NO CARRIER

Can any one explain the concept of this NO Carrier and please guide me what I need to do about it ?

BR,
Vik

It's been a while since I last used these AT commands but as far as I remember the ATD*99... was for initiating a GPRS connection. I've never seen the AT+CGDATA command, may be that this is necessary for your modem but in any way I think you should use the two commands the other way around (first setting the PPP option, then dialing). What you get afterwards is PPP data I guess but I don't know of a PPP implementation for Arduino.

You didn't write what your intention was so I'm guessing. You may want to connect to a remote computer. Using just a GPRS modem isn't a good idea because this expects a PPP implementation and above that at least a minimal TCP/IP stack. Although there exists a minimal TCP/IP stack for Arduino (uIP) you're still missing the PPP part. If your remote computer has a modem connected to it, use the ATD command with the phone number the modem is listening on.

To your queston: NO CARRIER means that the connection is interrupted, in most cases: the remote party hang up.

I have very little understanding of these protocols such as PPP or TCP. One question that keeps bugging me is what do you actually mean by PPP implementation for Arduino. Moreover, if i am using a GPRS modem, what does it not have that we require to implement on a software level. Any can you explain the TCP implementation for Arduino in a bit more detail.

What I actually need to do ? I have seen other GSM shield which are capabale of sending data to internet using GPRS from Arduino. What is actually missing in the USB GPRS modem ?

I need to send sensor data to an internet server !

Hello Vik009
I'm also interested on what you are trying to do.I need to use gprs to seend data out from arduino.I had start to do some reasearch but until now I just found a few information.I'm using Siemens mc35i modem.See this http://www.libelium.com/squidbee/index.php?title=New_GPRS_module_for_Arduino_(Hilo_-_Sagem)
It's not my modem version but it could clarify some understanding about the function of gprs

I have seen a similar shield on the below mentioned link

http://www.seeedstudio.com/wiki/GPRS_Shield

Actually I am finding that there is a fundamental different between these shields and with the one in GPRS modem. I am looking to find out that different and implement it if i can.

For your task it's probably better to buy one of the GSM shield that includes the features you need.

I try to explain the problem. For a working TCP/IP connection (standard connection using the Internet) you need a link layer (in a LAN this is usually Ethernet) and some layers above that (TCP/IP does not fill straight into the OSI layers).

In the GPRS case the modem is supplying the physical layer (kind of) and PPP is responsible for the data link layer (it establish the equivalent of an Ethernet). On top of that the TCP/IP protocol suite does all the stuff needed for routing, finding the remote node and reliably transmitting data from one host to the other. When you initiate the ATD*99... command your modem is connecting to a PPP endpoint of your mobile provider (that's where the "garbage" is coming from). This device tries to establish a PPP connection with you. Your Arduino does not know how to answer this request and the provider's device is hanging up the connection after trying some time.

Most of the GSM shields available for the Arduino (all I know of) have there own microcontroller on the shield and which is responsible for handling all that protocol stuff. It supplies you then with some kind of serial connection which is easy to handle on a microcontroller like the ATMega used in Arduinos. If you don't have that other microcontroller in between you and the GRPS modem, you have to do all that protocol things yourself (or better: your Arduino has to do it). This needs more storage space than a standard Arduino (p.e. an UNO) supplies. A Mega 2560 might be enough but you still have to have the code for doing it. I never heard of a PPP implementation for the Arduino which does not have to mean there isn't one.

As you can see on the page posted by HugoPT, this shield also provides the functionality of your modem plus additionally TCP services. There you directly specify the server you wanna connect as well as the port number and (if circumstances allow) you get a transparent connection to the server (using a serial interface to the Arduino). You just can send characters to the server and get the responses back. What's impossible is having multiple concurrent connections which is a standard feature if you have a complete TCP/IP stack as on the PC.

A bit lengthy, sorry for that but hope this gets you an impression.

Hi,

Thank you so much for your detailed response. Now the problem has become much more clearer to me and I guess first I would try to get it done through the GSM shield.

Meanwhile, though I am not totally good at coding, do u have an idea how much big an effort it would be to develop a PPP implementation for Arduino

BR,
Vik

You might take a look at the specification:

It's quite a complex task. I don't know how much of the protocol you need for minimal functionality. The full implementation is probably to much code for even an Arduino Mega 2560 to hold in the flash (Linux pppd is about 350kB), especially taken into account you also need the IP stack and an application doing something on top of all that. RAM requirements might also be a critical point.

On the other side I would also have told you that a minimal TCP/IP stack is to big for an Arduino UNO and then Adam Dunkels came along and implemented the thing in a few kB of compiled code.

http://code.google.com/p/avr-uip/

So I will not tell you it's impossible but it's a lot of work for sure.