VWSoft
Volker Werth - Software -
weighing - communication - application - development
bsd.vwsoft.com

AT commands for 3G modems

Here are some of the most often needed and useful AT commands to control 3G equipment. There are a lot more defined and if you need to go into detail, please have a look at 3GPP (3rd Generation Partnership Project).

The following standards are of interest: 27.005, 27.007, 27.010, 27.060, 27.901

AT+CGDCONT="n","type","apn"
n = 1..4 (CID)
type = [IP | PPP | xxx ]
apn = name of APN
returns: [ OK | ERROR ]
Set the context of the connection.
This setting describes the protocol and sets the APN to connect to.
The modem usually has 4 different context identifiers (CID). Each one can be set and is being used by the dial command (see ATDT). In most cases you'll use the CID 1.
ATDT*99[***n]#
n = 1..4 (CID)
returns: [ CONNECT | CONNECT xxxxx | ERROR | NO DIALTONE ]
dial: connect to network
n is the CID specified in AT+CGDCONT. If not given, the device will use CID 1.
the number *99 will connect to the packet network instead of dialing another party (as one might guess). In most cases the usage of this command is just ATDT*99#
AT+CSQ
returns: +CSQ: nn,mm
show signal quality information
Important: This command does not only show the signal quality of a network where you're able to get acces to. The card might give you a good signal quality of a foreign network (ie. not a network where you may log into). So you might see a good signal quality but not be able to log into. For this reason it is important to check also the currently booked network (see +COPS?) and check if it's your network what is reported here.
Signal quality (nn) is a scale from 0 to 31 (0=really bad signal, 31=good signal, 99=no signal/no network) where 0 means -112 dB(A) and each step is 2 dB(A) better signal quality.
Some cards report mm as constant 99 (Novatel) some don't. You should really just look at the 'nn' value reported.
You may expect to get connected even at really bad signal rates. My card mostly reports values between CSQ=3 and CSQ=6 (=-106 dB and -100dB) but I still have a useable connection. With values like that, a cellular display or even a Windows dashboard software might display no signal but CSQ=3 is still good to connect.
AT+COPS?
returns:
Show the currently attached network (in clear text).
AT+COPS=?
returns:
Show a list of available (on air) network operators.
AT+CREG?
returns:
Information about currently registered network.
ATEn
n = 0 (no echo), 1 (echo)
returns: [OK | ERROR]
set command echo
Enables or disables echoing of send commands while in command mode. A well known modem command.
ATVn
n = 0, 1
returns: [OK | ERROR]
AT&Cn
n = 0, 1
AT&Dn
n = 0, 1, 2
How do I set the card into 3G or GPRS or HSDPA mode?
Well... good question! I'm glad you're asking :)
Unfortunately setting the GPRS only, 3G only, GPRS/3G mixed mode or enable HSDPA capabilities is not standardized in any way so every manufacturer is using it's own command (set) to do that. If I do have a whish for christmas time for free: Please may 3GPP set a standard for it.
FYI on how to do that, please have a look at the card / manufacturer specific pages on this site.

This list is really incomplete ATM. I'll hack on it as I'm able to do so.