0% found this document useful (0 votes)
57 views

Silo - Tips - at Command For Simcom Tcpip

Uploaded by

husam haider
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Silo - Tips - at Command For Simcom Tcpip

Uploaded by

husam haider
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

SIMCOM At Command(TCPIP)For Simcom

Document Name: AT COMMAND FOR SIMCOM TCPIP


Version: 02.01
Date: 2006-10-13
DocId: SIMCOMTCP_ATC_V2.1
Status: Release

General Notes
Simcom offers this information as a service to its customers, to support application and
engineering efforts that use Simcom products. The information provided is based upon
requirements specifically provided to Simcom by the customers. Simcom has not undertaken
any independent search for additional relevant information, including any information that
may be in the customer’s possession. Furthermore, system validation of this Simcom product
within a larger electronic system remains the responsibility of the customer or the customer’s
system integrator. All specifications supplied herein are subject to change.

Copyright
This document contains proprietary technical information which is the property of SIMCOM
Limited., copying of this document and giving it to others and the using or communication of
the contents thereof, are forbidden without express authority. Offenders are liable to the
payment of damages. All rights reserved in the event of grant of a patent or the registration of
a utility model or design. All specification supplied herein are subject to change without
notice at any time.

Page 1 of 18
SIMCOM At Command(TCPIP)For Simcom

SCOPE

Thanks you select SIMCOM GSM/GPRS module.

This product has standard AT command interface, and can provide GSM call, short message and GPRS
net services, etc.

Please read this user guide carefully. You can realize the powerful function and the easy operation
method of the module.

This module is used in voice or data communication mainly. We are not charge with the duty of
personal injury and property loss for the custom abnormal operation. Please design the corresponding
product according to the technical specification and reference in the handbook. And note the general
safe item when use mobile product especially GSM product.

This document is subject to change without notice at any time.

This document suits for SIMCOM module.

Page 2 of 18
SIMCOM At Command(TCPIP)For Simcom

CONTENTS

1 Overview

2 Details

2.1 AT+CIPSTART ............................................................................................................................ 5

2.2 AT+CIPSEND.............................................................................................................................. 5

2.3 AT+CIPCLOSE............................................................................................................................ 6

2.4 AT+CIPSHUT.............................................................................................................................. 7

2.5 AT+CLPORT ............................................................................................................................... 7

2.6 AT+CSTT..................................................................................................................................... 7

2.7 AT+CIICR.................................................................................................................................... 8

2.8 AT+CIFSR ................................................................................................................................... 8

2.9 AT+CIPSTATUS .......................................................................................................................... 9

2.10 AT+CDNSCFG ............................................................................................................................ 9

2.11 AT+CDNSGIP.............................................................................................................................. 9

2.12 AT+CDNSORIP......................................................................................................................... 10

2.13 AT+CIPHEAD ........................................................................................................................... 10

2.14 AT+CIPATS................................................................................................................................ 11

2.15 AT+CIPSPRT ............................................................................................................................. 11

2.16 AT+CIPSERVER ....................................................................................................................... 12

2.17 AT+CIPCSGP ............................................................................................................................ 12

2.18 AT+CIPCION ............................................................................................................................ 13

2.19 AT+CIPFLP ............................................................................................................................... 14

2.20 AT+CIPSRIP.............................................................................................................................. 14

2.21 AT+CIPDPDP ............................................................................................................................ 15

2.22 AT+CIPSCONT ......................................................................................................................... 15

2.23 AT+CIPMODE .......................................................................................................................... 17

2.24 AT+CIPCCFG............................................................................................................................ 17

Page 3 of 18
SIMCOM At Command(TCPIP)For Simcom

1 Overview
Command Description
AT+CIPSTART START UP TCP OR UDP CONNECTION
AT+CIPSEND SEND DATA THROUGH TCP OR UDP CONNECTION
AT+CIPCLOSE CLOSE CONNECTION
AT+CIPSHUT DEACTIVATE GPRS PDP CONTEXT
AT+CLPORT SET LOCAL PORT
AT+CSTT SET APN, USER NAME, PASSWORD
AT+CIICR BRING UP WIRELESS CONNECTION WITH GPRS OR CSD
AT+CIFSR GET LOCAL IP ADDRESS
AT+CIPSTATUS QUERY CURRENT CONNECTION STATUS
AT+CDNSCFG CONFIGURE DOMAIN NAME SERVER
AT+CDNSGIP QUERY IP ADDRESS OF GIVEN DOMAIN NAME
AT+CDNSORIP CONNECT WITH IP ADDRESS OR DOMAIN NAME SERVER
AT+CIPHEAD ADD AN IP HEADER WHEN RECEIVING DATA
AT+CIPATS SET AUTO SENDING TIMER
AT+CIPSPRT SET PROMPT OF ‘>’ WHEN SENDING DATA
AT+CIPSERVER CONFIGURE AS SERVER
AT+CIPCSGP SET CSD OR GPRS FOR CONNECTION MODE
AT+CIPCCON CHOOSE CONNECTION
AT+CIPFLP FIX LOCAL PORT
AT+CIPSRIP SHOW WHERE RECEIVED DATA FROM
AT+CIPDPDP SET WHETHER CHECK STATE OF GPRS NETWORK TIMING
AT+CIPSCONT SAVE TCPIP APPLICATION CONTEXT
AT+CIPMODE SELECT TCPIP APPLICATION MODE
AT+CIPCCFG CONFIGURE TRANSPARENT TRANSFER MODE

Page 4 of 18
SIMCOM At Command(TCPIP)For Simcom

2 Detailed Descriptions of Commands


2.1 AT+CIPSTART Start up TCP or UDP connection
AT+CIPSTART Start up TCP or UDP connection
Test command Response

+CIPSTART=? +CIPSTART: (list of supported <mode>),(IP address range),(port range)


<CR><LF>+CIPSTART: (list of supported <mode>),(domain name),(port
range)

OK
Parameter

See set command


Set command Response

+CIPSTART=<m If format is right response OK, otherwise response ERROR


ode>,[<IP If connect successfully response CONNECT OK
address>,<domain Otherwise
name>],<port> STATE:<state>
CONNECT FAIL
Parameter

<mode> a string parameter which indicates the connection type


“TCP” Establish a TCP connection
“UDP” Establish a UDP connection
<IP address> remote server IP address
<port> remote server port
<domain name> remote server domain name
<state> a string parameter which indicates the progress of
connecting
0 IP INITIAL
1 IP START
2 IP CONFIG
3 IP IND
4 IP GPRSACT
5 IP STATUS
6 TCP/UDP CONNECTING
7 IP CLOSE
8 CONNECT OK

2.2 AT+CIPSEND Send data through TCP or UDP connection


AT+CIPSEND Send data through TCP or UDP connection
Test command Response

+CIPSEND=? +CIPSEND=: <length>


OK
Parameter: See set command

Page 5 of 18
SIMCOM At Command(TCPIP)For Simcom

Execution command Response

+CIPSEND This command is used to send changeable length data.


response”> ”, then If connection is not established or disconnection:
type data for send, ERROR
tap CTRL+Z to If sending successfully:
send SEND OK
If sending fail:
SEND FAIL
Note

This command is used to send data on the TCP or UDP connection that has
been established already. Ctrl-Z is used as a termination symbol. There are
at most 1024 bytes that can be sent at a time.
Set command Response

+CIPSEND=<dat This command is used to send fixed length data.


a_length> If connection is not established or disconnect:
ERROR
If sending successfully:
SEND OK
If sending fail:
SEND FAIL
Parameter

<data_length> a numeric parameter which indicates the length of


sending data, it must less than 1024
Reference Note

1. There are at most 1024 bytes that can be sent each time.
2. Set the time that send data automatically with the command of
AT+CIPATS.
3. Only send data at the status of established connection, otherwise
Response ERROR

2.3 AT+CIPCLOSE Close TCP or UDP Connection


AT+CIPCLOSE Close connection
Test command Response

+CIPCLOSE=? OK
Execution command Response

+CIPCLOSE If close successfully:


CLOSE OK
If close fail:
ERROR
Reference Note

AT+CIPCLOSE only close connection at the status of TCP/UDP


CONNECTING or CONNECT OK,otherwise response ERROR, after
close the connection, the status is IP CLOSE

Page 6 of 18
SIMCOM At Command(TCPIP)For Simcom

2.4 AT+CIPSHUT Disconnect wireless connection


AT+CIPSHUT Disconnect wireless connection
Test command Response

+CIPSHUT=? OK
Execution command Response

+CIPSHUT If close successfully:


SHUT OK
If close fail:
ERROR
Note:
Except at the status of IP INITIAL, you can close moving scene by
AT+CIPSHUT. After closed, the status is IP INITIAL.

2.5 AT+CLPORT Set local port


AT+CLPORT Set local port
Test command Response

+CLPORT=? +CLPORT: (list of supported <port>s)


OK
Parameter

See set command


Read command Response

+CLPORT? <mode>:<port>
<CR><LF><mode>:<port>
OK
Parameter

See set command


Set command Response

+CLPORT=<mod OK
e>,<port> ERROR
Parameter

<mode> a string parameter which indicates the connection type


“TCP” TCP local port
“UDP” UDP local port
<port> a numeric parameter which indicates the local port

2.6 AT+CSTT START task and Set APN、USER ID、PASSWORD


AT+CSTT Start task and Set APN、USER ID、PASSWORD
Test command Response

+CSTT=? +CSTT: "APN","USER","PWD"


OK
Read command Response

+CSTT? +CSTT: <apn>,<user id>,<password>

Page 7 of 18
SIMCOM At Command(TCPIP)For Simcom

OK
Parameter

See set command


Set command Response

+CSTT=<apn>,< OK
user ERROR
id>,<password> Parameter

<apn> a string parameter which indicates the GPRS access point name
<user id> a string parameter which indicates the GPRS user name
<password> a string parameter which indicates the GPRS password
Execution Command Response

+CSTT OK
ERROR

2.7 AT+CIICR Bring up wireless connection with GPRS or CSD


AT+CIICR Bring up wireless connection with GPRS or CSD
Execution command Response

+CIICR OK
STATE: <state>
ERROR
Parameter

<state> referred to AT+CIPSTART


Reference Note

AT+CIICR only activate moving scene at the status of IP START,after


operate this command, the state changed to IP CONFIG. If module
accept the activate operation, the state changed to IP IND; after module
accept the activate operation, if activate successfully, the state changed
to IP GPRSACT, response OK, otherwise response ERROR.

2.8 AT+CIFSR Get local IP address


AT+CIFSR Get local IP address
Read command Response

+CIFSR? OK
Execution command Response

+CIFSR <IP address>


ERROR
Parameter

<IP address> a string parameter which indicates the IP address assigned


from GPRS or CSD
Reference Note:

Only at the status of activated the moving scene: IP GPRSACT、


TCP/UDP CONNECTING、CONNECT OK、IP CLOSE can get local IP

Page 8 of 18
SIMCOM At Command(TCPIP)For Simcom

Address by AT+CIFSR, otherwise response ERROR.

2.9 AT+CIPSTATUS Query current connection status


AT+CIPSTATUS Query current connection status
Test command Response

+CIPSTATUS=? OK
Execution command Response

+CIPSTATUS OK
STATE: <state>
Parameter

<state> referred to AT+CIPSTART

2.10 AT+CDNSCFG Configure domain name server


AT+CDNSCFG Configure domain name server
Test command Response

+CDNSCFG=? OK
Set command Response

+CDNSCFG=<pri OK
_dns>,<sec_dns> ERROR
Parameter

<pri_dns> a string parameter which indicates the IP address of the


primary domain name server
<sec_dns> a string parameter which indicates the IP address of the
secondary domain name server

2.11 AT+CDNSGIP Query the IP address of given domain name


