| Author |
Message |
techie
Joined: 05 Feb 2002 Posts: 850 Helped: 43 Location: Pakistan
|
24 Jul 2005 6:10 GPRS settings for Modem |
|
|
|
|
Does a GPRS modem need to be initialized with settings like IP address, port number, APN etc.
I am confused because for a GPRS phone, I need to configure my phone according to the cell company settings for IP address, port number APN etc.
For a cell phone, I can configure these settings using the menu. But for a GPRS modem, I can only use AT commands. I cant find any AT commands for that except the following
AT+CGDCONT=1,ip,internet
Pls Help.
|
|
| Back to top |
|
 |
pisoiu
Joined: 31 Dec 2002 Posts: 729 Helped: 24 Location: Romania
|
24 Jul 2005 8:15 GPRS settings for Modem |
|
|
|
|
There are mainly two types of GPRS modems: with and without built in TCP/IP stack. Those without have only AT+CGDCONT command (this is the basic command for defining the PDP context), in which you can specify the protocol, APN and other optional parameters (data compression, header compression). They are mostly like landline modems, you can dial and establish communication, but all the network layers are handled by the PC, not by the modem. The other GSM/GPRS modems, with built in TCP/IP stack are dedicated for the ease of operation in embedded systems. They have the TCP/IP stack built in. Designing this stack into an external microcontroller is not an easy task. These modems, as well as all GPRS mobile phones, have settings for other parameters, like IP address, DNS address, used protocol (TCP or UDP), etc. These are not general settings, they depend on the implementation. Each manufacturer of GPRS modem has their particularities in implementation of the stack and dedicated AT commands for that. For example, Telit modem (www.gm862.com) communication sequence is as follow: at the beginning you set the parameters (peer IP address or name, DNS name, and timeouts). Then, with a simple command (AT#SKTOP) you can open the socket with the peer, then after CONNECT you can send and receive data, the modem will do everything else. Without this built in TCP/IP stack, you would have to handle all the protocols down to PPP frame, this means TCP, UDP, IP, ARP, IPCP, LCP, PAP, CHAP and perhaps some others which I forgot about.
/pisoiu
|
|
| Back to top |
|
 |
techie
Joined: 05 Feb 2002 Posts: 850 Helped: 43 Location: Pakistan
|
24 Jul 2005 8:46 GPRS settings for Modem |
|
|
|
|
Thanks for the info. So basically what you mean is that if I am using a standard GPRS modem without any TCP/IP stack, then the only thing I need is to issue a AT+CGDCONT=1,ip,internet command. I do not need to set any IP,DNS, port etc.
The TCP/IP and PPP is not a problem. I have those available in the controller.
|
|
| Back to top |
|
 |
sanjay
Joined: 04 Jul 2003 Posts: 117
|
24 Jul 2005 9:16 GPRS settings for Modem |
|
|
|
|
Hmm, I think you would still need a TCP/IP stack, mainly because you can't perform IP related stuff without it, have a look at the protocol structure of the GPRS, you'll notice that TCP/IP is needed.
As said previously by pisiou, you can either implement your own tcp/ip stack (Challenging task) or buy a modem like GR47/48 that already comes with one and use that.
Also, your command AT+ CGCONT = blah blah blah, just defining your PDP context, it's not doing your IP stuff that you want it to do.. for that you would need other commands.. if you have a modem with built in TCP/IP stack then normally manufacturers, provide their own easy written commands for the user to work with.
Hmm, maybe if you try and look into an application note of any GPRS modem that has TCP/IP stack you should see, how they do the communication with it, using their own AT commands for tcp/ip.
(If needed, for example, just look at an application note, for GR47 modem, that should provide you an idea)
|
|
| Back to top |
|
 |
techie
Joined: 05 Feb 2002 Posts: 850 Helped: 43 Location: Pakistan
|
24 Jul 2005 16:53 GPRS settings for Modem |
|
|
|
|
| I said that I have the TCP/IP and PPP already running in the controller. The problem is that I was using a siemens cellphone that has MC35 compatible GPRS. Everything was working fine for a week. Then one day the phone stopped responding to ATD*99***1#. I contacted the cellphone company. They say that I have lost the settings on phone. I want to know whether the settings on the phone are used when the phone is used as a modem on serial cable or Not. From what I get in this thread is that the settings in the phone are immatterial and the only thing that I need is to issue the proper AT+CGDCONT command and then ATD*99***1# to dial and connect.
|
|
| Back to top |
|
 |
pisoiu
Joined: 31 Dec 2002 Posts: 729 Helped: 24 Location: Romania
|
24 Jul 2005 18:46 GPRS settings for Modem |
|
|
|
|
It should be like you said. Theoretically, the only settings you have to do in the phone are AT+CGDCONT, then the dial command. I am not sure, but I suspect that you have to see if the settings in the TCP/IP stack are also according with the GSM network rules. Some providers offer fixed IP address, some will use DHCP, some won't allow the use of all PPP authentication protocols, etc. Perhaps you should ask them for these details. For example there are several authentication protocols, and any of them can be used (PAP, CHAP, MD5, etc..). If they changed recently the settings in the network and they are now allowing authentication only with a protocol which probably is not implemented in your stack, then of course it won't work. If you have the posibility, you should run your stack in debug mode, to see where it stops or at what layer the connection is rejected. Ask their technical guys if they changed recently something in the settings.
/pisoiu
|
|
| Back to top |
|
 |
Google AdSense

|
24 Jul 2005 18:46 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
techie
Joined: 05 Feb 2002 Posts: 850 Helped: 43 Location: Pakistan
|
24 Jul 2005 19:13 GPRS settings for Modem |
|
|
|
|
| Thanks pisoiu. The connection is not even initiated by using the ATD*99***1# command. It was working before. But I get around that by AT+CGATT=1 command and then issue the dial command. Now the phone starts the PPP, negotiates LCP properly, does the PAP fine but stops at IPCP. It does not get an IP. It used to get a dynamic IP before. The IP was 10.x.x.x. so I guess they were using NAT. As you said, I suspect, they might have changed to some fixed IP scheme. But that seems unlikely to give fiexed IPs on these type of temporary connections. I will try to get intouch with some technical expert from the cellphone company. The customer service doesnot have a clue.
|
|
| Back to top |
|
 |
anshulsain
Joined: 03 Oct 2009 Posts: 2 Location: Gurgaon
|
03 Oct 2009 11:54 GPRS settings for Modem |
|
|
|
|
| can we use GPRS modem for gsm use .....if yes how?????
|
|
| Back to top |
|
 |
angel_n_daemon
Joined: 31 Aug 2009 Posts: 6 Location: india
|
07 Oct 2009 9:20 Re: GPRS settings for Modem |
|
|
|
|
yes a gprs modem can be used to send gsm data..if ur sim has the provision... like sim300 has both gsm n gprs facility....
jst use at commands to use them...
u can also send sms via dese at commands n lots mre............
|
|
| Back to top |
|
 |