https://cdn.sparkfun.com/assets/learn_tutorials/4/0/3/4A-ESP8266__AT_Instruction_Set__EN_v0.30.pdf
AT+CIPSTART – Establish TCP connection or register UDP port, start connection
Example
AT+CIPSTART="TCP","192.168.101.110",1000
Single connection
(+CIPMUX=0)
AT+CIPSTART=,,[,,]
[,]
Multiple connection
(+CIPMUX=1)
AT+CIPSTART=,,,[,,]
[,]
Response
OK
or
ERROR
If connection already exists, returns
ALREAY CONNECT
Parameters
ID of the connection (0~4), for multi-connect
string, "TCP" or "UDP"
string, remote IP
string, remote port
[]
for UDP only
[] In UDP transparent transmission, it has to be 0.
[] 0
: destination peer entity of UDP will not change.
[] 1
: destination peer entity of UDP can change once.
[] 2
: destination peer entity of UDP is allowed to change.
Note: [] can only be used when [] is set.
[]
default 0. unit: 500 milliseconds.
[] 0
: disable TCP keep-alive
[] 1 ~ 7200
: TCP keep-alive interval
AT+CIPSTART – Function 2: R
egister UDP port
Example
AT+CIPSTART="UDP", "192.168.101.110", 1000, 1002,
2
Single connection
(AT
+CIPMUX=0)
AT+CIPSTART=, , [, ,
]
Multiple connection
(AT+CIPMUX=1
)
AT+CIPSTART=, , , [, , ]
Response
OK or
ERROR
If connection already exists, returns
ALREADY CONNECT
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Modify ESP8266WiFi_0v25.js to do UDP and TCP
Add UDPflag and CIPstartSTR.
Modify the code to CIPstart a client in the create: function
Add code to set and reset the UDP flag
UDP.js placed in modules directory of WebIDE project.
AT commands for UDP
https://github.com/espressif/ESP8266_AT/wiki/at_example_0020000903
https://gist.github.com/mokogobo/3f4d2f074305d4d84344
https://cdn.sparkfun.com/assets/learn_tutorials/4/0/3/4A-ESP8266__AT_Instruction_Set__EN_v0.30.pdf
AT+CIPSTART – Establish TCP connection or register UDP port, start connection
Example
AT+CIPSTART="TCP","192.168.101.110",1000
Single connection
(+CIPMUX=0)
AT+CIPSTART=,,[,,]
[,]
Multiple connection
(+CIPMUX=1)
AT+CIPSTART=,,,[,,]
[,]
Response
OK
or
ERROR
If connection already exists, returns
ALREAY CONNECT
Parameters
ID of the connection (0~4), for multi-connect
string, "TCP" or "UDP"
string, remote IP
string, remote port
[]
for UDP only
[] In UDP transparent transmission, it has to be 0.
[] 0
: destination peer entity of UDP will not change.
[] 1
: destination peer entity of UDP can change once.
[] 2
: destination peer entity of UDP is allowed to change.
Note: [] can only be used when [] is set.
[]
default 0. unit: 500 milliseconds.
[] 0
: disable TCP keep-alive
[] 1 ~ 7200
: TCP keep-alive interval
AT+CIPSTART – Function 2: R
egister UDP port
Example
AT+CIPSTART="UDP", "192.168.101.110", 1000, 1002,
2
Single connection
(AT
+CIPMUX=0)
AT+CIPSTART=, , [, ,
]
Multiple connection
(AT+CIPMUX=1
)
AT+CIPSTART=, , , [, , ]
Response
OK or
ERROR
If connection already exists, returns
ALREADY CONNECT
1 Attachment