Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

GPRS settings for Modem

Status
Not open for further replies.

techie

Advanced Member level 3
Joined
Feb 5, 2002
Messages
839
Helped
58
Reputation
116
Reaction score
9
Trophy points
1,298
Location
Pakistan
Activity points
7,805
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.
 

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
 

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.
 

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)
 

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.
 

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
 

    techie

    Points: 2
    Helpful Answer Positive Rating
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.
 

can we use GPRS modem for gsm use .....if yes how?????
 

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

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top