AT+CDNSGIP Query the IP address of given domain name
Test command Response

+CDNSGIP=? OK
Set command Response

+CDNSGIP=<do OK
main name> ERROR
If successful, return:
<IP address>
If fail, return:
ERROR: <error code>
STATE: <state>
Parameter

<domain name> a string parameter which indicates the domain name


<IP address> a string parameter which indicates the IP address
corresponding to the domain name
<error code> a numeric parameter which indicates the error code

Page 9 of 18
SIMCOM At Command(TCPIP)For Simcom

1 DNS not Authorization


2 invalid parameter
3 network error
4 no server
5 time out
6 no configuration
7 no memory
<state> refer to AT+CIPSTART

2.12 AT+CDNSORIP Connect with IP address or domain name server


AT+CDNSORIP Connect with IP address or domain name server
Test command Response

+CDNSORIP=? +CDNSORIP: (list of supported <mode>s)


OK
Parameter

See set command


Read command Response

+CDNSORIP? +CDNSORIP: <mode>


OK
Parameter

See set command


Set command Response

+CDNSORIP=<m OK
ode> ERROR
Parameter

<mode> a numeric parameter which indicates whether connecting


with IP address server or domain name server
0 remote server is an IP address
1 remote server is a domain name

2.13 AT+CIPHEAD Add an IP head when receiving data


AT+CIPHEAD Add an IP head when receiving data
Test command Response

+CIPHEAD=? +CIPHEAD: (list of supported <mode>s)


OK
Parameter

See set command


Read command Response

+CIPHEAD? +CIPHEAD: <mode>


OK
Parameter

See set command

Page 10 of 18
SIMCOM At Command(TCPIP)For Simcom

Set command Response

+CIPHEAD=<mo OK
de> ERROR
Parameter

<mode> a numeric parameter which indicates whether adding an IP


header to received data or not
0 not add IP header
1 add IP header, the format is “+IPD(data length):”

2.14 AT+CIPATS Set auto sending timer


AT+CIPATS Set auto sending timer
Test command Response

+CIPATS=? +CIPATS: (list of supported <mode>s)


OK
Parameter

See set command


Read command Response

+CIPATS? +CIPATS: <mode>


OK
Parameter

See set command


Set command Response

+CIPATS=<mode OK
>,<time> ERROR
Parameter

<mode> a numeric parameter which indicates whether set timer


when sending data
0 not set timer when sending data
1 Set timer when sending data
<time> a numeric parameter which indicates the seconds after
which the data will be sent
2.15 AT+CIPSPRT Set prompt of ‘>’ when sending data
AT+CIPSPRT Set prompt of ‘>’ when sending data
Test command Response

+CIPSPRT=? +CIPSPRT: (list of supported <send prompt>s)


OK
Parameter

See set command


Read command Response

+CIPSPRT? +CIPSPRT: <send prompt>


OK
Parameter

Page 11 of 18
SIMCOM At Command(TCPIP)For Simcom

See set command


Set command Response

+CIPSPRT=<send OK
prompt> ERROR
Parameter

<send prompt> a numeric parameter which indicates whether echo prompt


‘>’ after issuing AT+CIPSEND command
0 no prompt and show “send ok” when send successfully
1 echo ‘>’ prompt and show “send ok” when send successfully
2 no prompt and not show “send ok” when send successfully

2.16 AT+CIPSERVER Configure as a server


AT+CIPSERVER Configure as a server
Read command Response

+CIPSERVER? +CIPSERVER: <mode>


OK
Parameter

<mode> 0 has not been configured as a server


1 has been configured as a server
Execution command Response

+CIPSERVER OK
ERROR
If configuration as server success, return:
SERVER OK
If configuration as server fail, return:
STATE:<state>
CONNECT FAIL
Parameter

<state> refer to AT+CIPSTART

2.17 AT+CIPCSGP Set CSD or GPRS connection mode


AT+CIPCSGP Set CSD or GPRS for connection mode
Test command Response

