So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By yaconsult
#73863 I am new to the ESP8266 but not linux. I picked up my first NodeMCU board and have loaded micropython on it and am having fun experimenting with it. What a great toy for $2.50! I am connecting to it via USB from my HP laptop running fedora.

My questions are about the two hardware buttons on the board. The button to the left of the micro USB connector is apparently the reset button. What is the button on the other side of the USB socket supposed to do? Do the buttons need to be pressed together to perform some function?

Also, when I press the reset button I get disconnected on the USB port when I use either screen or picocom to connect to the board. Is this normal? When I watch youtube videos of people resetting the board, they stay connected to the board and are able to see the startup messages after the expected startup garbage but, at least on the adafruit videos, they are usually using a mac. I am unable connect to the board again until micropython is up and running.

So, for example, if I have my boot.py script print out info like the IP address I can't see it because I can't connect to the board again until this script has finished. I am trying to figure out what is causing the disconnect and if there is an option I can use in one of my connection methods that will keep the connection open when the ESP8266 is reset?

Thanks!
User avatar
By btidey
#73877 The other button on the board is switch to manually put the device into flash mode. It grounds GPIO00.

So to manually put the device into flash mode, one presses and holds the flash button, then press and release the reset. The chip is now waiting for a serial download. The NodeMCU also has circuitry on it to do this automatically if the serial driver pulses the DTR line lke an Arduino IDE does when doing a serial upload. In this case the flash button is not needed.

What baud rate are you using in the python environment? The chip after reset puts out some stuff at 74480 baud (the garbage characters), then switches to 115200 for the next part, then switches to whatever baud rate is set by the sketch or the environment. If that is 115200 as well then it should be fairly seamless.
User avatar
By yaconsult
#73901 Thank you for your reply!

I do have the speed set to 115200 all the time. So, I successfully connect and have the micropython prompt. When I press the reset button, I am instantly disconnected when using either screen or picocom.

So I can restart screen or picocom and get the micropython >>> prompt again, but I can't see any of the startup messages or anything printed by the boot file.

Every time I push the reset button, I am disconnected. I use esptool on linux to flash. I have ampy and a number of other utilities installed.

Is there much/any variation in these NodeMCE boards from China? Just looking at pictures and specs, they all seem mostly identical. I see the one model with separate battery connection and the other without - which is the one that I have.
User avatar
By ratfink
#73902 I would not expect pressing reset to disconnect the USB port as that is powered from the laptop and on all the time. The reset button only reboots the ESP module. Do you have any other circuitry connected yet? Have you tried a different USB port? I currently work with a Windows base PC and use the Java ESPlorer program, that stays connected across reboots - in fact I can issue a module reboot from the program itself and it always stays connected...