Introduction

AT Command Tester is an online tool for testing AT commands and other module features such as data call, voice call,HTTP, network registration, SMS, Phonebook, signal quality, SIM interface, device info etc.

AT Command Tester can be used with 2G Modules (GPRS/EDGE/1x) or 3G Modules (HSDPA/HSPA/EVDO) or 4G modules (LTE)

How to use AT Command Tester with the GPRS Shield

AT Command Tester need to communicate directly with the SIM908 module.

  1. Download the sketch under the section 'How to drive the GSM Mode via USB port' from above to you arduino board.
  2. Press the 'RST' button on the SIM908 shield. Make sure that only the 'PWR' LED is turned on red. The 'STAT' and 'NET' LED should be OFF.
  3. On the AT Command Tester, press the 'Find Ports' button. It should list the port that your Arduino board is connected to. Then select the right baud rate. The default rate for the shield is set to 9600. Then press 'Connect' button. If a successful connection is established, AT Command Tester should get device info as shown below. Now you can send supported AT commands in the 'Command' tab or exercise any other features from the other tabs.

<File:Port> connect.PNG

Send batch of AT Commands

Under the 'Script Mode' tab, you can send batch of AT commands. You can create your own script and store it on your local computer.

<File:Script_mode.PNG>

Modem Diagnostics

The 'Diagnostics' tab can be used to get some basic modem information such as signal strength, whether the modem is registered, operator info, connection status etc.

AT+CGMI

SIMCOM_Ltd<br> OK<br>Manufacturer : SIMCOM_Ltd<br>AT+CGMM

SIMCOM_SIM908

OK Model Number : SIMCOM_SIM908

AT+CGMR

Revision:1137B04SIM908M64_ST

OK Revision : Revision:1137B03SIM900M64_ST

AT+CSQ

+CSQ: 8,0

OK Signal level is -97 dbm. Signal condition is marginal.The signal strength range is -53 dbm (Excellent) to -109 dbm (Marginal).

AT+CREG?

+CREG: 0,1

OK The device is registered in home network.

AT+CGACT?

+CGACT: 1,0 +CGACT: 2,0 +CGACT: 3,0

OK Device is NOT connected.

AT+COPS?

+COPS: 0,0,"T-Mobile"

OK Device is currently on "T-Mobile" network.

AT+CPIN?

+CPIN: READY OK

SIM is ready.

Set up voice call

You can test incoming and outgoing voice calls with AT Command Tester.For outgoing calls, simply enter the calling number and press dial. For incoming, call the modem from an external phone. AT Command Tester will automatically detect the incoming call and provide a prompt.

<File:Voice> call.PNG

The AT command sequence for outgoing call is shown below, Checking registration status... AT+CREG? +CREG: 0,1 OK The device is registered in home network. Dialing number 858xxxxxxx

ATD858XXXXXXX;

OK Voice call successfull Hanging up the call..

ATH

OK Call sucessfully dis-connected..

AT+CNUM

+CNUM: "","1858XXXXXXX",129,7,4 OK

Data Call

To set up a data call, you need to activate a PDP context which has information about the data connection parameters such as carrier APN, type of IP connection etc. You can create/edit/delete PDP contexts using the AT Command Tester application. to setup a data call, select the PDP Context and simply connect. AT Command Tester will check whether the modem is registered in the network before setting up the data connection.

<File:Data_call.PNG>

AT+CGDCONT?

+CGDCONT: 1,"IP","epc.tmobile.com","0.0.0.0",0,0 +CGDCONT: 2,"IP","test5","0.0.0.0",0,0 +CGDCONT: 3,"IP","","0.0.0.0",0,0

OK Checking registration status...

AT+CREG?

+CREG: 0,1

OK The device is registered in home network.

Checking if device is already connected...

AT+CGACT?

+CGACT: 1,0 +CGACT: 2,0 +CGACT: 3,0

OK AT+CMEE=1

OK Attaching to network... AT+CGATT=1

OK

Connecting...

AT+CGACT=1, 1

OK Connect Sucessful

SMS

AT Command Tester can also test SMS send/receive function of the SIM908 GPRS shield. Under the 'SMS' tab, you can list/view/delete all the stored SMS messages. You can also send SMS message to a mobile number.

<File:Sms.PNG>

Here is the sequence of AT commands to send SMS message,

Checking registration status...

AT+CREG?

+CREG: 0,1

OK The device is registered in home network.

AT+CMGS="858XXXXXXX"

> Test Message with AT Command Tester�

+CMGS: 20

OK SMS Send successful

Network Selection

Network selection is a feature that enables the user to manually select from the available networks.

<File:Network_selection.PNG>

Here are the commands for Network Selection,

Finding Networks. Please wait..

AT+COPS=?

+COPS: (2,"T-Mobile","T-Mobile","310260"),(1,"AT&T","AT&T","310410"),,(0,1,4),(0,1,2)

