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

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


相关文章:
GPRS无线模块SIM900A硬件设计注意事项
GPRS无线模块SIM900A硬件设计注意事项_电子/电路_工程科技_专业资料。GPRS 无线模块 SIM900A 硬件设计注意事项 1.引言: 时下物联网已经成为非常热门的新兴行业。...
SIM900A发送数据参考流程
SIM900A发送数据参考流程_计算机硬件及网络_IT/计算机_专业资料。AT+CREG? +CREG: 1,1 OK AT+CGATT? +CGATT: 1 查询网络注册信息 查看是否附着 GPRS 业务 0...
SIM900A拨打电话核心代码
SIM900A拨打电话核心代码_电子/电路_工程科技_专业资料。SIM900A 手机模块的 3 大功能:接拨电话,收发短信和 TCP/UDP 通信。现在的手机基本上 可以不叫手机了,...
SIM900A模块系列调试(未完)
USB--TTL 模块与 SIM900A 模块的硬件连接为:(很重要) USB--TTL 模块 TTL 端的 TXD---SIM900A 的 TTL 电平接口的 RXD USB--TTL 模块 TTL 端的 RXD-...
SIM900A调试方法
SIM900A 调试方法 使用电脑控制的方法在教程中有详细的介绍, 使用 USB 设备将模块与电脑连接,如果调试不成功,首先检查一下 USB 设备和驱动 及串口软件是否好用。...
3、SIM800-sim900系类模块GPRS部分调试笔记
3、SIM800-sim900系类模块GPRS部分调试笔记_电子/电路_工程科技_专业资料。一...查询模块是否附着 GPRS 网络 第四步:AT+CSTT 设置 APN 第五步:AT+CIICR ...
C51单片机控制sim900a收发信息c语言程序
C51单片机控制sim900a收发信息c语言程序_计算机软件及应用_IT/计算机_专业资料。用C51单片机控制SIM900a 发送和接受信息的c语言程序#...
单片机控制sim900a收发短信
单片机控制sim900a收发短信_电子/电路_工程科技_专业资料。单片机接受指定短信内容,1602显示短信内容,单片机对短信内容作判断,若为所要求的内容,则返回一条短信 ...
SIM900_基站定位调试笔记
SIM900_基站定位调试笔记_计算机软件及应用_IT/计算机_专业资料。这是带基站定位功能的SIM900A芯片的调试笔记SIM900A 开发板基站定位调试笔记注意:只有 SIM900A 基...
SIM900A V4 使用简介
SIM900A V4 使用简介_电子/电路_工程科技_专业资料。SIM900A V4 版本模块使用简介 1 模块的硬件资源与连接一组 5V 供电接口: VCC5 GND。 供电电压在 4.7-5...
更多相关标签: