-
Flashing Batch File for ESP32
Place Batch files in folder:
"C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32"
Ground GPIO pin 0 abd reset the chip
From Explorer click on the "C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32\ESPinfo.bat" file. A command Window opens, enter the com port press returns at each pause. The output for a Sparkfun ESP32 follows.C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>set /p pport=Enter a Com port Enter a Com port com7 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>echo com7 com7 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>pause Press any key to continue . . . C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>esptool.py --port com7 --baud 115200 --no-stub chip_id esptool.py v2.2.1 Connecting........____ Detecting chip type... ESP32 Chip is ESP32D0WDQ6 (revision 0) Enabling default SPI flash mode... Chip ID: 0x10240ac40097 Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>esptool.py --port com7 --baud 115200 --no-stub read_mac esptool.py v2.2.1 Connecting.... Detecting chip type... ESP32 Chip is ESP32D0WDQ6 (revision 0) Enabling default SPI flash mode... MAC: 24:0a:c4:00:97:2a Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>esptool.py --port com7 --baud 115200 --no-stub flash_id esptool.py v2.2.1 Connecting........__ Detecting chip type... ESP32 Chip is ESP32D0WDQ6 (revision 0) Enabling default SPI flash mode... Manufacturer: ef Device: 4016 Detected flash size: 4MB Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>pause Press any key to continue . . .
The batch file FlashESP32.bat follows:
:: Flash ESP32 chip with Espruino set /p pport=Enter a Com port echo %pport% pause esptool.py --port %pport% --baud 57600 write_flash --flash_freq 40m --flash_mode qio --flash_size 4MB 0x1000 bootloader.bin 0x10000 espruino_esp32.bin 0x8000 partitions_espruino.bin pause
Reset the chip and in file explorer click on
"C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32\FlashESP32.bat"
The output follows:C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>set /p pport=Enter a Com port Enter a Com port com7 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>echo com7 com7 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>pause Press any key to continue . . . C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>esptool.py --port com7 --baud 57600 write_flash --flash_freq 40m --flash_mode qio --flash_size 4MB 0x1000 bootloader.bin 0x10000 espruino_esp32.bin 0x8000 partitions_espruino.bin esptool.py v2.2.1 Connecting..... Detecting chip type... ESP32 Chip is ESP32D0WDQ6 (revision 0) Uploading stub... Running stub... Stub running... Configuring flash size... Flash params set to 0x0020 Compressed 12272 bytes to 7603... Wrote 12272 bytes (7603 compressed) at 0x00001000 in 1.4 seconds (effective 72.2 kbit/s)... Hash of data verified. Compressed 933808 bytes to 519371... Wrote 933808 bytes (519371 compressed) at 0x00010000 in 91.8 seconds (effective 81.4 kbit/s)... Hash of data verified. Compressed 3072 bytes to 136... Wrote 3072 bytes (136 compressed) at 0x00008000 in 0.0 seconds (effective 522.8 kbit/s)... Hash of data verified. Leaving... Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp32>pause Press any key to continue . . .
Unground GPIO pin 0 and reset the chip.
Start WEBIDE (may have to try resetting several times or use Putty at 115,200 Baud the first time)>reset() =undefined _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v95 Copyright 2017 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate >
-
Flashing Batch File for ESP8266 512KB version
Place Batch file in folder:
"C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266"Ground GPIO pin 0 abd reset the chip
From Explorer click on the "C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266\ESPinfo.bat" file. A command Window opens, enter the com port press returns at each pause. The output for a Sparkfun Thing dev board follows.C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>set /p pport=Enter a Com port Enter a Com port com6 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>echo com6 com6 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>pause Press any key to continue . . . C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>esptool.py --port com6 --baud 115200 --no-stub chip_id esptool.py v2.2.1 Connecting.... Detecting chip type... ESP8266 Chip is ESP8266EX Enabling default SPI flash mode... Chip ID: 0x008b1b99 Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>esptool.py --port com6 --baud 115200 --no-stub read_mac esptool.py v2.2.1 Connecting.... Detecting chip type... ESP8266 Chip is ESP8266EX Enabling default SPI flash mode... MAC: 5c:cf:7f:8b:1b:99 Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>esptool.py --port com6 --baud 115200 --no-stub flash_id esptool.py v2.2.1 Connecting.... Detecting chip type... ESP8266 Chip is ESP8266EX Enabling default SPI flash mode... Manufacturer: 1f Device: 8401 Detected flash size: Unknown Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>pause Press any key to continue . . .
The batch file FlashESP8266_1K.bat follows:
:: Flash ESP8288 512KB chip with Espruino set /p pport=Enter a Com port echo %pport% pause esptool.py --port %pport% --baud 57600 write_flash --flash_freq 40m --flash_mode qio --flash_size 512KB 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x7C000 esp_init_data_default.bin 0x7E000 blank.bin pause
Reset the chip and in file explorer click on
"C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266\FlashESP8266_1K.bat"
The output follows:C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>set /p pport=Enter a Com port Enter a Com port com6 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>echo com6 com6 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>pause Press any key to continue . . . C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>esptool.py --port com6 --baud 57600 write_flash --flash_freq 40m --flash_mode qio --flash_size 512KB 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x7C000 esp_init_data_default.bin 0x7E000 blank.bin esptool.py v2.2.1 Connecting.... Detecting chip type... ESP8266 Chip is ESP8266EX Uploading stub... Running stub... Stub running... Configuring flash size... Compressed 3856 bytes to 2762... Wrote 3856 bytes (2762 compressed) at 0x00000000 in 0.5 seconds (effective 62.2 kbit/s)... Hash of data verified. Compressed 456756 bytes to 320993... Wrote 456756 bytes (320993 compressed) at 0x00001000 in 56.7 seconds (effective 64.5 kbit/s)... Hash of data verified. Compressed 128 bytes to 75... Wrote 128 bytes (75 compressed) at 0x0007c000 in 0.0 seconds (effective 32.0 kbit/s)... Hash of data verified. Compressed 4096 bytes to 26... Wrote 4096 bytes (26 compressed) at 0x0007e000 in 0.0 seconds (effective 2047.7 kbit/s)... Hash of data verified. Leaving... Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>pause Press any key to continue . . .
Unground GPIO pin 0 and reset the chip then start WEBIDE
Connected > >reset() =undefine _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v95 Copyright 2017 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 512KB:256/256, manuf 0x1f chip 0x8401 >
-
Hi @MaBe
Later today I hope to do the flash batch files for the 512K, 4M esp8266 chips and the ESP32
Obviously the files can be edited which I invite someone with better knowledge to suggest.
I run the batch files from Windows Explorer by double clicking on them. You can also make shortcuts and use those as well. Opening the Command window, changing directories and entering the batch file name works as well.It would be nice to read the flash info from the chip and parse it to supply the suggested flashing batch file to use. That's what the readme file contains. Seems that the 8266 chips have a separate flash chip. Using a magnifying glass one can sometimes read the part number. Relevant information is the SPI mode, size and speed. These need to be in the flash command.
A lower 40 flash speed seems to work for all, but there is an 80 speed.The 8266 chips also have a processor crystal speed. Choose the wrong speed in the flash command and the baud rates will change.
Let's see how this idea flies before suggesting they be included in the Espruino download.
-
Using batch (.BAT) files to help with Flashing ESP8266
Having installed ESPtool.py and downloaded the latest version of Espruino into a folder:
In my case, I created a folder
"C:\Users\jj\Documents\espruinoEsp8266Flash"
and then copied the two batch files into the subfolder
"C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266"Identify the ESP8266 Chip
Plug the ESP8266 into a USB port ( using supporting hardware)
Ground GPIO pin 0
Reset the chip and run ESPinfo.batESPinfo.bat
:: Read ESP8288 or ESP32 chip info set /p pport=Enter a Com port echo %pport% pause esptool.py --port %pport% --baud 115200 --no-stub chip_id esptool.py --port %pport% --baud 115200 --no-stub read_mac esptool.py --port %pport% --baud 115200 --no-stub flash_id pause
and the output
C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>set /p pport=Enter a Com port Enter a Com port com3 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>echo com3 com3 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>pause Press any key to continue . . . C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>esptool.py --port com3 --baud 115200 --no-stub chip_id esptool.py v2.2.1 Connecting.... Detecting chip type... ESP8266 Chip is ESP8266EX Enabling default SPI flash mode... Chip ID: 0x00cb2c23 Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>esptool.py --port com3 --baud 115200 --no-stub read_mac esptool.py v2.2.1 Connecting... Detecting chip type... ESP8266 Chip is ESP8266EX Enabling default SPI flash mode... MAC: 18:fe:34:cb:2c:23 Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>esptool.py --port com3 --baud 115200 --no-stub flash_id esptool.py v2.2.1 Connecting... Detecting chip type... ESP8266 Chip is ESP8266EX Enabling default SPI flash mode... Manufacturer: e0 Device: 4014 Detected flash size: 1MB Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>pause Press any key to continue . . .
Note the Flash size for the chip I used is 1Mbyte. So I will use a batch file set up to program the ESP8266 with that size flash chip.
Reset the ESP8266 and then run "C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266\FlashESP8266_1M.bat":: Flash ESP8288 1M chip with Espruino set /p pport=Enter a Com port echo %pport% pause esptool.py --port %pport% --baud 57600 write_flash --flash_freq 40m --flash_mode qio --flash_size 1MB 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0xFC000 esp_init_data_default.bin 0xFE000 blank.bin pause
The output:
C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>set /p pport=Enter a Com port Enter a Com port com3 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>echo com3 com3 C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>pause Press any key to continue . . . C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>esptool.py --port com3 --baud 57600 write_flash --flash_freq 40m --flash_mode qio --flash_size 1MB 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0xFC000 esp_init_data_default.bin 0xFE000 blank.bin esptool.py v2.2.1 Connecting.... Detecting chip type... ESP8266 Chip is ESP8266EX Uploading stub... Running stub... Stub running... Configuring flash size... Flash params set to 0x0020 Compressed 3856 bytes to 2762... Wrote 3856 bytes (2762 compressed) at 0x00000000 in 0.5 seconds (effective 62.2 kbit/s)... Hash of data verified. Compressed 456756 bytes to 320993... Wrote 456756 bytes (320993 compressed) at 0x00001000 in 56.6 seconds (effective 64.5 kbit/s)... Hash of data verified. Compressed 128 bytes to 75... Wrote 128 bytes (75 compressed) at 0x000fc000 in 0.0 seconds (effective 32.3 kbit/s)... Hash of data verified. Compressed 4096 bytes to 26... Wrote 4096 bytes (26 compressed) at 0x000fe000 in 0.0 seconds (effective 2249.4 kbit/s)... Hash of data verified. Leaving... Hard resetting... C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266>pause Press any key to continue . . .
Disconnect GPIO pin 0 from the ground and reset a couple of times.
Start WebIde and connect to the ESP8266>reset() =undefined _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v95 Copyright 2017 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 1MB:512/512, manuf 0xe0 chip 0x4014 >
Need to create batch files for the other ESP8266 and ESP32 chips
-
-
Since you are using a NodeMCU the flashing map is described here:
I'm testing on a ESP8266-01 with 1MB of flash, I think the NodeMCU has 4MB.
The latest test program follows and allows for you to refresh the page to get multiple timings.
I've also change the HTML script to display data.length instead of data.
I've added process.memory() to fix a bug in E.toString() and asked for the bug to be examined in another post.Once the page is online you might try from a command prompt ping IP address
example ping 192.168.1.13
This will give you an idea of the wifi speed and if there is a lot of traffic or errors occurring.//WSDesp8266B 28Jan2018 //http//192.168.1.6:8080 //ESP8266 with Espruino flahed // list of Wifi and passwords var SSID="ssid"; var key="keykey"; var Startagain=0; var myinterval; var n =4, chk=2*1024; var tdata=new Uint8Array(chk); var i; for(i=0;i<1024;i++){ tdata[i]=0x30; tdata[i+1024]=0x31; }//next i var page = "<html>\r\n<body>\r\n<textarea id=\"demo\" rows=\"32\" cols=\"64\"></textarea>\r\n<script>\r\nvar ws;\r\nvar data=\"\";\r\n//setTimeout(function(){\r\nws = new WebSocket(\"ws://\" + location.host + \"/my_websocket\", \"protocolOne\");\r\nws.onmessage = function (event) { \r\ndata+=event.data;\r\ndocument.getElementById(\"demo\").innerHTML = data.length;\r\nws.send(\"Hello to Espruino!\"); \r\n };\r\n//setTimeout(function() { ws.send(\"Hello to Espruino!\"); }, //1000);}\r\n//,1000);\r\n\r\n</script></body>\r\n</html>\r\n" ; function onPageRequest(req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end(page); } function test(){ console.log("Start connection process"); var wifi = require("Wifi"); console.log("Try Connecting to WiFi ",SSID); wifi.connect(SSID,{password:key}, function(err) { console.log(err); if (err){Startagain=1;return; } console.log("connected? err=", err, "info=", wifi.getIP()); console.log("Wi-Fi Connected"); clearInterval( myinterval); var t=getTime(); var server = require('ws').createServer(onPageRequest); server.listen(8080); server.on("websocket", function(ws) { ws.on('message',function(msg) { n--; print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); print("[WS] "+JSON.stringify(msg)); if(n){ ws.send(E.toString(tdata)); process.memory(); }else{ process.memory(); n=4; }//end else }); t=getTime(); ws.send(E.toString(tdata)); process.memory(); print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); }); });//end connect }//end test myinterval=setInterval(function () { console.log("Test for error"); if(Startagain){ Startagain=0; test(); }//end of Startagain }, 2000); test();
Here is some output:
1v95 Copyright 2017 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 1MB:512/512, manuf 0xe0 chip 0x4014 >Start connection process Try Connecting to WiFi faux =undefined Test for error Test for error null connected? err= null info= { "ip": "192.168.1.13", "netmask": "255.255.255.0", "gw": "192.168.1.1", "mac": "18:fe:34:cb:2c:23" } Wi-Fi Connected n= 4 t: 0.016 sec n= 3 t: 0.098 sec [WS] "Hello to Espruino!" n= 2 t: 0.169 sec [WS] "Hello to Espruino!" n= 1 t: 0.239 sec [WS] "Hello to Espruino!" n= 0 t: 0.309 sec [WS] "Hello to Espruino!" n= 4 t: 0.012 sec n= 3 t: 0.083 sec [WS] "Hello to Espruino!" n= 2 t: 0.151 sec [WS] "Hello to Espruino!" n= 1 t: 0.881 sec [WS] "Hello to Espruino!" n= 0 t: 0.951 sec [WS] "Hello to Espruino!" n= 4 t: 0.012 sec n= 3 t: 0.089 sec [WS] "Hello to Espruino!" n= 2 t: 0.164 sec [WS] "Hello to Espruino!" n= 1 t: 0.233 sec [WS] "Hello to Espruino!" n= 0 t: 0.307 sec [WS] "Hello to Espruino!" n= 4 t: 0.012 sec n= 3 t: 0.089 sec [WS] "Hello to Espruino!" n= 2 t: 0.846 sec [WS] "Hello to Espruino!" n= 1 t: 0.909 sec [WS] "Hello to Espruino!" n= 0 t: 0.994 sec [WS
Some variation in the speed
Here are some ping timings:Microsoft Windows [Version 10.0.16299.192] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\jj>ping 192.168.1.13 Pinging 192.168.1.13 with 32 bytes of data: Reply from 192.168.1.13: bytes=32 time=2ms TTL=128 Reply from 192.168.1.13: bytes=32 time=2ms TTL=128 Reply from 192.168.1.13: bytes=32 time=3ms TTL=128 Reply from 192.168.1.13: bytes=32 time=3ms TTL=128 Ping statistics for 192.168.1.13: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 2ms, Maximum = 3ms, Average = 2ms C:\Users\jj>ping 192.168.1.13 Pinging 192.168.1.13 with 32 bytes of data: Reply from 192.168.1.13: bytes=32 time=2ms TTL=128 Reply from 192.168.1.13: bytes=32 time=1ms TTL=128 Reply from 192.168.1.13: bytes=32 time=2ms TTL=128 Reply from 192.168.1.13: bytes=32 time=3ms TTL=128 Ping statistics for 192.168.1.13: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 1ms, Maximum = 3ms, Average = 2ms
-
The example above is on a Pico.
It is an attempt to zero in on the bug first found in the following code.For the ESP8266 -01 try this code
//WSDesp8266A/js 27Jan2018 // using process.memory to fix bug //http//192.168.1.6:8080 //ESP8266 with Espruino flahed // list of Wifi and passwords var SSID="ssid"; var key="keykey"; var Startagain=0; var myinterval; var n =100, chk=2*1024; var tdata=new Uint8Array(chk); var i; for(i=0;i<1024;i++){ tdata[i]=0x30; tdata[i+1024]=0x31; }//next i var page = "<html>\r\n<body>\r\n<textarea id=\"demo\" rows=\"32\" cols=\"64\"></textarea>\r\n<script>\r\nvar ws;\r\nvar data=\"\";\r\n//setTimeout(function(){\r\nws = new WebSocket(\"ws://\" + location.host + \"/my_websocket\", \"protocolOne\");\r\nws.onmessage = function (event) { \r\ndata+=event.data;\r\ndocument.getElementById(\"demo\").innerHTML = data.length;\r\nws.send(\"Hello to Espruino!\"); \r\n };\r\n//setTimeout(function() { ws.send(\"Hello to Espruino!\"); }, //1000);}\r\n//,1000);\r\n\r\n</script></body>\r\n</html>\r\n" ; function onPageRequest(req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end(page); } function test(){ console.log("Start connection process"); var wifi = require("Wifi"); console.log("Try Connecting to WiFi ",SSID); wifi.connect(SSID,{password:key}, function(err) { console.log(err); if (err){Startagain=1;return; } console.log("connected? err=", err, "info=", wifi.getIP()); console.log("Wi-Fi Connected"); clearInterval( myinterval); var t=getTime(); var server = require('ws').createServer(onPageRequest); server.listen(8080); server.on("websocket", function(ws) { ws.on('message',function(msg) { n--; print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); print("[WS] "+JSON.stringify(msg)); if(n){ ws.send(E.toString(tdata)); process.memory(); } }); t=getTime(); ws.send(E.toString(tdata)); process.memory(); print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); }); });//end connect }//end test myinterval=setInterval(function () { console.log("Test for error"); if(Startagain){ Startagain=0; test(); }//end of Startagain }, 2000); test();
-
Trying process.memory to attempt a debug
//xtest2.js 27 Jan2018 // trying this on a Pico //try changing the value of chk // process.memory uncommented =PM // comment out process.memory =NPM /// // chk=1*1024 works both cases // chk =2*1024 works with PM,fails NPM // chk=25*1024 works with PM, fails NPM // chk=26*1024 fails just too big var n =100, chk=25*1024; var tdata=new Uint8Array(chk); function xsend(a){ console.log(n,a.length); // process.memory();// this makes it work }//end xsend function test(){ var a; while (n){ xsend(E.toString(tdata)); //fails if no process.memory n--; } }//end test setTimeout(function () { test(); }, 1000);
The process.memory() fixes the bug.
1v95 Copyright 2017 G.Williams > =undefined 100 25600 99 25600 98 25600 97 25600 Uncaught Error: Field or method "length" does not already exist, and can't create it on undefined at line 16 col 16 console.log(n,a.length); ^ in function "xsend" called from line 23 col 26 xsend(E.toString(tdata)); //fails if no process.memory ^ in function "test" called from line 1 col 6 test(); ^ in function called from system >
-
Here is the test code
//xtest.js 26 Jan2018 // trying this on a Pico //try changing the value of chk var n =100, chk=23*1024; var tdata=new Uint8Array(chk); var i; for(i=0;i<1024;i++){ tdata[i]=0x30; tdata[i+1024]=0x31; }//next i function xsend(a){console.log(n,a.length);} function test(){ while (n){ xsend(E.toString(tdata)); n--; } }//end test test();
Here is the output
1v95 Copyright 2017 G.Williams >100 23552 99 23552 98 23552 97 23552 Uncaught Error: Field or method "length" does not already exist, and can't create it on undefined at line 13 col 16 console.log(n,a.length); ^ in function "xsend" called from line 17 col 26 xsend(E.toString(tdata)); ^ in function "test" called from line 1 col 6 test(); ^ =undefined >
Similar problem on ESP8266 running Espruino, but different array sizes to get it to run at all.
-
Trying it with a different ESP8266 chip like the ones for a Pico shim
Flashed Espruino on to the ESP8266
Running the previous test progrem gives:
1v95 Copyright 2017 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:1024/1024, manuf 0xe0 chip 0x4014 >Start connection process Try Connecting to WiFi faux =undefined null connected? err= null info= { "ip": "192.168.1.13", "netmask": "255.255.255.0", "gw": "192.168.1.1", "mac": "18:fe:34:cb:2c:23" } Wi-Fi Connected n= 4 t: 0.014 sec n= 3 t: 0.082 sec [WS] "Hello to Espruino!" n= 2 t: 0.149 sec [WS] "Hello to Espruino!" n= 1 t: 0.231 sec [WS] "Hello to Espruino!" n= 0 t: 0.399 sec [WS] "Hello to Espruino!" >
8192 / 0.231 = 35,463 bytes per second
35,463 * 8 = 283,705 bits per secondThe tool_config.txt
path_data: choosed:C:\Users\jj\Documents\ESP8266Update\espruino_1v95_esp8266\boot_v1.6.bin;0x00000; choosed:C:\Users\jj\Documents\ESP8266Update\espruino_1v95_esp8266\espruino_esp8266_user1.bin;0x1000; choosed:C:\Users\jj\Documents\ESP8266Update\espruino_1v95_esp8266\esp_init_data_default.bin;0x3FC000; choosed:C:\Users\jj\Documents\ESP8266Update\espruino_1v95_esp8266\blank.bin;0x3FE000; empty:;; empty:;; empty:;; default_path:C:\Users\jj\Documents\ESP8266Update\ESP8266_NONOS_SDK-2.1.0\bin;
Crystal freq 26.2
SPI Speed 80M
SPI Mode QIO
Flash Size 32 Mbit-C1
Baudrate 115,200 -
Sparkfun Thing
Flashing Software
I'm using a Windows 10 platform.
To get the Thing into programming mode, ground the 0 pin and plug it in.
I use Putty at 74,880 Baud to see th eBootloader message.I'm not sure if it matters but I first installed the latest AT software on the thing.
The latest ExpressIF AT firmwareFor the Thing I used the code in the "espruino_1v95_esp8266" folder
"C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266"
"C:\Users\jj\Documents\espruinoEsp8266Flash\espruino_1v95_esp8266_4mb"The ExpressIF flashing software uses a file named
"C:\Users\jj\Documents\esp8266flasher\FLASH_DOWNLOAD_TOOLS_v2.4_150924\FLASH_DOWNLOAD_TOOLS_v2.4_150924\tool_config.txt"To configure the download.
For the Thing AT download
"C:\Users\jj\Documents\esp8266flasher\FLASH_DOWNLOAD_TOOLS_v2.4_150924\FLASH_DOWNLOAD_TOOLS_v2.4_150924\tool_configThingdev AT.txt"path_data: choosed:C:\Users\jj\Documents\ESP8266Update\ESP8266_NONOS_SDK-2.1.0\bin\boot_v1.2.bin;0x00000; choosed:C:\Users\jj\Documents\ESP8266Update\ESP8266_NONOS_SDK-2.1.0\bin\at\512+512\user1.1024.new.2.bin;0x1000; choosed:C:\Users\jj\Documents\ESP8266Update\ESP8266_NONOS_SDK-2.1.0\bin\esp_init_data_default.bin;0xfc000; choosed:C:\Users\jj\Documents\ESP8266Update\ESP8266_NONOS_SDK-2.1.0\bin\blank.bin;0x7e000; choosed:C:\Users\jj\Documents\ESP8266Update\ESP8266_NONOS_SDK-2.1.0\bin\blank.bin;0xfe000; empty:;; empty:;; default_path:C:\Users\jj\Documents\ESP8266Update\ESP8266_NONOS_SDK-2.1.0\bin;
For the Thing Espruino download I used
"C:\Users\jj\Documents\esp8266flasher\FLASH_DOWNLOAD_TOOLS_v2.4_150924\FLASH_DOWNLOAD_TOOLS_v2.4_150924\tool_configThingEspruino.txt"path_data: choosed:C:\Users\jj\Documents\ESP8266Update\espruino_1v95_esp8266\boot_v1.6.bin;0x00000; choosed:C:\Users\jj\Documents\ESP8266Update\espruino_1v95_esp8266\espruino_esp8266_user1.bin;0x1000; choosed:C:\Users\jj\Documents\ESP8266Update\espruino_1v95_esp8266\esp_init_data_default.bin;0x3FC000; choosed:C:\Users\jj\Documents\ESP8266Update\espruino_1v95_esp8266\blank.bin;0x3FE000; empty:;; empty:;; empty:;; default_path:C:\Users\jj\Documents\ESP8266Update\ESP8266_NONOS_SDK-2.1.0\bin;
-
Running on Sparkfun Thing -dev ESP8266 board
The HTML code splits data into lines in this one.
//WSDesp8266 24Jan2018 //http//192.168.1.6:8080 //ESP8266 with Espruino flashed // list of Wifi and passwords var SSID="xxxxxx"; var key="keykeykey"; var Startagain=0; var myinterval; var n =4, chk=2*1024; var tdata=new Uint8Array(chk); var i; for(i=0;i<1024;i++){ tdata[i]=0x30; tdata[i+1024]=0x31; }//next i var page = "<html>\r\n<body>\r\n<textarea id=\"demo\" rows=\"32\" cols=\"64\"></textarea>\r\n<script>\r\nvar ws;\r\nvar data=\"\";\r\n//setTimeout(function(){\r\nws = new WebSocket(\"ws://\" + location.host + \"/my_websocket\", \"protocolOne\");\r\nws.onmessage = function (event) { \r\ndata+=event.data;\r\ndocument.getElementById(\"demo\").innerHTML = data;\r\nws.send(\"Hello to Espruino!\"); \r\n };\r\n//setTimeout(function() { ws.send(\"Hello to Espruino!\"); }, //1000);}\r\n//,1000);\r\n\r\n</script></body>\r\n</html>\r\n" ; function onPageRequest(req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end(page); } function test(){ console.log("Start connection process"); var wifi = require("Wifi"); console.log("Try Connecting to WiFi ",SSID); wifi.connect(SSID,{password:key}, function(err) { console.log(err); if (err){Startagain=1;return; } console.log("connected? err=", err, "info=", wifi.getIP()); console.log("Wi-Fi Connected"); clearInterval( myinterval); var t=getTime(); var server = require('ws').createServer(onPageRequest); server.listen(8080); server.on("websocket", function(ws) { ws.on('message',function(msg) { n--; print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); print("[WS] "+JSON.stringify(msg)); if(n) ws.send(E.toString(tdata)); }); t=getTime(); ws.send(E.toString(tdata)); print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); }); });//end connect }//end test myinterval=setInterval(function () { console.log("Test for error"); if(Startagain){ Startagain=0; test(); }//end of Startagain }, 2000); test();
Sending 2 kbytes of data 4 times
1v95 Copyright 2017 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 512KB:256/256, manuf 0x1f chip 0x8401 >Start connection process Try Connecting to WiFi faux =undefined null connected? err= null info= { "ip": "192.168.1.12", "netmask": "255.255.255.0", "gw": "192.168.1.1", "mac": "5c:cf:7f:8b:1b:99" } Wi-Fi Connected n= 4 t: 0.015 sec n= 3 t: 0.118 sec [WS] "Hello to Espruino!" n= 2 t: 0.209 sec [WS] "Hello to Espruino!" n= 1 t: 0.327 sec [WS] "Hello to Espruino!" n= 0 t: 0.426 sec [WS] "Hello to Espruino!" >
8192 bytes sent
0.426 - 0.015 = 0.411 seconds
8192 / 0.411 = 19,931.9 bytes per second
19931.9 * 8 = 159,454.9 bits per second -
Try using websockets
Webserver method
var n = 4, chk=5*1024; var tdata=new Uint8Array(chk); var i; for(i=0;i<1024;i++){ tdata[i]=0x30; tdata[i+1024]=0x31; tdata[i+1024*2]=0x32; tdata[i+1024*3]=0x33; tdata[i+1024*4]=0x34; }//next i var page = '<html><body><script>var ws;setTimeout(function(){'; page += 'ws = new WebSocket("ws://" + location.host + "/my_websocket", "protocolOne");'; page += 'ws.onmessage = function (event) { document.write("MSG:"+event.data); };'; page += 'setTimeout(function() { ws.send("Hello to Espruino!"); }, 1000);'; page += '},1000);</script></body></html>'; function onPageRequest(req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end(page); } ////// function test(){ if(Hardware===1)Serial=Serial2; if(Hardware===0)Serial=Serial4; if(Hardware===1){ digitalWrite(B9,1); // enable on Pico Shim V2 Serial.setup(115200, { rx: A3, tx : A2 }); //Pico } if(Hardware===0)Serial.setup(115200, { rx: C11, tx : C10 }); //espruino board console.log("Start connection process"); var wifi = require("ESP8266WiFi_0v25").connect(Serial, function(err) { if (err){Startagain=1;return;} console.log("Reset the ESP8266"); wifi.reset(function(err) { if (err){Startagain=1;return;} console.log("Try Connecting to WiFi ",hotspots[hotspot].SSID); wifi.connect(hotspots[hotspot].SSID,hotspots[hotspot].key, function(err) {console.log(err); if (err){Startagain=1;return; } wifi.getIP(function(l,ip){ if (err){Startagain=1;return;} console.log("IP= ",ip,"\n\r"+l); console.log("Wi-Fi Connected"); clearInterval( myinterval); var server = require('ws').createServer(onPageRequest); server.listen(8080); server.on("websocket", function(ws) { ws.on('message',function(msg) { print("[WS] "+JSON.stringify(msg)); }); var t=getTime(); ws.send(E.toString(tdata)); print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); }); });//end getIP console.log("end getIP"); });//end connect console.log("end connect"); });//end reset console.log("end reset"); });//end require console.log("end require"); }//end test
1v95 Copyright 2017 G.Williams >2 >Start connection process end require =undefined Reset the ESP8266 end reset Test for error Try Connecting to WiFi faux end connect Test for error Test for error Test for error null end getIP IP= 192.168.1.9 null Wi-Fi Connected n= 4 t: 0.029 sec [WS] "Hello to Espruino!" >
-
Problem identified
the res.on('drain') is slow to trigger.
Hypothesis Somewhere in the firmware is a setInterval that is used to test if the drain buffer is empty. Without delving into the source code, there seems to be an issue with the frequency that the drain empty condition is tested and an emit to the ondrain is issued.
The Aruduino code runs faster because the drain empty condition is recognised immediatelyThe following code was executed on a Pico connected via serial port to an Esp8266 at 115 Kbaud. It uses a setTimeout function to issue emit commands at a higher rate. It doesn't test for the amount of data in the drain buffer and thus is an incomplete fix.
var n = 4, chk=5*1024; var tdata=new Uint8Array(chk); var i; for(i=0;i<1024;i++){ tdata[i]=0x30; tdata[i+1024]=0x31; tdata[i+1024*2]=0x32; tdata[i+1024*3]=0x33; tdata[i+1024*4]=0x34; }//next i function onPageRequest(req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); var t=getTime(); res.on('drain',function() { print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); if (n===0){ res.end(); print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); }else { res.write(E.toString(tdata)); n--; setTimeout(function () { // console.log("Hello World"); res.emit('drain'); }, 400); }//end else });//end opr }//end function
1v95 Copyright 2017 G.Williams >2 Start connection process end require =undefined Reset the ESP8266 end reset Test for error Try Connecting to WiFi faux end connect Test for error Test for error Test for error null end getIP IP= 192.168.1.9 null Wi-Fi Connected n= 4 t: 0.008 sec n= 3 t: 0.443 sec n= 2 t: 0.883 sec n= 1 t: 1.305 sec n= 0 t: 1.742 sec n= 0 t: 1.743 sec n= 0 t: 0.008 sec n= 0 t: 0.009 sec
@Gordon any comments on the hypothesis?
@Polypod please give it a try on your Esp8266 with flashed Espruino and see if you can get similar results.
I just saw your latest post about the Arduino using Websockets and not HTML. My limited experience with websockets left me with the impression that they are much faster than using HTML.
-
Try moving some data to see how much is being moved
var n = 4, chk=5*1024; var tdata=new Uint8Array(chk); var i; for(i=0;i<1024;i++){ tdata[i]=0x30; tdata[i+1024]=0x31; tdata[i+1024*2]=0x32; tdata[i+1024*3]=0x33; tdata[i+1024*4]=0x34; }//next i function onPageRequest(req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); var t=getTime(); res.on('drain',function() { print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); if (n===0){ res.end(); print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); }else { res.write(E.toString(tdata)); n--; }//end else });//end opr }//end function
IP= 192.168.1.9 null Wi-Fi Connected n= 4 t: 0.008 sec n= 3 t: 1.092 sec n= 2 t: 2.859 sec n= 1 t: 4.056 sec n= 0 t: 5.809 sec n= 0 t: 5.811 sec n= 0 t: 0.008 sec n= 0 t: 0.009 sec
Saved the page as test.txt and it contains 20 kB of data.
-
Please post the Arduino code for comparison.
Here is another approach:
Try moving the new UintArray(chk) to a Global scope
//Global scope var n = 4, chk=5*1024; var tdata=new Uint8Array(chk); function onPageRequest(req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); var t=getTime(); res.on('drain',function() { print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); if (n===0){ res.end(); print("n=",n,"t:",(getTime()-t).toFixed(3),"sec"); }else { res.write(E.toString(tdata)); n--; }//end else });//end opr }//end function
IP= 192.168.1.9 null Wi-Fi Connected n= 4 t: 0.008 sec n= 3 t: 1.097 sec n= 2 t: 2.214 sec n= 1 t: 3.447 sec
-
-
I'm trying to visualize your hardware setup.
- Esp8266 with Espruino flashed into the Esp8266
- Esp8266 connected via serial port to a Pico, Espruino board or Arudino.
The first case would be slower because the uP has to handle more tasks (marshall data to send, and send data)
The second cases have more than one uP to divide up the tasks. - Esp8266 with Espruino flashed into the Esp8266
-
Here's a link that reveals a bit more about the MIDI message format
NoteOnOffvalue: [0x80, 0x80, 0xB0 + channel, controller, value],
If you change the 0xB0 to 0x90, it would send a NoteOn
If you change the 0xB0 to 0x80, it would send a NoteOffIf you configure a local projects in WebIDE and copy the module there, it will load that version of the module. Then you can try the changes. Look at the Gear-like Icon in the upper right of WebIDE. Select Project and define a location on your hard drive. Use you explorer to find that folder and a sub -folder called modules.
Add a new function to the module:exports.noteOn = function(channel, controller, value) { NRF.updateServices({ "03B80E5A-EDE8-4B33-A751-6CE34EC4C700": { // MIDI "7772E5DB-3868-4112-A1A9-F2669D106BF3": { value: [0x80, 0x80, 0x90 + channel, controller, value], notify: true } } });
Similar function for noteOff.
Worth a try.
The channel is the channel number, controller is the Midi note, and value is the velocity. -
A Guess that you can try to see if it works.
I don't have a Puck and not an expert but some poking around the web provides a guess.
You might try:
midi.send(0x9, 60, 100)
A Note Off can be implemented by sending a Note ON with a velocity of 0.
The Puck.js+MIDI page
The send function as found in
exports.send = function(channel, controller, value) { NRF.updateServices({ "03B80E5A-EDE8-4B33-A751-6CE34EC4C700": { // MIDI "7772E5DB-3868-4112-A1A9-F2669D106BF3": { value: [0x80, 0x80, 0xB0 + channel, controller, value], notify: true } } });
The send command sends a 4 byte long MIDI message. The content of the 4 bytes determines the meaning of the 4 byte message and is defined in :
From Section 4 of MIDI10.pdf
From Table 4.1 a Note On uses channel 0x9 and a Note Off uses channel 0x8.
You might try:
midi.send(0x9, 60, 100)
A Note Off can be implemented by sending a Note ON with a velocity of 0.
-
GetAps1 Using the functions in the WiFi module
The Code
//getAps1.js 11Jan2018 //espruino board with ESP8266 //PICO with ESP8266 //var Hardware=0; //Espruino board var Hardware =1; //PICO var Serial; var Startagain=0; var myinterval; function test(){ if(Hardware===1)Serial=Serial2; if(Hardware===0)Serial=Serial4; if(Hardware===1){ digitalWrite(B9,1); // enable on Pico Shim V2 Serial.setup(115200, { rx: A3, tx : A2 }); //Pico } if(Hardware===0)Serial.setup(115200, { rx: C11, tx : C10 }); //espruino board console.log("Start connection process"); var wifi = require("ESP8266WiFi_0v25").connect(Serial, function(err) { if (err){Startagain=1;return;} console.log("Reset the ESP8266"); wifi.reset(function(err) { if (err){Startagain=1;return;} wifi.getAPs(function(err,reply){console.log(err,reply); wifi.getVersion(function(err,reply){console.log(err,reply);}); }); });//end reset console.log("end reset"); });//end require console.log("end require"); }//end test myinterval=setInterval(function () { console.log("Test for error"); if(Startagain){ Startagain=0; test(); }//end of Startagain }, 2000); test();
Sample Output
1v94 Copyright 2016 G.Williams >Start connection process end require =undefined Reset the ESP8266 end reset Test for error Test for error null [ { "ssid": "ATT5wAn8b9", "enc": "wpa_wpa2_psk", "signal": -79, "mac": "f8:18:97:d5:63:06" }, { "ssid": "ATT3x349v4", "enc": "wpa2_psk", "signal": -84, "mac": "cc:65:ad:7e:e2:20" }, { "ssid": "xfinitywifi", "enc": "open", "signal": -81, "mac": "c6:27:95:38:8b:48" }, { "ssid": "xfinitywifi", "enc": "open", "signal": -48, "mac": "16:4e:5a:94:24:e4" }, { "ssid": "xfinitywifi", "enc": "open", "signal": -90, "mac": "c6:27:95:38:c5:20" }, { "ssid": "BLACKHAWKS19", "enc": "wpa_wpa2_psk", "signal": -81, "mac": "c4:27:95:38:8b:46" }, { "ssid": "NETGEAR60", "enc": "wpa2_psk", "signal": -85, "mac": "e4:f4:c6:17:27:50" }, { "ssid": "NETGEAR-Guest", "enc": "wpa2_psk", "signal": -84, "mac": "e6:f4:c6:17:27:51" }, { "ssid": "faux", "enc": "wep", "signal": -49, "mac": "20:4e:7f:03:87:cd" }, { "ssid": "HOME220-2.4", "enc": "wpa_wpa2_psk", "signal": -82, "mac": "70:54:d2:07:7c:c0" }, { "ssid": "xfinitywifi", "enc": "open", "signal": -84, "mac": "70:54:d2:07:7c:c2" }, { "ssid": "AMKUS146", "enc": "wpa2_psk", "signal": -90, "mac": "9e:d3:6d:bb:a8:5c" }, { "ssid": "ATT6UuI5FT", "enc": "wpa_wpa2_psk", "signal": -88, "mac": "f8:18:97:b6:71:32" }, { "ssid": "HP-Print-1E-Officejet Pro 8610", "enc": "wpa2_psk", "signal": -88, "mac": "fc:15:b4:aa:a9:1e" }, { "ssid": "HOME-24D1-2.4", "enc": "wpa_wpa2_psk", "signal": -83, "mac": "0c:54:a5:64:cf:c0" }, { "ssid": "xfinitywifi", "enc": "open", "signal": -83, "mac": "0c:54:a5:64:cf:c2" } ] null AT version:0.60.0.0(Jan 29 2016 15:10:17) Test for error Test for error Test for error >reset(); =undefined
-
Listing the WiFI APs
Using either a PICO or an Espruino Original Board connected via the serial port to and ESP8266.
The code:
//GetAPs.js 11Jan2018 // ESP8266 connected via serial port to PICO or Espruino Board //espruino board with ESP8266 //PICO with ESP8266 //var Hardware=0; //Espruino board var Hardware =1; //PICO var Serial; //setup serial port if(Hardware===1)Serial=Serial2; if(Hardware===0)Serial=Serial4; if(Hardware===1){ digitalWrite(B9,1); // enable on Pico Shim V2 Serial.setup(115200, { rx: A3, tx : A2 }); //Pico } if(Hardware===0)Serial.setup(115200, { rx: C11, tx : C10 }); //espruino board var cmd=""; Serial.on('data', function (data) { // console.log(data); cmd+=data; var idx = cmd.indexOf("\r"); while (idx>=0) { var line = cmd.substr(0,idx); cmd = cmd.substr(idx+1); print(line); idx = cmd.indexOf("\r"); } }); function sendAT(){ Serial.print("AT"); }//end sendAT sendAT(); setTimeout(function () { console.log("Hello World1"); Serial.write("+++"); setTimeout(function () { console.log("Hello World2"); Serial.write("AT+CWLAP\r\n"); }, 5000); }, 5000);
Sample Output
1v94 Copyright 2016 G.Williams > =undefined Garbage Characters > Ai-Thinker Technology Co. Ltd. ready > WIFI CONNECTED > WIFI GOT IP Hello World1 Hello World2 > +++AT+CWLAP > > +CWLAP:(4,"faux2",-51,"04:4e:5a:94:24:e4",1,-36,0) > +CWLAP:(0,"xfinitywifi",-87,"c6:27:95:38:8b:48",1,-19,0) > +CWLAP:(3,"ATT3x349v4",-91,"cc:65:ad:7e:e2:20",1,-22,0) > +CWLAP:(0,"xfinitywifi",-48,"16:4e:5a:94:24:e4",1,32767,0) > +CWLAP:(4,"HOME220-2.4",-83,"70:54:d2:07:7c:c0",6,-17,0) > +CWLAP:(1,"faux",-50,"20:4e:7f:03:87:cd",6,-24,0) > +CWLAP:(0,"xfinitywifi",-82,"70:54:d2:07:7c:c2",6,-17,0) > +CWLAP:(3,"AMKUS146",-93,"9e:d3:6d:bb:a8:5c",7,-17,0) > +CWLAP:(3,"Gearfam",-93,"78:f2:9e:0e:74:c8",6,-26,0) > +CWLAP:(4,"ATT6UuI5FT",-88,"f8:18:97:b6:71:32",9,50,0) > +CWLAP:(0,"xfinitywifi",-79,"0c:54:a5:64:cf:c2",11,-36,0) > +CWLAP:(4,"HOME-24D1-2.4",-79,"0c:54:a5:64:cf:c0",11,-34,0) > +CWLAP:(4,"ATT5wAn8b9",-80,"f8:18:97:d5:63:06",11,51,0) > +CWLAP:(0,"xfinitywifi",-92,"0c:54:a5:6b:f8:aa",11,-21,0) OK >
Batch file to erase flash on ESP8266 oe ESP32
The Output: