首页 > 代码库 > ESP8266 TCP传输AT指令顺序
ESP8266 TCP传输AT指令顺序
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 port10 ret = ESP8266_Cmd ("AT+CIPMODE=1","OK",NULL,500);//使能透传模式11 ESP8266_Cmd ( "AT+CIPSEND", "OK",">", 500 );//进入透传
进如透传之后,接下来就可以发送数据了,发送+++退出透传模式。
ESP8266 TCP传输AT指令顺序
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。