RataDP
RataDP

Reputation: 429

Unable to program NodeMCU

This question is related to this, Cannot program ESP8266, but different settings.

I have a NodeMCU devkit v1, its comercial name is NodeMCU v2. I tried different setting to connect the devkit.

UNO | NodeMCU 5v -> Vin GND -> GND Rx -> Tx Tx -> Rx

The last test I made, it is with Putty or Arduino SerialMonitor connect to the COM3 or /dev/ttyUSB0 and turning on the NodeMCU. I should see some characters or garbage if it in different baud rate. But I got nothing, the terminal is blank. I restart the NodeMCU, put it in Flash mode. No response.

Are there some solution, tip or trick to make it programmable?

PS: I know the NodeMCU is in Flash mode because its wifi disappear.

EDIT:

I discovered something.

I just connected the NodeMcu with a mobile charger and connect the D0 to Serial ground and D3 to Serial Rx. On the putty with 115200 Baudrate, I'm able to get the following code on reset.

node : sta(mac address) + softAP(mac address)
add if0
add if1
dhcp server start:(ip:192.168.4.1, mask:255.255.255.0,gw:192.168.4.1)
bcn 100

Upvotes: 2

Views: 5421

Answers (3)

高宇森
高宇森

Reputation: 25

Maybe you can try this setting.

$sudo esptool.py -p /dev/ttyUSB0 --baud 115200 write_flash -fs 16m -fm qio -ff 0x00000 firmware.bin

Upvotes: 0

Maker Stream
Maker Stream

Reputation: 1

if you are using esptool (either in Linux or windows), you should include -fm and -fs inside the esptool command. There will be no response if you did not include those 2 parameter even though it show successfully upload. you can refer the detail in this youtube tutorial or its description for flashing firmware in nodemcu V2 or v1.0.

esptool.py --port [serial-port-of-ESP8266] write_flash -fm [mode] -fs [size] 0x00000 [nodemcu-firmware].bin

Tutorial on how to flash firmware using esptool(windows):

https://www.youtube.com/watch?v=MHrm7axsImI

cheers!

Upvotes: 0

IgnacioF
IgnacioF

Reputation: 51

I have been working with both the node-mcu flasher and the esptool. First in the esptool yo should use more parameter in the call. Use something like this

python esptool.py -p SERIAL_PORT_NAME --baud 9600 write_flash --flash_size=8m 0 firmware-combined.bin

Be careful with the baudrate, i always use 9600. If you prefer using the windows program you should only connect the ESP8266 through usb and dont connect any other pin. If it still gives you problems you should check that u have installed the com ports.

Good Luck

Upvotes: 2

Related Questions