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