It depends quite a bit on:
- The modem
- How much of the modem's stack you plan on using
- The carrier you're using
If you're using this on a computer and you have a modem configuration file (modem specific), and a carrier configuration or setup then you can intercept the serial commands and find out.
Otherwise, try going to the modem manufacturer's website and find the AT command guide for your modem.
Once you have the modem commands, setting up the connection requires several steps, including initiating the GSM connect, then a GPRS session with a server, and then the PPP session with your carrier's ISP equipement. You'll need several pieces of information from the carrier, which the AT command set will guide you towards.
Your modem may also have a built in TCP/IP stack, in which case you also have AT commands to initiate the PPP session, and then TCP connections with internet servers.
If you post the modem/carrier/goal/etc you might be able to get more specific help.
A more specific answer, if you're using a MultiTech Multimodem GPRS (or similar) and Tmobile's internet service (one of the higher tiers usually used with laptops). The uppercase names starting with "M" were the names of the states in the modem control state machine I was using. The data I was collecting was simple GPS strings, which were being stored by a PHP script on my server to be displayed here: http://www.ubasics.com/wmr/ . A very basic tracking/telemetry application.
Reset the modem:
MRESET:
ATZ
Attach to the provider's network:
MPROVIDERINIT:
at+cgdcont=1,"IP","internet3.voicestream.com",,0,0
MIPINIT:
at+wopen=1
MPPPINIT:
at#pppmode=1
MCHECKPIN:
at+cpin?
MGSMREGISTER:
at+creg=1
Attach to the providers GPRS network:
MGPRSREGISTER:
at+cgreg=1
MGPRSATTACH:
at+cgatt=1
MGPRSMODE:
at#gprsmode=1
Attach to the provider's internet PPP server:
MSERVERINIT:
AT#APNSERV="internet3.voicestream.com"
MUSERNAME:
AT#APNUN=""
MPASSWORD:
AT#APNPW=""
MSIGNAL:
AT+CSQ
MSTARTPPP:
at#connectionstart
Attach the Modem's internal stack to an HTTP port:
MTCPSERVER:
AT#TCPSERV="www.ubasics.com"
MTCPPORT:
AT#TCPPORT=80
MOPENSOCKET:
at#otcp
As Adam said, the specific AT command set depends a little bit on your modem. The Siemens GSM modems support what seems to be a reasonably common subset though - there is a manual at:
http://www.automation.siemens.com/siplus/ftp/techndoku/TC65_atc_v02000.pdf
which documents all the supported GSM commands in detail.
(Google "TC65 AT commands" if the link is broken)
Most of the mobile phone specific AT commands are standardised and specified in 27.007 (SMS related commands are in 27.005). For Sony Ericsson phones there is a document Developers' Guidelines - AT Commands (5.50 MB) available.
Beware that GPRS AT commands are far from trivial. If your phone is correctly configured and all you want it to start a IP connection using the first defined internet account, you can run
ATD*98*1#
or
ATD*99***1#
to start PPP negotiation (see "Extension of ATD – Request GPRS service" in the Sony Ericsson document).
I am using a SIM340 GSM modem and a Ramtron 8051 compatible microcontroler. Follows my own sequence to connect to a remote server, using that configuration:
ATE0 // echo off, optional, makes easier parsing SIM340 replies; if you are using a terminal program you dont want to deactivate echo.
AT+CNMI=0,0,0,0,0 // do not issue messages when receiving new SMS; again, makes life easier for me if I dont have to check for unwanted replies.
AT+CMGF=1 // SMS format: text
AT+CIPFLP=0 // do not fix local port (according to SIM appnote this provides faster reconnection to server)
AT+CIPMODE=1 // Transparent TCP mode : everything written to the GSM module is sent through TCP connection
AT+CIPCSGP=1,"gprs.personal.com","gprs","adgj" //APN settings (APN, username, password)
AT+CGDCONT=1,"IP","gprs.personal.com" //type of connection
AT+CIPCCFG=3,2,256,1
AT+CIPSTART="TCP","xxx.xxx.xxx.xxx","82" // connects to server on ip address xxx.xxx.xxx.xxx, port 82
After issuing the last command, GSM module will reply with "CONNECT OK" if the connection attempt was succesful. From that moment on, every byte sent to the UART of the GSM will be sent to the server. To go back to command mode, you can send the string "+++" (three plus signs) with no delay between them and with no byte before or after for at least 0.5s.
If the connection to the server goes down for some reason you can reconnect using:
AT+CIPSHUT // closes TCP connection
AT+CIPSTART="TCP","xxx.xxx.xxx.xxx","82" // re-issue the command for starting TCP connection
Best regards.
is this dial number is comman all over the world?? Regards Chandravel [email protected]