码迷,mamicode.com
首页 > 其他好文 > 详细

ESP8266 TCP传输AT指令顺序

时间:2016-09-14 23:23:59      阅读:398      评论:0      收藏:0      [点我收藏+]

标签:


1
     ret = ESP8266_Cmd ( "AT+RST", "OK", "ready", 2500 ); //复位 2 ret = ESP8266_Cmd ( "AT", "OK", NULL, 500 );//测试AT启动 3 ret = ESP8266_Cmd ( "AT+CWMODE=3", "OK", NULL, 1500 );//选择WIFI应用模式softAP+station 4 //ret = ESP8266_Cmd ( "AT+CWLAP", "OK", NULL, 2000 );//列出当前可用的接入点 5 ret = ESP8266_Cmd ( "AT+CWJAP=\"macUser_ESP8266_ApSsid\",\"macUser_ESP8266_ApPwd\"", "OK", NULL, 5000 ); 6 //ret = ESP8266_Cmd ( "AT+CWJAP=\"BEILIN\",\"BEILIN12345\"", "OK", NULL, 5000 );//连接路由 7 //ret = ESP8266_Cmd ( "AT+CIFSR", "OK", NULL, 2000 ); 8 9 ret = ESP8266_Cmd ( "AT+CIPSTART=\"TCP\",\"192.168.1.126\",8081", "OK", NULL, 3000 );//protocol IP port 10 ret = ESP8266_Cmd ("AT+CIPMODE=1","OK",NULL,500);//使能透传模式 11 ESP8266_Cmd ( "AT+CIPSEND", "OK",">", 500 );//进入透传

进如透传之后,接下来就可以发送数据了,发送+++退出透传模式。

 

ESP8266 TCP传输AT指令顺序

标签:

原文地址:http://www.cnblogs.com/prayer521/p/5873639.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!