SIM900 ATC Introduction
Albert@2010.1
SIMCom All right Reserved 1
SIM900 Platform Overview
Hardware Platform
PNX4851 single solution( BB+Transceiver) + RF7161 + ST/SA(64/32)
Software Platform
Based on ARM926EJ-S, CEVA Teak DSP
Run on 156 MHz
OS RTK-E: philips real time kernel
Build environment
– RVCT2.2 [ Build 616]
– Cygwin_NT-5.1 1.5.18
SIMCom All right Reserved 2
Main difference with SIM300
1) Platform;
2) Power off and RF reset;
3) Auto-bauding;
4) Embedded TCPIP protocol;
5) STK;
6) Error code;
7) Hardware flow control is closed in default,should be
opened by AT+IFC=2,2;
SIMCom All right Reserved 3
Special Care
Power off & RF reset
z AT+CPOWD add power off in emergency conditions,in this case, “NORMAL
POWER DOWN” will not be present.
AT+CPOWD=1 // power off in normal conditions
AT+CPOWD=0 // power off in emergency conditions
z AT+CFUN =<fun>,<rst> add reset parameter.
AT+CFUN=0,1
AT+CFUN=1,1
Note:<fun>supports mode 0,1 and 4. While RF could not be switched between mode
0 and mode 4.
SIMCom All right Reserved 4
Auto-Bauding
SIM900 supports baud rate from 1200 bps to 115200 bps, also support auto-
bauding mode.
When power on under auto-bauding mode, the first letter of command should
be uppercase, such as “AT” or “At”, otherwise, module will not give any
response. Usually, command with all uppercase letters are strongly
recommendatory.
Note, hexadecimal code “49 49 49 49 FF FF FF FF” will be present at the
beginning of module power on.
SIMCom All right Reserved 5
Sample:
IIII?
AT // after power on, uppercase command should be sent
OK
AT+IPR?
+IPR: 0
OK
ATI
SIM900 R11.0
OK
AT+GSV // this command can show firmware version details
SIMCOM_Ltd
SIMCOM_SIM900
Revision:1137B01SIM900M32_ST
OK
SIMCom All right Reserved 6
SIM900 TCPIP Protocol Introduction
SIMCom All right Reserved 7
TCPIP Protocol Architecture
SIM300
Transparent mode Non-Transparent mode
Client Client Server (TCP)
CIPMUX(10id)
SIMCom All right Reserved 8
SIM900
CIPMUX=0 CIPMUX=1 (8id)
Transparent mode NON-Transparent mode NON-Transparent mode
Client Server Client Server
SIMCom All right Reserved 9
SIM900 TCPIP protocol special features
1) CIPMUX mode;
2) DNS parser;
3) AT+CIPCLOSE=1;
4) AT+CIPSEND?
5) AT+CIPQSEND;AT+CIPACK
6) TCP SERVER Configuration (nothing to do with AT+CLPORT)
SIMCom All right Reserved 10
CIPMUX=0
AT+CIPMUX=0 AT+CIPMUX=0
OK OK
AT+CIPMODE=0 // non-transparent mode AT+CIPMODE=1 // transparent mode
OK OK
AT+CIPSTART=“TCP","116.228.221.51","8011" AT+CIPSERVER=1,2200 // open
OK OK
CONNECT OK SERVER OK
AT+CIPSEND=5 // send data in fixed length REMOTE IP: 211.136.130.1
> HELLO CONNECT
SEND OK // +++
AT+CIPACK OK
AT+CIPSERVER=0 // Only close listening status
+CIPACK: 5, 5, 0
OK
OK
AT+CIPSEND SERVER CLOSE
> 0123456789[ctrl+z] // send data by control code HELLO SIM900 // data from remote client
SEND OK AT+CIPCLOSE=1 // close socket forcibly without ACK
AT+CIPACK
CLOSE OK
+CIPACK: 15, 15, 0
OK
SIMCom All right Reserved 11
CIPMUX=1
Step 1
AT+CIPMUX=1 // multiplex IP connection
OK
AT+CIPMODE=0 // this command is invalid under CIPMUX=1 mode
+CME ERROR: operation not allowed
AT+CIPMODE=1
+CME ERROR: operation not allowed
AT+CSTT
OK
AT+CIICR
OK
AT+CIFSR
10.79.161.250 // module has attached GPRS network
SIMCom All right Reserved 12
Step 2
AT+CIPSERVER=1,2200
OK
SERVER OK
0, REMOTE IP: 211.136.130.129 // Remote client access this server successfully
AT+CIPSTART=1,"TCP","116.228.221.51","8011"
OK
1, CONNECT OK
AT+CIPSTART=2,"UDP","116.228.221.51","9015"
OK
2, CONNECT OK
AT+CIPSEND=1,5 // send data in fixed length
> HELLO
1, SEND OK
AT+CIPSEND=2 // here, “2” means index 2 connection, not data length
> SIMCOM[ctrl+z] // send data via control code
2, SEND OK
SIMCom All right Reserved 13
Step 3
AT+CIPACK=2 AT+CIPSEND?
+CIPACK: 6, 0, 6 // UDP +CIPSEND: 0,1460
OK +CIPSEND: 1,1380
AT+CIPACK=1
+CIPSEND: 2,1460
+CIPACK: 5, 5, 0 // TCP
+CIPSEND: 3,0
OK
AT+CIPSEND=2,10 +CIPSEND: 4,0
> 0123456789 +CIPSEND: 5,0
2, SEND OK
AT+CIPACK=2 +CIPSEND: 6,0
+CIPACK: 16, 0, 16 +CIPSEND: 7,0
OK OK
SIMCom All right Reserved 14
Step 4
AT+CIPSTATUS
OK
STATE: IP PROCESSING
S: 0,0,"2200""LISTENING“
C: 0,0,"TCP","211.136.130.129","2020","CONNECTED"
C: 1,0,"TCP","116.228.221.51","8011","CONNECTED"
C: 2,0,"UDP","116.228.221.51","9015","CONNECTED"
C: 3,,"","","","INITIAL"
C: 4,,"","","","INITIAL"
C: 5,,"","","","INITIAL"
C: 6,,"","","","INITIAL"
C: 7,,"","","","INITIAL“
AT+CIPCLOSE=0
0, CLOSE OK
Note:under CIPMUX=1mode,after setup server function, 7 connections is maximum
and allowed to setup.
SIMCom All right Reserved 15
Quick send mode
AT+CIPMUX=0
OK
AT+CIPMODE=0
OK
AT+CIPSTART="TCP","116.228.221.51","8011"
OK
CONNECT OK
AT+CIPQSEND=1
OK
AT+CIPSEND=5
> HELLO
DATA ACCEPT:5
AT+CIPSEND=10
> 0123456789
DATA ACCEPT:10 // here, data just sent to module buffer successfully
AT+CIPACK
+CIPACK: 15, 15, 0 // you should check the status of data sent from outside
OK
SIMCom All right Reserved 16
DNS Parser
AT+CIPSTART="TCP","WWW.YAHOO.COM",80
AT+CIPMUX=0
OK
OK
AT+CIPMODE=0 CONNECT OK
AT+CIPSEND=5
OK
AT+CSTT > HELLO
DATA ACCEPT:5
OK AT+CIPACK
AT+CIICR
+CIPACK: 5, 5, 0
OK
AT+CIFSR OK
AT+CIPQSEND=0
10.77.87.14
AT+CDNSGIP="WWW.SIM.COM" OK
AT+CIPSEND=10
OK
> 0123456789
+CDNSGIP: 1,"WWW.SIM.COM","58.32.231.146" SEND OK
SIMCom All right Reserved 17
SIM Application Toolkit (STK)
SIMCom All right Reserved 18
There just have two AT commands to operate STK functions with
SIM900 platform.
AT*PSSTKI=<mode>
enable or disable STK functions.
AT*PSSTK=<response type>,[<parameter1>,…<parametern>]
realize all STK functions with this command.
SIMCom All right Reserved 19
Here, I test a SIM card from Egypt. I just make a simple introduction on how to read and
select menu items.
Note, different SIM cards maybe have different STK menu items. Let’s view what menu
this SIM card has in my cell phone platform.
etisalat
etisalat
11 Balance
Balance or
or Bill
Bill
11 My
My Account
Account 22 Balance
Balance Refill
Refill
33 Balance
Balance Transfer
Transfer
22 Services
Services
33 Emergency
Emergency 11 Police
Police
44 Customer
Customer Care
Care 22 Ambulance
Ambulance
33 Fire
Fire Brigade
Brigade
55 ???
???
Note, the fifth menu item is present with Arabic alphabet, my phone does not support this code.
SIMCom All right Reserved 20
Ok, let’s view these menu on SIM900 platform.
① power on SIM900, then enable STK function
*PSSTK: "SETUP MENU",1,4,"etisalat",0,0,1,0,0,5
// here have 5 menus
② Setup the menu with AT*PSSTK="SETUP MENU",1,0 command
OK
*PSSTK: "END SESSION"
SIMCom All right Reserved 21
③ Flesh all menu items with AT*PSSTK="GET ITEM LIST",5command
*PSSTK: "GET ITEM LIST",1,128,4,"My account",0,0,0
*PSSTK: "GET ITEM LIST",2,129,4,"Services",0,0,0
*PSSTK: "GET ITEM LIST",3,130,4,"Emergency",0,0,0
*PSSTK: "GET ITEM LIST",4,131,4,"Customer Care",0,0,0
*PSSTK: "GET ITEM LIST",5,132,2,80040639063106280649,0,0,0
OK
Note, Unicode “0639063106280649” is Arabic alphabet here.
SIMCom All right Reserved 22
④ Select the first menu with AT*PSSTK="MENU SELECTION",128command
OK
*PSSTK: "SELECT ITEM",1,4,"My Account",0,0,1,0,0,3
// here, My Account menu have three items.
⑤ Download all three items with AT*PSSTK="GET ITEM LIST",3command
*PSSTK: "GET ITEM LIST",1,12,4,"Balance or Bill",0,0,0
*PSSTK: "GET ITEM LIST",2,30,4,"Balance Refill",0,0,0
*PSSTK: "GET ITEM LIST",3,47,4,"Balance Transfer",0,0,0
OK
SIMCom All right Reserved 23
⑥ Select first item with AT*PSSTK="SELECT ITEM",1,12,0,0command
OK
*PSSTK: "NOTIFICATION",1,18,1,4,"Requesting info",0,0
⑦ Response this request with AT*PSSTK="NOTIFICATION",1,0command
OK
*PSSTK: "DISPLAY TEXT",1,1,1,0,4,"temporary error",0,0
SIMCom All right Reserved 24
⑧ Back to last menu list with AT*PSSTK="COMMAND REJECTED",1,17command
OK
*PSSTK: "END SESSION"
⑨ Select the third menu with AT*PSSTK="MENU SELECTION",130command
OK
*PSSTK: "SELECT ITEM",1,4,"Emergency",0,0,1,0,0,3
// Here, Emergency menu have 3 items
SIMCom All right Reserved 25
⑩ Download all items with AT*PSSTK="GET ITEM LIST",3command
*PSSTK: "GET ITEM LIST",1,11,4,"Police",0,0,0
*PSSTK: "GET ITEM LIST",2,23,4,"Ambulance",0,0,0
*PSSTK: "GET ITEM LIST",3,38,4,"Fire Brigade",0,0,0
OK
OK, now we can terminate STK function with below command.
AT*PSSTK="COMMAND REJECTED",1,16
OK
*PSSTK: "END SESSION"
SIMCom All right Reserved 26
Thank You !
SIMCom All right Reserved 27