27
SIMCom All right Reserved 1 SIM900 ATC Introduction [email protected]

SIM900 ATC English)

Embed Size (px)

Citation preview

Page 1: SIM900 ATC English)

SIMCom All right Reserved 1

SIM900 ATC Introduction

[email protected]

Page 2: SIM900 ATC English)

SIMCom All right Reserved 2

SIM900 Platform Overview

Hardware Platform

PNX4851 single solution( BB+Transceiver) + RF7161 + ST/SA(64/32)

Software Platform

Based on ARM926EJ-S, CEVA Teak DSPRun on 156 MHzOS RTK-E: philips real time kernelBuild environment

– RVCT2.2 [ Build 616]– Cygwin_NT-5.1 1.5.18

Page 3: SIM900 ATC English)

SIMCom All right Reserved 3

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;

Page 4: SIM900 ATC English)

SIMCom All right Reserved 4

Special Care

Power off & RF reset

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 conditionsAT+CPOWD=0 // power off in emergency conditions

AT+CFUN =<fun>,<rst> add reset parameter.

AT+CFUN=0,1AT+CFUN=1,1

Note:<fun>supports mode 0,1 and 4. While RF could not be switched between mode 0 and mode 4.

Page 5: SIM900 ATC English)

SIMCom All right Reserved 5

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.

Page 6: SIM900 ATC English)

SIMCom All right Reserved 6

IIII?  AT // after power on, uppercase command should be sent

OKAT+IPR?

+IPR: 0

OKATI

SIM900 R11.0

OKAT+GSV // this command can show firmware version details

SIMCOM_LtdSIMCOM_SIM900Revision:1137B01SIM900M32_ST

OK

Sample:

Page 7: SIM900 ATC English)

SIMCom All right Reserved 7

SIM900 TCPIP Protocol Introduction

Page 8: SIM900 ATC English)

SIMCom All right Reserved 8

TCPIP Protocol Architecture

Transparent mode

SIM300

Non-Transparent mode

Server (TCP)ClientClient

CIPMUX(10id)

Page 9: SIM900 ATC English)

SIMCom All right Reserved 9

SIM900

CIPMUX=0 CIPMUX=1 (8id)

Client Server

Transparent mode NON-Transparent mode NON-Transparent mode

ServerClient

Page 10: SIM900 ATC English)

SIMCom All right Reserved 10

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)

Page 11: SIM900 ATC English)

SIMCom All right Reserved 11

AT+CIPMUX=0

OKAT+CIPMODE=0 // non-transparent mode

OKAT+CIPSTART=“TCP","116.228.221.51","8011"

OK

CONNECT OKAT+CIPSEND=5 // send data in fixed length

> HELLOSEND OKAT+CIPACK

+CIPACK: 5, 5, 0

OKAT+CIPSEND

> 0123456789[ctrl+z] // send data by control codeSEND OKAT+CIPACK

+CIPACK: 15, 15, 0

OK

CIPMUX=0

AT+CIPMUX=0

OKAT+CIPMODE=1 // transparent mode

OKAT+CIPSERVER=1,2200 // open

OK

SERVER OKREMOTE IP: 211.136.130.1

CONNECT // +++

OKAT+CIPSERVER=0 // Only close listening status

OK

SERVER CLOSE

HELLO SIM900 // data from remote clientAT+CIPCLOSE=1 // close socket forcibly without ACK

CLOSE OK

Page 12: SIM900 ATC English)

SIMCom All right Reserved 12

CIPMUX=1

AT+CIPMUX=1 // multiplex IP connection

OKAT+CIPMODE=0 // this command is invalid under CIPMUX=1 mode

+CME ERROR: operation not allowedAT+CIPMODE=1

+CME ERROR: operation not allowedAT+CSTT

OKAT+CIICR

OKAT+CIFSR

10.79.161.250 // module has attached GPRS network

Step 1

Page 13: SIM900 ATC English)

