net
Pgina 1 de 20
M2MSupport.net
Tutorial for SIMCOM M2M Modules
Simcom offers a range of 2G and 3G M2M modules. All the modules offers a rich set of AT command interface for developing
IP-based applications. This tutorial is intended for developers building M2M applciations with Simcom modules. With the online
AT command tester tool, this tutorial explains how to to test different AT interfaces available on Simcom modules.
Contents
AT Command Tester Introduction
How to connect to the Simcom module?
Single AT Command
Script Mode Batch of AT Commands
Modem Diagnostics
Network Selection
Data Call
Voice Call
Send/Receive SMS
Use Phonebook
Set up TCP/UDP data connection
Connect to internet through HTTP
Send/Receive file through FTP
AT Command Tester
AT command tester is a free online software tool that is used to test AT commands and other module features such as data
call, voice call, HTTP, FTP, TCP/IP, GPS, Email and other functionalities of M2M modules.
How to connect to module?
Please check that the drivers for the module are installed on your system. The module is then connected to the PC through a
USB or serial connector interface. The module is typically on the hardware development kit (HDK) or on the host platform.
Port Configuration
AT Command Tester uses Java-based serial drivers to interface to the modem. Users can connect to the modem serial port. It
is assumed that modem is connected to the PC and ATc commands can be sent to the modem serial port.
Command Mode
In the Command Mode; users can send single AT commands and get the responses. The dropdown lists 3GPP AT
commands, description and examples for each AT command.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 2 de 20
Script Mode
Users can send batch of AT commands under the Script Mode tab. They can also save and load the script from the local
machine. Users can develop their own scripts for specific set of tasks such as call setup , send SMS, HTTP access etc. Users
can also include descriptive comments in their script.
Diagnostics
Users can perform basic troubleshooting of the modem diagnostics under the Diagnostics tab. Here the AT Command Tester
tool sends the required AT commands and provides descriptive output about the state of the modem.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 3 de 20
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 4 de 20
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 5 de 20
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 6 de 20
CID-> 3
Precedence->0
Delay->0
Reliability->3
Peak->0
Mean->0
To be implemented.. Stay Tuned!!!
//Bearer service configuration
AT+CBST?
+CBST: 7,0,1
OK
Speed -> 7
Bearer Service -> Data circuit asynchronous
Connection Element -> Non transparent
//RLP configuration
AT+CRLP?
+CRLP: 61,61,48,6,0,7
OK
Radio Link Protocol (RLP) Configuration paramaters:
IWF Window Dimension ->61
MS Window Dimension->61
Acknowledge Timer->48
Retransmission Attempts->6
Protocol Version->0
//Data or voice or fax mode
AT+FCLASS?
+FCLASS: 0
OK
//USSD configuration
AT+CUSD?
+CUSD: 0
OK
//Service reporting
AT+CR?
+CR: 0
OK
Service reporting control is disabled
//Error cause code
AT+CEER
+CEER: No Cause
OK
//Signal strength
AT+CSQ
+CSQ: 21,0
OK
Signal level is -71 dbm. Signal condition is excellent.The signal strength range is -53 dbm (Excellent)
to -109 dbm (Marginal).
//Current operator
AT+COPS?
+COPS: 0,0,"AT&T"
OK
Device is currently on "AT&T" network.
//Registration status
AT+CREG?
+CREG: 0,5
OK
Device is registered and is roaming.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 7 de 20
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 8 de 20
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 9 de 20
OK
Main audio handset channel
//This is current configuration TCP context
AT+CIPSCONT?
+CIPSCONT:1
+CIPCSGP:1
Gprs Config APN:CMNET
Gprs Config UserId:
Gprs Config Password:
+CLPORT:0,0
+CIPHEAD:0
+CIPSHOWTP:0
+CIPSRIP:0
+CIPATS:0,0
+CIPSPRT:1,0
+CIPQSEND:0
+CIPMODE:0
+CIPCCFG:5,2,1024,1
+CIPMUX:0
+CIPDPDP:1,10,3
+CIPRXGET:0
+CIPQRCLOSE:0
TCP connection is closed by remote server
+CIPUDPMODE:0
OK
//Multi or single IP configuration
AT+CIPMUX?
+CIPMUX: 0
OK
Device configured for multi IP connection
//TCP and UDP are configured to use following ports
AT+CLPORT?
TCP: 0
UDP: 0
OK
//TCP connection profile
AT+CSTT?
+CSTT: "CMNET","",""
OK
APN->"CMNET"
USER->""
PASSWORD->""
//Local IP address
AT+CIFSR
+CME ERROR: 3
IP not avaialble. Check if the PDP context has been activated
The connection status is:
//IP status
AT+CIPSTATUS
OK
STATE: IP INITIAL
//Primary and secondary DNS configuration
AT+CDNSCFG?
PrimaryDns: 0.0.0.0
SecondaryDns: 0.0.0.0
OK
Primary DNS IP address is 0.0.0.0
Secondary DNS IP address is 0.0.0.0
//IP Header configuration
AT+CIPHEAD?
+CIPHEAD: 0
OK
IP header is added, format is "+IPD,data length"
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 10 de 20
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 11 de 20
+FTPTYPE: "I"
OK
FTP transfer type is binary.
//FTP store option
AT+FTPPUTOPT?
+FTPPUTOPT: "STOR"
OK
//FTP server address
AT+FTPSERV?
+FTPSERV: ""
OK
FTP Server name is not set
//FTP user name
AT+FTPUN?
+FTPUN: ""
OK
FTP user name is not set
//FTP password
AT+FTPPW?
+FTPPW: ""
OK
//FTP GET file name
AT+FTPGETNAME?
+FTPGETNAME: ""
OK
FTP GET file name is not set
//FTP directory path
AT+FTPGETPATH?
+FTPGETPATH: ""
OK
FTP GET Path name is not set
//Current FTP application context:
AT+FTPSCONT?
+FTPSCONT:1
+FTPSERV: ""
+FTPPORT: 21
+FTPUN: ""
+FTPPW: ""
+FTPCID: 1
+FTPMODE: 1
+FTPTYPE: "I"
+FTPPUTOPT: "STOR"
+FTPREST: 0
+FTPGETNAME: ""
+FTPGETPATH: ""
+FTPPUTNAME: ""
+FTPPUTPATH: ""
+FTPTIMEOUT: 0
OK
//FTP State
AT+FTPSTATE
+FTPSTATE:0
OK
FTP in idle state.
Data Call
The Data Call tab provides the interfaces to setup data call with the GSM network. Get PDP Contexts button will list all the
PDP context profiles stored on the SIM. Users can also add or update new PDP context profile. Users can then connect to the
selected profile. AT Command Tester will first check whether the device is registered on the network. If so, it will attach and
connect to the network with the selected PDP context credentials.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 12 de 20
Voice Call
AT Command Tester can also be used voice calls, both incoming and outgoing.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 13 de 20
SMS
AT Command Tester provides easy to use interface to send/receive SMS messages. SMS message format can be text mode
or PDU mode.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 14 de 20
Phone Book
The phone book stored on the SIM can be edited/added/deleted through the Phone Book tab of the AT Command Tester.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 15 de 20
Network Selection
Network selection feature allows the user to select the available network.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 16 de 20
HTTP
The HTTP function is only implemented for the SIMCOM modules. Users can test HTTP Get and Post using the AT Command
Tester.HTTP connection uses bearers that need to be setup. APN is unique to each network. Usually you can do a Google
search for a networks APN. Once bearer is set-up, then a bearer connection needs to be set-up. After the bearer has a
sucessful conenction, an HTTP connection can be established.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 17 de 20
+CREG: 0,5
OK
Device is registered and is roaming.
//Query if the bearer has been setup
Querying bearer 1 .
AT+SAPBR=2,1
+SAPBR: 1,1,"10.104.136.88"
OK
Bearer 1 is Connected.IP address is "10.104.136.88"
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
//Set the CID
AT+HTTPPARA="CID",1
OK
//HTTP action is read
AT+HTTPACTION=0
OK
HTTP GET is sucessful
//Read the HTTP response
AT+HTTPREAD
+HTTPREAD:58
Sucessful HTTP GET test. Data received from m2msupport.net
OK
//Terminating HTTP session..
AT+HTTPTERM
OK
FTP
This allows users to test FTP Get and Put functions using the SIMCOM modules. File Transfer Protocol (FTP) is commonly
used to send/receive files from a remote server. First a bearer connection needs to be established just as we did in the HTTP
example. After a bearer has a successful IP connection, we can use the FTP AT commands as shown below.
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 18 de 20
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 19 de 20
TCP/UDP
SIMCOM modules have in-built TCP/UDP stack. AT command tester provides interfaces to test M2M TCP/UDP functions of
SIMCOM modules.The APN is usually specific to the network. You can get the APN information stored in the device in the
Data Call tab.Once a successful TCP connection is establised, you can send data
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014
Pgina 20 de 20
//Attaching to network...
AT+CGATT=1
OK
//Setting up APN for TCP connection...
AT+CSTT="bluevia.movistar.es"
OK
//Bring up GPRS Connection...
AT+CIICR
OK
//Get the local IP address
AT+CIFSR
10.0.131.15
//Start TCP connection
AT+CIPSTART="TCP","74.124.194.252","80"
OK
CONNECT OK
TCP connection success
Sending TCP data
//Send data. Below data is HTTP formatted.
AT+CIPSEND
>
GET /m2msupport/http_get_test.php HTTP/1.1
Host:www.m2msupport.net
Connection:keep-alive
SEND OK
//Response from remote server.
HTTP/1.1 200 OK
Date: Mon, 20 Jan 2014 19:44:37 GMT
Server: Apache/2.2.26 (Unix) mod_ssl/2.2.26 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
Keep-Alive: timeout=3, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8
3a
Sucessful HTTP GET test. Data received from m2msupport.net
0
CLOSED
TCP connection is closed by remote server
http://m2msupport.net/m2msupport/tutorial-for-simcom-m2m-modules/
05/11/2014