标签:
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 );//进入透传
进如透传之后,接下来就可以发送数据了,发送+++退出透传模式。
标签:
原文地址:http://www.cnblogs.com/prayer521/p/5873639.html