SIMCom All right Reserved 13

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 OKAT+CIPSTART=2,"UDP","116.228.221.51","9015"

OK

2, CONNECT OKAT+CIPSEND=1,5 // send data in fixed length

> HELLO1, SEND OKAT+CIPSEND=2 // here, “2” means index 2 connection, not data length

> SIMCOM[ctrl+z] // send data via control code2, SEND OK

Step 2

Page 14: SIM900 ATC English)

SIMCom All right Reserved 14

AT+CIPACK=2

+CIPACK: 6, 0, 6 // UDP

OKAT+CIPACK=1

+CIPACK: 5, 5, 0 // TCP

OKAT+CIPSEND=2,10

> 01234567892, SEND OKAT+CIPACK=2

+CIPACK: 16, 0, 16

OK

Step 3

AT+CIPSEND?

+CIPSEND: 0,1460

+CIPSEND: 1,1380

+CIPSEND: 2,1460

+CIPSEND: 3,0

+CIPSEND: 4,0

+CIPSEND: 5,0

+CIPSEND: 6,0

+CIPSEND: 7,0

OK

Page 15: SIM900 ATC English)

SIMCom All right Reserved 15

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

Step 4

Note:under CIPMUX=1mode,after setup server function, 7 connections is maximum and allowed to setup.

Page 16: SIM900 ATC English)

SIMCom All right Reserved 16

Quick send mode

AT+CIPMUX=0

OKAT+CIPMODE=0

OKAT+CIPSTART="TCP","116.228.221.51","8011"

OK

CONNECT OKAT+CIPQSEND=1

OKAT+CIPSEND=5

> HELLODATA ACCEPT:5AT+CIPSEND=10

> 0123456789DATA ACCEPT:10 // here, data just sent to module buffer successfullyAT+CIPACK

+CIPACK: 15, 15, 0 // you should check the status of data sent from outside

OK

Page 17: SIM900 ATC English)

SIMCom All right Reserved 17

AT+CIPMUX=0

OKAT+CIPMODE=0

OKAT+CSTT

OKAT+CIICR

OKAT+CIFSR

10.77.87.14AT+CDNSGIP="WWW.SIM.COM"

OK

+CDNSGIP: 1,"WWW.SIM.COM","58.32.231.146"

AT+CIPSTART="TCP","WWW.YAHOO.COM",80

OK

CONNECT OKAT+CIPSEND=5

> HELLODATA ACCEPT:5AT+CIPACK

+CIPACK: 5, 5, 0

OKAT+CIPQSEND=0

OKAT+CIPSEND=10

> 0123456789SEND OK

DNS Parser

Page 18: SIM900 ATC English)

SIMCom All right Reserved 18

SIM Application Toolkit (STK)

Page 19: SIM900 ATC English)

SIMCom All right Reserved 19

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.

Page 20: SIM900 ATC English)

SIMCom All right Reserved 20

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.

etisalatetisalat

1 My Account1 My Account

2 Services2 Services

3 Emergency3 Emergency

4 Customer Care4 Customer Care

5 ???5 ???

1 Balance or Bill1 Balance or Bill

2 Balance Refill2 Balance Refill

3 Balance Transfer3 Balance Transfer

1 Police1 Police

2 Ambulance2 Ambulance

3 Fire Brigade3 Fire Brigade

Note, the fifth menu item is present with Arabic alphabet, my phone does not support this code.

Page 21: SIM900 ATC English)

SIMCom All right Reserved 21

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"

Page 22: SIM900 ATC English)

SIMCom All right Reserved 22

③ 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.

Page 23: SIM900 ATC English)

SIMCom All right Reserved 23

④ 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

Page 24: SIM900 ATC English)

SIMCom All right Reserved 24

⑥ 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

Page 25: SIM900 ATC English)

SIMCom All right Reserved 25

⑧ 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

Page 26: SIM900 ATC English)

SIMCom All right Reserved 26

⑩ 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"

Page 27: SIM900 ATC English)

SIMCom All right Reserved 27

Thank You !