Data Sheet
!
5. TCP/IP-Related AT Commands
5.2.3. AT+CIPSTART—Establishes TCP Connection, UDP Transmission or SSL Connection
Establish TCP Connection
Set
Command
Single TCP connection (AT+CIPMUX=0):
AT+CIPSTART=<type>,<remoteIP>,<remote
port>[,<TCPkeepalive>]
Multiple TCP Connections (AT+CIPMUX=1):
AT+CIPSTART=<linkID>,<type>,<remote
IP>,<remoteport>[,<TCPkeepalive>]
Response
OK
or
ERROR
If the TCP connection is already established, the response is:
ALREADYCONNECT
Parameters
•
<linkID>: ID of network connection (0~4), used for multiple connections.
•
<type>: string parameter indicating the connection type: "TCP", "UDP"or "SSL".
•
<remoteIP>: string parameter indicating the remote IP address.
•
<remoteport>: the remote port number.
•
[<TCPkeepalive>]: detection time interval when TCP is kept alive; this function is disabled by
default.
‣ 0: disable TCP keep-alive.
‣ 1~7200: detection time interval; unit: second (s).
Examples
AT+CIPSTART="TCP","iot.espressif.cn",8000
AT+CIPSTART="TCP","192.168.101.110",1000
For more information please see: ESP8266 AT Command Examples.
Establish UDP Transmission
Set
Command
Single connection (AT+CIPMUX=0):
AT+CIPSTART=<type>,<remoteIP>,<remoteport>[,
(<UDPlocalport>),(<UDPmode>)]
Multiple connections (AT+CIPMUX=1):
AT+CIPSTART=<linkID>,<type>,<remote
IP>,<remoteport>[,(<UDPlocalport>),
(<UDPmode>)]
Response
OK
or
ERROR
If the UDP transmission is already established, the response is:
ALREADYCONNECT
Espressif
! /!43 58
2017.05