+CIPCSGP=? +CIPCSGP:0-CSD, DIAL NUMBER, USER NAME, PASSWORD,


RATE(0,3)
+CIPCSGP:1-GPRS, APN, USER NAME, PASSWORD
OK
Parameter

See set command


Read command Response

+CIPCSGP? +CIPCSGP: <mode>


OK

Page 12 of 18
SIMCOM At Command(TCPIP)For Simcom

Parameter

See set command


Set command Response

+CIPCSGP=<mo OK
de>,[(<apn>, ERROR
<user name >, Parameter

<password>), <mode> a numeric parameter which indicates the wireless connection


(<dial mode
number>,<user 0 set CSD as wireless connection mode
ID>,<password>, 1 set GPRS as wireless connection mode
<rate>)] GPRS parameters:
<apn> a string parameter which indicates the access point name
<user name> a string parameter which indicates the user name
<password> a string parameter which indicates the password
CSD parameters:
<dial number> a string parameter which indicates the CSD dial numbers
<user ID> a string parameter which indicates the CSD USER ID
<password> a string parameter which indicates the CSD password
<rate> a numeric parameter which indicates the CSD connection
rate

2.18 AT+CIPCCON Choose connection


AT+CIPCCON Choose connection
Test command Response

+CIPCCON=? +CIPCCON: (list of supported <connection>s)


OK
Parameter

See set command


Read command Response

+CIPCCON? +CIPCCON: <connection>


OK
Parameter

See set command


Set command Response

+CIPCCON=<co OK
nnection> ERROR
Parameter

<connection> a numeric parameter which indicates the chosen connection


1 choose connection as client
2 choose connection as server
Note that there may exist two connections at one time: one connection is as
client connecting with remote server, the other connection is as server

Page 13 of 18
SIMCOM At Command(TCPIP)For Simcom

connecting with remote client. Using this command to choose through


which connection data is sent.

2.19 AT+CIPFLP Set whether fix the local port


AT+CIPFLP Set whether fix the local port
Test command Response

+CIPFLP=? +CIPFLP: (list of supported <mode>s)


OK
Parameter

See set command


Read command Response

+CIPFLP? +CIPFLP: <mode>


OK
Parameter

See set command


Set command Response

+CIPFLP=<mode OK
> ERROR
Parameter

<mode> a numeric parameter which indicates whether increasing


local port automatically when establishing a new
connection
0 do not fix local port, increasing local port by 1 when
establishing a new connection
1 fix local port, using the same port when establishing a
new connection
Note that in default mode, the local port is fixed. It can speed up the
connection progress if setting to not fixed local port when establishing a
new connection after closing previous connection.

2.20 AT+CIPSRIP Set whether display IP address and port of sender when receive data
AT+CIPSRIP Set whether display IP address and port of sender when receive data
Test command Response

+CIPSRIP=? +CIPSRIP: (list of supported <mode>s)


OK
Parameter

See set command


Read command Response

+CIPSRIP? +CIPSRIP: <mode>


OK
Parameter

See set command

Page 14 of 18
SIMCOM At Command(TCPIP)For Simcom

Set command Response

+CIPSRIP=<mod OK
e> ERROR
Parameter

<mode> a numeric parameter which indicates whether show the


prompt of where the data received are from or not before
received data.
0 do not show the prompt
1 show the prompt, the format is as follows: RECV
FROM:<IP ADDRESS>:<PORT>
Note that the default mode is not to show the prompt.

2.21 AT+CIPDPDP Set Whether Check State Of GPRS Network Timing


AT+CIPDPDP Set Whether Check State Of GPRS Network Timing
Test command Response

+CIPDPDP =? +CIPDPDP:(list of supported< mode>s)


OK
Parameter

See set command


Read command Response

+CIPDPDP? +CIPDPDP:<mode>,<interval>,<timer>
OK
Parameter

See set command


Set command Response

+CIPDPDP=<mo OK
de>,<interval>,<ti ERROR
mer> Parameter

