AT Commands for USB Modems

For most users, the connection manager supplied with the USB modem is sufficient for getting connected and managing your modem. However, some users (especially those not using Windows computers) prefer to manage their modem directly, using AT commands. Here’s some useful commands for USB modems.

Selecting an APN
+CGDCONT=1,”IP”,”apn name” e.g. for Vodafone UK - AT+CGDCONT=1,”IP”,”internet”

Querying signal strength
+CSQ Returns two comma separated numbers. The first number is the signal strength (RSSI), the second number is unused. Here’s how to interpret RSSI: 0 <= -113dBm 1 -111dBm 2 – 30 -109dBm to -53dBm 31 >= -51dBm 99 Unknown

Setting operating mode
+CFUN=x 0 Low power mode 1 Online 4 Offline 6 Reset device 7 Turn off radio

Get manufacturer information
+CGMI

Get software version
+CGMR

Get SIM IMSI number
+CIMI

Get device IMEI
+CGSN

Get hardware version
^HWVER

Change PIN
+CPWD=SC,old pin, new pin

Enable PIN
+CLCK=SC,mode,pin Mode: 0=unlock, 1=lock, 2=query state

Query system information
^SYSINFO

Returns: status, domain, roaming status, mode, SIM state

Status 0 No service. 1 Restricted service 2 Valid service 3 Restricted regional service. 4 Power-saving and deep sleep state

Domain 0 No service. 1 Only CS service 2 Only PS service 3 PS+CS service 4 CS and PS not registered, searching

Roaming 0 Non roaming state 1 Roaming state

Mode 0 No service. 1 AMPS mode (not in use currently) 2 CDMA mode (not in use currently) 3 GSM/GPRS mode 4 HDR mode 5 WCDMA mode 6 GPS mode

SIM state 0 Invalid USIM card state or pin code locked 1 Valid USIM card state 2 USIM is invalid in case of CS 3 USIM is invalid in case of PS 4 USIM is invalid in case of either CS or PS 255 USIM card is not existent,

Network selection
+COPS=? Return a list of networks

+COPS=mode, format, operator

Mode 0 Automatic 1 Manual 4 If manual fails, try automatic

Format 1 Long alpha 2 Short alpha 3 Numeric

Operator Either the long alpha name, the short operator alpha code or the numeric code

Status 0 unknown 1 available 2 current 3 forbidden

System Config
^SYSCFG=mode, order, band, roaming, domain

Mode 2 Automatic search 13 2G ONLY 14 3G ONLY 16 No change

Order 0 Automatic search 1 2G first, then 3G 2 3G first, then 2G 3 No change

Band 80 GSM DCS systems 100 Extended GSM 900 200 Primary GSM 900 200000 GSM PCS 400000 WCDMA IMT 2000 3FFFFFFF Any band 40000000 No change of band

Roaming 0 Not supported 1 Roaming is supported 2 No change Domain 0 CS_ONLY 1 PS_ONLY 2 CS_PS 3 ANY 4 No change

MobileBroadbandRocks's picture
Blogged by:
MobileBroadbandRocks
Wed, 2008-07-30 04:39
Categories:

Comments

 
Anonymous's picture

Do you know commands for read/send sms messages?

the windows program, can send/receive sms messages, but I nedd make this on FreeBSD, with at commands.

Thanks for this great info.

 
Anonymous's picture

@Ricardo: comms/kmobiletools in ports will send/receive SMS messages when set up correctly. You need to set devfs up correctly to allow your normal user to access the port (you can also use devd) and you'll need to touch a lockfile in your home directory. After that, it Just Works [TM]. If you're working from the command line, for example to send alerts to an admin, these are the commands you need:

+CMGS Send message

+CMSS Send message from storage

+CMGW Write message to memory

+CMGD Delete message

+CMGC Send command

+CMMS More messages to send

More information on these can be found here: http://www.developershome.com/sms/howToSendSMSFromPC.asp

 
Anonymous's picture

hi , i read your post seems you have lots of knowledge about AT commands , but i have different query iam using intermec device ( windows mobile 6.1) iam connecting the device to desktop via activesync and usb cable initially the device was dectected but when i try to connect it to hyperterminal it wont connect ,so i found one application called usbmodem.cab for windows mobile , this application can be installed on windows mobile device after installing this application desktop which is connected to the device detects usb modem , now i can see modem in device manager also i can see its com port address i tried with that com port address in hyperterminal then iam able to connect , when i sent AT to hyperterminal the response is OK , when i try to send some more AT commands it gives "error" my question is is there any other utility other than usbmodem.cab to fully use AT commands.

 
Anonymous's picture

dou you know commands for changing IMEI?
or is it possible to change IMEI?
on some mobile phones it is possible by this command, at%imei=x,x,x,x,..

 
Anonymous's picture

how bout AT commands for sending sms? i got error for AT+CMGS

 
Anonymous's picture

I have two Vodafone 3565-H modem ,one modem does not work with
3G but it works with 2G ,When Ii use Same SIM in another modem with same conditions it works very will in 3G and 2G
I think , this problem ,it is solved by AT command But How?
this the equation
Think you very mach

 
Anonymous's picture

I have a Tata Photon plus USB Modem. I am writing my own Connection Manager Program for connecting the USB modem to internet. But what is the message sequence for activation and connect ? Which commands shall I use ?

As of now I am writing ATD#777 to the port, but I guess username and password authentication is also required for connecting to internet.

Please Help.

Regards,
Shashi Kant

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options