-->
Page 1 of 4

Unable to program/flash ESP-01 using ESPlorer

PostPosted: Sun Jan 23, 2022 3:22 pm
by hobby_guy
I'm trying to learn how to flash a (lua) program onto the ESP-01 (ESP8266). I found this tutorial, and some Youtube videos, which do make it look very simple (connect RXTX-TXRX on a USB-serial device, and pull CHPD high and GP0 low, and then just use Esplorer IDE), but I just can not get it to work :(

I'm able to connect to the ESP8266 through Esplorer, as far as I can tell, but I just can't do anything. None of the buttons on the Esplorer result in any response in the command/log window. Some tutorials say you need to restart the ESP8266 a couple of times for the connection to work, but still no luck.

Here's what I do:

1) connect the USB-serial interface to the PC (COM7)
2) start Esplorer
3) power on the ESP8266 (3.3v)
4) open connection on COM7 in Esplorer at 115200

this gives me:

PORT OPEN 115200

Communication with MCU...


and

Code: Select allLogging enable
LAFcom.sun.java.swing.plaf.windows.WindowsLookAndFeel
LAFcom.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel
LAFcom.sun.java.swing.plaf.motif.MotifLookAndFeel
LAFjavax.swing.plaf.nimbus.NimbusLookAndFeel
LAFjavax.swing.plaf.metal.MetalLookAndFeel
Load saved settings: Firmware:NodeMCU
Snippets: loading...
Snippets load: Success.
Set new color theme: Success.
Load saved settings: DONE.
Snippets: loading...
Snippets load: Success.
Scan system...
found last saved serial port COM7
Scan done.
Serial port COM7 save as default.
Baud rate 115200 save as default.
Try to open port COM7, baud 115200, 8N1
Open port COM7 - Success.
sending:<CR><LF>


5) click "FS info" button (just to try something), and this logs

sending:r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil<CR><LF>

but no response

6) power cycle ESP8266 again...

when I turn it OFF, I get this logged:


PORT OPEN 115200

Communication with MCU...
Got answer! Communication with MCU established.
AutoDetect firmware...

Can't autodetect firmware, because proper answer not received (may be unknown firmware).
Please, reset module or continue.

turning it back ON has no apparent effect at all

7) and I'm stumped...

Re: Unable to program/flash ESP-01 using ESPlorer

PostPosted: Mon Jan 24, 2022 5:56 am
by hobby_guy
My ESP8266 apparently has some AT firmware. Is this os not compatible with this type of "programming"? What I'm struggling to understand is, do we flash/overwrite the entire os with a new hex (as with avr), or do we upload a file (init.lua) which a specific os expects?

If the latter, then I might need to first flash the correct os, and then upload my init.lua?

Re: Unable to program/flash ESP-01 using ESPlorer

PostPosted: Mon Jan 24, 2022 5:59 am
by hobby_guy
I think I understand now... The ESP needs to have a specific os/firmware, which expects a specific Lua file. And which is able to interpret & run it... The init.lua file in the Instructable obviously is not a replacement for the entire firmware on the esp!

So what do I do now? What's the proper os, and how do I go about flashing that over the esp? What tool is used then? And, how do I go back to the AT firmware I have now, if I want to?

Re: Unable to program/flash ESP-01 using ESPlorer

PostPosted: Mon Jan 24, 2022 12:46 pm
by quackmore
Code: Select allI think I understand now... The ESP needs to have a specific os/firmware, which expects a specific Lua file. And which is able to interpret & run it


you got it right

if you want to use ESPlorer then you will need NodeMCU
the documentation is pretty good, you'll find everything you need there

https://nodemcu.readthedocs.io/en/release/