<mode>
0 not set detect PDP
1 set detect PDP
<interval>
0<interval<=180(ms)
<timer>
0<timer<=255

Reference Note

2.22 AT+CIPSCONT Save TCPIP Aplicaton Context


AT+CIPSCONT Save TCPIP Application Context

Page 15 of 18
SIMCOM At Command(TCPIP)For Simcom

Read command Response

AT+CIPSCONT? TA returns TCPIP Application Context, which consists of the following AT Command
parameters.

SHOW APPTCPIP CONTEXT


+CDNSORIP:<mode>
+CIPSPRT:< sendprompt>
+CIPHEAD:<iphead>
+CIPFLP:<flp>
+CIPSRIP:<srip>
+CIPCSGP:<csgp>
Gprs Config APN:<apn>
Gprs Config UserId:<gusr>
Gprs Config Password:<gpwd>
Gprs Config inactivityTimeout:<timeout>
CSD Dial Number:<cnum>
CSD Config UserId:<cusr>
CSD Config Password:<cpwd>
CSD Config rate:<crate>
+CIPDPDP:<dpdp>
Detect PDP Inerval:<int>
Detect PDP Timer:<timer>
App Tcpip mode:<mode>
OK
Parameters

<mode> see AT+CDNSORIP


<sendprompt> see AT+CIPSPRT
<iphead> see AT+CIPHEAD
<flp> see AT+CIPFLP
<srip> see AT+CIPSRIP
<csgp> see AT+CIPCSGP
<apn> see AT+CIPCSGP
<gusr> see AT+CIPCSGP
<gpwd> see AT+CIPCSGP
<timeout> see AT+CIPCSGP
<cnum> see AT+CIPCSGP
<cusr> see AT+CIPCSGP
<cpwd> see AT+CIPCSGP
<crate> see AT+CIPCSGP
<dpdp> see AT+CIPDPDP
<int> see AT+CIPDPDP
<timer> see AT+CIPDPDP
<mode>: see AT+CIPMODE

Page 16 of 18
SIMCOM At Command(TCPIP)For Simcom

Set command Response

AT+CIPSCONT TA saves TCPIP Application Context which consist of following AT command parameters, and
when system is rebooted, the parameters will be loaded automatically:

AT+CDNSORIP, AT+CIPSPRT, AT+CIPHEAD,


AT+CIPFLP,AT+CIPSRIP, AT+CIPCSGP,
AT+CIPDPDP

OK

2.23 AT+CIPMODE Select TCPIP Application mode


AT+CIPMODE Select TCPIP Application mode
Test command Response

+CIPMODE=? +CIPMODE: (0-NORMAL MODE,1-TCP CHANNEL MODE)


OK
Read command Response

+CIPMODE? +CIPMODE: <mode>


OK
Parameter

See set command


Set command Response

+CIPMODE=<m OK
ode > ERROR
Parameter

<mode> 0: normal mode


1: TCP channel mode
Execution Command Response

+CIPMODE ERROR

2.24 AT+CIPCCFG Configure Transparent Transfer mode


AT+CIPCCFG Configure Transparent Transfer Mode
Test command Response

+CIPCCFG=? +CIPCCFG: <NmRetry: 3-8>,<WaitTm: 2-10>,<SendSz: 256-1024>,


<esc: 0,1>
OK
Read command Response

+CIPCCFG? +CIPCCFG: <NmRetry>,<WaitTm>,<SendSz>,<esc>


OK
Parameter

See set command


Set command Response

+CIPCCFG=<Nm OK

Page 17 of 18
SIMCOM At Command(TCPIP)For Simcom

Retry>,<WaitTm> ERROR
,<SendSz>,<esc> Parameter
<NmRetry> number of retries to be made for an IP packet.
<WaitTm> number of 200ms intervals to wait for serial input
before sending the packet.
<SendSz> size in bytes of data block to be received from serial
port before sending.
<esc> whether turn on the escape sequence, default is
TRUE.
Execution Command Response

+CIPCCFG ERROR

Page 18 of 18

You might also like