OK Networks found

Phonebook

Phonebook feature enables user to add/delete/read/ phonebook entries stored on the SIM.

<File:Phonebook.PNG>

Getting phonebook entries..

AT+CPBR=1,99

+CPBR: 1,"*233",129,"Refill Now"

+CPBR: 2,"#999#",255,"Check Balance"

+CPBR: 3,"8878878878",129,"Test"

OK

HTTP

HTTP functions of SIM908 can be tested with the AT Command Tester.

<File:Http.PNG>

Getting Bearer profiles..

AT+SAPBR=4,1

+SAPBR: CONTYPE: GPRS APN: PHONENUM: USER: PWD: RATE: 2

OK AT+SAPBR=4,2

+SAPBR: CONTYPE: GPRS APN: PHONENUM: USER: PWD: RATE: 2

OK AT+SAPBR=4,3

+SAPBR: CONTYPE: GPRS APN: PHONENUM: USER: PWD: RATE: 2

OK

Checking registration status...

AT+CREG?

+CREG: 0,1

OK The device is registered in home network.

Querying bearer 1 .

AT+SAPBR=2,1

+SAPBR: 1,1,"162.184.222.162"

OK Bearer 1 is Connected.IP address is "162.184.222.162"

Bearer 1 is Connected.

Initializing HTTP service...

AT+HTTPINIT

OK

Setting up HTTP parameters..

AT+HTTPPARA="URL","http://www.m2msupport.net/m2msupport/http_get_test.php"

OK AT+HTTPPARA="CID",1

OK AT+HTTPACTION=0

OK

HTTP GET is sucessful

AT+HTTPREAD

+HTTPREAD:58 Sucessful HTTP GET test. Data received from m2msupport.net OK Terminating HTTP session..

AT+HTTPTERM

OK

FTP With the AT Command Tester, you can tester FTP get and put functions of SIM908 module.

<File:Ftp.PNG>

Checking registration status...

AT+CREG?

+CREG: 0,1

OK The device is registered in home network.

Querying bearer 1 .

AT+SAPBR=2,1

+SAPBR: 1,1,"162.184.222.162"

OK Bearer 1 is Connected.IP address is "162.184.222.162"

Bearer 1 is Connected.

Setting up FTP parameters..

AT+FTPCID=1

OK

AT+FTPSERV="ftp.m2msupport.net"

OK AT+FTPUN="xxxxxx"

OK AT+FTPPW="xxxxxxx"

OK AT+FTPGETNAME="ftptest.txt"

OK AT+FTPGETPATH="/www/m2msupport/"

OK AT+FTPGET=1

OK

+FTPGET:1,1 FTP session sucessfully started

AT+FTPGET=2,1024

+FTPGET:2,784 2-11-16 10:53:34.769 ----------------------------------------------- eclipse.buildId=M20120914-1800 java.version=1.6.0_16 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.m2e.logback.appender 4 0 2012-11-16 12:11:54.493 !MESSAGE Unable to update index for central|http://repo.maven.apache.org/maven2: C:\Users\sgobi\.m2\repository\.cache\m2e\1.2.0\26522e0d83a422eed93329ece7565cfc\nexus-maven-repository-index.zip (The system cannot find the file specified)

!ENTRY org.eclipse.jdt.ui 4 10001 2012-11-16 13:21:21.138 !MESSAGE Internal Error !STACK 1 OK AT+FTPGET=2,1024

+FTPGET:2,0

OK FTP data transfer is complete

+FTPGET:1,0 FTP session end

TCP

SIM908 has internal TCP/UDP stack which can be used to send data to remote server. TCP function can be tested with AT Command Tester as shown below,

<File:Tcp.PNG>

Checking registration status...

AT+CREG?

+CREG: 0,1

OK The device is registered in home network.

Checking if device is already connected...

AT+CGACT?

+CGACT: 1,0 +CGACT: 3,0

OK AT+CMEE=1

OK Attaching to network...

AT+CGATT=1

OK

Setting up APN for TCP connection...

AT+CSTT="epc.tmobile.com"

OK APN setup for TCP connection successful..

Bring up GPRS Connection...

AT+CIICR

OK GPRS Connection bring up sucessful..

AT+CIFSR

100.131.196.173

AT+CIPSTART="TCP","74.124.194.252","80"

OK

CONNECT OK TCP connection success

Sending TCP data

AT+CIPSEND

> GET http://www.m2msupport.net/m2msupport/tcp_udp_test.php HTTP/1.0

SEND OK HTTP/1.1 200 OK Date: Tue, 14 May 2013 12:39:48 GMT Server: Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 X-Powered-By: PHP/5.2.17 Content-Type: text/html;charset=utf-8 Connection: close

Successful response from m2msupport.net for TCP/UDP test CLOSED TCP connection is closed by remote server