当前位置:首页 >> 信息与通信 >>

SIM900 AT TRAINING


SIM900 AT COMMAND TRAINING
Liu daipeng

AT Commands Overview
?

Voice Call and CSD

?
? ?

GSM 07.07
GPRS AT commands TCP/IP stack

AT commands

2

Voice Call and CSD
? ATD MO call to dial a number

Voice Call
Data Call ? ATA ? ATH MT to answer a call Disconnect existing connection Connected line identification presentation Calling line identification presentation

? AT+COLP ? AT+CLIP ? ATS0

Set number of rings before automatically answering the call

? AT&D1
? AT+CLCC List current calls of ME
3

EXAMPLE--1
atd18616527115;
? ? at+clcc ? ? OK

+CLCC: 1,0,2,0,0,"18616527115",129,"" OK

? at+clcc
? ? +CLCC: 1,0,0,0,0,"18616527115",129,"" OK

? ath
? OK
4

EXAMPLE--2
? at+clip=1 ? ? ? ? ata ? OK RING +CLIP: "18616527115",129,"",,"",0

OK

? NO CARRIER
5

EXAMPLE--3
? at+colp=1 ? OK ? atd18616527115; ? ? +COLP: "18616527115",129,"","" OK

? NO CARRIER
6

GSM 07.07
? AT+CSQ ? AT+CPIN Signal Quality Report Enter PIN

? AT+CREG Network Registration ? AT+COPS Operator Selection

7

EXAMPLE
? at+csq

? ?
?

+CSQ: 22,0 OK
at+cpin?

? ?
?

+CPIN: READY OK
at+creg?

? ?
?

+CREG: 0,1 OK
at+cops?

? ?

+COPS: 0,0,"CHINA MOBILE" OK
8

GPRS AT commands
? AT+CGATT Attach or Detach from GPRS Service

? AT+CGDCONT DEFINE PDP CONTEXT

9

EXAMPLE
? at+cgatt? ? +CGATT: 1 ? OK
? at+cgdcont=1,"IP","cmnet" ? OK ? atd*99# ? CONNECT ? PPP NEGOTIATION
10

TCP/IP stack AT commands
? AT+CIPMUX
? AT+CIPSTART ? AT+CIPSEND
Start Up Multi-IP Connection
Start Up TCP or UDP Connection Send Data Through TCP or UDP Connection

? AT+CIPSHUT
? AT+CLPORT ? AT+CSTT ? AT+CIICR

Deactivate GPRS PDP Context
Set Local Port

Start Task and Set APN, USER NAME, PASSWORD Bring Up Wireless Connection with GPRS or CSD

? AT+CIFSR Get Local IP Address ? AT+CIPSTATUS Query Current Connection Status ? AT+CIPMODE ? AT+CIPCCFG
Select TCPIP Application Mode Configure Transparent Transfer Mode
11

TCP/IP Mode
? Command mode ? Transparent mode

12

Command mode
? Three signals (TXD,RXD,GND) is ok. ? When meeting exception, use CIPSHUT first, then reconnect. ? When receiving prompt”>”, you must wait 200ms then send data to module. ? You must wait send ok, then send next package, but you’d better set a timer (in general 2 minutes), when time out, restart the TCP connection. ? Suggest to set AT+CIPHEAD=1 to distinguish sending and receiving data.
13

selecting TCPIP connection mode
? AT+CIPMUX=<n> ? n=0, it is single connection; ? n=1, it is multi connection. ? The default configuration is single ? connection. ? For single connection, SIM900 supports ? both transparent mode and non-transparent ? mode.
14

How to establish a TCP server connection ? “AT+CIPSERVER=1,”<port>” to start the server function and set listening port. ? “AT+CIPSERVER=0” to close the listening status. ? AT+CIPCLOSE to close the TCP connection.

15

TE AT+CIPMUX=1 OK AT + CGATT? +CGATT:1 AT+CSTT=”cmnet” OK AT+CIICR OK AT+CIFSR
10.76.40.73 AT+CIPSERVER=1,7800

MT

OK SERVER OK
0, REMOTE IP: 10.76.40.73 +RECEIVE,0,39: sim900 multi connection TCP server test AT+CIPSEND=0 > hello client 0, SEND OK AT+CIPSTART=1,”TCP”,”116.228.221.51”,”8500” OK 1, CONNECT OK

16

Fix local port of TCP/UDP client
? AT+CLPORT=<mode>,<port>

? <mode> ? "TCP" TCP local port ? "UDP" UDP local port ? <port> 0-65535 A numeric parameter which ? indicates the local port. ? 0 is default value, a port can be dynamically ? allocated a port.

17

DATA RECEIVING RELATED

? The module will receive data automatically if there is

data coming from remote server.
? “AT+CIPHEAD=1” helps to add IP header in the format

“+IPD(data length):payload”.
? “AT+CIPSRIP=1” helps to show the data source information in the format “RECV FROM: <IP ADDRESS>:<PORT >”.

18

Command and response flow (APN)
TE AT + CPIN? +CPIN: READY OK AT + CREG? +CREG:0,1 AT + CGATT? +CGATT:1 AT+CSTT=“APN” OK AT+CIICR OK AT+CIFSR IP ADDRESS AT + Cipstart=”TCP”,”IP”,”PORT” OK CONNECT OK
19

MT

Command and response flow (Send TCP/UDP data)

TE

