Here is the dump from yesterday’s version of my utility. I wanted to see what was actually coming back from the 8266.
What it does is run a couple of the AT cmds 3X because they were giving different results. You can see it here. Eg, the 2nd restart didn’t send anything but OK, while the other 2 sent a load of data, ending with “ready”. Also, the IP address isn’t always displayed, sometimes it sends “ERROR”. Per your comment, I’ll change it to display control characters too, from now on. I also get a lot of “busy now …” signals.
I guess it’s version 9.01. My two ESP-01 modules runs at 115200. RAM usage is about 1KB for the entire program.
Note that I wasn’t seeing all of this data when using the original code from online examples. I needed to modify the response code and get rid of the delay() business, as shown below. Maybe data loss due to RX buffer overrun, not sure why.
Data Dump:
ESP8266 Demo ....
- after connect to router, press 'q'
to quit network; use before re-start,
else get a lot of 'busy' signals
during the next test.
>sending reset
AT+RST
OK
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x40100000, len 24444, room 16
tail 12
chksum 0xe0
ho 0 tail 12 room 4
load 0x3ffe8000, len 3168, room 12
tail 4
chksum 0x93
load 0x3ffe8c60, len 4956, room 4
tail 8
chksum 0xbd
csum 0xbd
ready
--------------
>sending reset
AT+RST
OK
--------------
>sending reset
AT+RST
busy now ...
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x40100000, len 24444, room 16
tail 12
chksum 0xe0
ho 0 tail 12 room 4
load 0x3ffe8000, len 3168, room 12
tail 4
chksum 0x93
load 0x3ffe8c60, len 4956, room 4
tail 8
chksum 0xbd
csum 0xbd
ready
--------------
>getting version
AT+GMR
00160901
OK
--------------
>getting version
AT+GMR
00160901
OK
--------------
>getting version
AT+GMR
00160901
OK
--------------
>checking modes avail
AT+CWMODE=?
+CWMODE:(1-3)
OK
--------------
>connecting router
AT+CWJAP="ssid","password"
AT+CWMODE=1
no change
AT+CWJAP="ssid","password"
OK
--------------
>check if connected
AT+CWJAP?
+CWJAP:"ssid"
OK
--------------
>checking IP address
AT+CIFSR
ERROR
--------------
>checking IP address
AT+CIFSR
192.168.1.123
--------------
>checking IP address
AT+CIFSR
ERROR
--------------
>checking APs avail (10-sec wait);
AT+CWLAP
+CWLAP:(0,"",0)
+CWLAP:(4,"ATT912",-92)
+CWLAP:(3,"NETGEAR10",-82)
+CWLAP:(3,"NETGEAR06",-89)
+CWLAP:(3,"AlbertsHouse",-66)
+CWLAP:(4,"ATT5d9P462",-61)
+CWLAP:(3,"NETGEAR20",-66)
+CWLAP:(3,"MyCharterWiFi2b-2G",-94)
+CWLAP:(3,"NETGEAR60",-76)
+CWLAP:(4,"ssid",-47)
+CWLAP:(3,"yogapanda",-86)
+CWLAP:(3,"MyCharterWiFibf-2G",-84)
+CWLAP:(4,"ATT6P4k9E4",-78)
+CWLAP:(3,"NETGEAR47",-89)
+CWLAP:(4,"ATTUhrZw6a",-85)
+CWLAP:(3,"Meeh",-80)
+CWLAP:(3,"CruzRocket08",-86)
+CWLAP:(4,"2WIRE015",-64)
+CWLAP:(4,"2WIRE206",-82)
+CWLAP:(4,"Viel",-90)
+CWLAP:(3,"MyCharterWiFi86-2G",-77)
+CWLAP:(3,"NETGEAR56",-72)
+CWLAP:(0,"HP4F2C11",-85)
+CWLAP:(4,"KayaPapaya",-44)
+CWLAP:(3,"MyCharterWiFib7-2G",-82)
+CWLAP:(3,"MyCharterWiFia6-2G",-81)
+CWLAP:(3,"DIRECT-roku-852-F21B34",-88)
+CWLAP:(3,"Hollee",-83)
OK
----- all done ---------
>quiting AP
AT+CIPMUX=0
OK
AT+CWQAP
OK
--------------
>quiting AP-2
AT+CWQAP=?
OK
--------------
Program Code:
The ORIGINAL code did data accesses this way, delay(), find, and print:
//set the multiple connection mode
sendAndWait("AT+CIPMUX=1","OK",100);
//set the server of port 80 check "no change" or "OK"
sendAndWait("AT+CIPSERVER=1,80","no change",100);
// Get the data from the WiFi module and send it to
// the debug serial port
/******************************************************/
boolean sendAndWait( String AT_Command, char *AT_Response,
int wait )
{
dbgSerial.print(AT_Command);
Serial.println(AT_Command);
delay(wait);
while( Serial.available() > 0 ) {
if( Serial.find(AT_Response) ) {
dbgSerial.print(" --> ");
dbgSerial.println(AT_Response);
return 1;
}
}
dbgSerial.println(" fail!");
return 0;
}
========================
What I changed it to was this, continual dump until timeout, no delay() used,
giving a more comprehensive data dump:
/********************************************/
void test_restart( int cnt )
{
//test if the module is ready.
for( int i=0; i<cnt; i++) { // sometimes doesn't work right.
dbg.println(">sending restart");
esp.println("AT+RST");
dump_resp(2000, "\n--------------");
}
}
/* wait a bit, then read,print ESP8266 data output.
******************************************************/
boolean dump_resp( unsigned long wait, char *msg )
{
unsigned long tmrx, now, prev=millis();
boolean rcv=false;
if( wait > 10000UL) wait=10000UL;
while( ((now=millis()) - prev) < wait) {
if( esp.available() ) {
dbg.write( esp.read() );
tmrx=now; rcv=true;
}
if( rcv && ((millis()-tmrx) > 100UL) ) {
break;
}
}
dbg.println(msg);
return( true );
}