AT+CIPSEND

MT

> 12345678[ctrl+z] SEND OK AT+CIPSEND=10 > 0123456789 SEND OK AT+CIPATS=1,1 OK AT+CIPSEND > 12345678 SEND OK

20

Transparent mode ? You need to add CTS,DCD and RI pin connection at least. ? You need to establish a handshake between client and server. ? You also need to set a timer (in general 5 minutes) to detect the connection, once time out , go back to command mode and restart the TCP connection.

21

Configure Transparent Mode ? AT+CIPMODE=1 //select transparent mode OK ? AT+CIPCCFG=3,2,256,1 //configure the mode: retry 3 ? times if sending failed //wait for 2*200ms to send one packet //send data at once if there are 256 bytes in the buffer //Escape sequence(+++) is allowed ? AT&D1 //DTR pin is allowed to switch serial port from ? data mode to command mode

22

Startup a TCP connection

? AT+CIPSTART=”TCP”,”222.66.38.187”,”5000” ? //startup a TCP connection OK CONNECT //Connection is established, serial port is in data mode //and DCD pin will goes low

23

Handling incoming call and SMS in data mode
? RI pin of serial port will give a 50ms low pulse when a call is incoming during data mode. ? RI pin will give a 120ms low pulse when a short message is received. To handle the incoming call or SMS, you need to enter command mode first (using DTR or +++), and then the module will give the normal unsolicited responses as following: ? RING (incoming call) ? +CMTI:”SM”,17 (short message)

And then it is able to answer the call or read the short message.

24

Switching from data mode to command mode

1: +++
To use this sequence, there should be 500ms idle period before and after this sequence. Besides, the interval between each + should not exceed 20ms, otherwise it will be treated as TCP/IP data. 2: Pull DTR low If switched successfully, OK will be returned.
25

Switching from command mode to data mode

ATO command
If switched successfully ,CONNECT will be returned.

26

Command and response flow (transparent mode )
TE AT + CREG? +CREG: 0,1 AT + CGATT? +CGATT: 1 AT + CIPMODE = 1 OK AT + CIPCCFG = 3, 2, 256, 1 OK AT & D1 OK AT + CIPSTART = “TCP”,”IP”,”PORT” OK
27

MT

Command and response flow (transparent mode )
TE CONNECT OK DATA +++ OK COMMAND ATO CONNET DATA +++ OK AT + CIPSHUT SHUT OK MT

28

THANK YOU !

29


相关文章:
SIM900A GSM 模块使用
SIM900A GSM 模块使用_信息与通信_工程科技_专业资料。基于51单片机的GSM 模块使用 SIM900A SIM900A GSM 模块使用 1. GSM 的介绍 2. SIM900A---AT 指令集...
SIM900A发送数据参考流程
SIM900A发送数据参考流程_计算机硬件及网络_IT/计算机_专业资料。AT+CREG? +CREG: 1,1 OK AT+CGATT? +CGATT: 1 查询网络注册信息 查看是否附着 GPRS 业务 0...
SIM900 tcp异常处理
SIM900 tcp异常处理_计算机软件及应用_IT/计算机_专业资料。建议你采用如下方法...OK // 查询之前连接数据发送状态 AT+CSQ +CSQ: 0,0 OK AT+CIPSEND > ...
SIM300_SIM900调试心得
SIM300_SIM900调试心得_电子/电路_工程科技_专业资料。SIM300 & SIM900 调试心得...在尝试连接(AT+CIPSTART)之前,一定要查询(AT+CIPSTATUS)当前状态, 一共有...
3、SIM800-sim900系类模块GPRS部分调试笔记
3、SIM800-sim900系类模块GPRS部分调试笔记_电子/电路_工程科技_专业资料。一...查询模块是否附着 GPRS 网络 第四步:AT+CSTT 设置 APN 第五步:AT+CIICR ...
SIM900A调试方法
SIM900A 调试方法 使用电脑控制的方法在教程中有详细的介绍, 使用 USB 设备将...可以先发送一条指令,如 AT 指令(注意,第一条指令要都大写) ,注意大多数指令...
SIM900A模块系列调试(未完)
使用标准的 AT 指令对 SIM900A 模块进行控制,实现打电话发短信等功能。所以,您要 做的是:使用您的控制器(包括单片机、电脑等)连接到我们的 SIM900A 模块的 ...
SIM900基站定位调试笔本_北良电子
SIM900基站定位调试笔本_北良电子_电子/电路_工程科技_专业资料。第 1 步:ATE1 握手并设置回显 第 2 步:AT+CGMR 查看 SIM900 的版本信号 第 3 步:AT+...
GPRS(SIM900A)模块工装制作及使用说明
GPRS(SIM900A)模块工装制作及使用说明_电子/电路_工程科技_专业资料。gprs msin900芯片说明 GPRS(SIM900A)模块工装及使用说明 1 工具 烙铁、焊锡丝(少量) 、...
SIM900 TCP IP应用
SIM900 TCP IP应用_电子/电路_工程科技_专业资料。SIM900 TCP IP 应用目录 1...51”,”9600” AT+CIPSEND=1 AT+CIPSEND=2 AT+CIPSTATUS AT+CIPSERVER=0...
更多相关标签:
sim900a at命令手册 | sim900 at指令 | sim900a at | sim900a at指令 | sim900aat指令 | sim900 at | sim900资料 | sim900a |