2

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.

  • First the devkit has a usb-serial bridge (CP2102) and voltage adapter from 5v (USB) to 3.3v. So I connect the devkit with the machine via USB. The driver is installed correctly, and I can see the com, it is COM3. After turning on the NodeMCU I can see a Wifi AI-THINKER-adfe21.

    • Then I tried with the nodemcu-flasher - WINDOWS.

      1. Without any button or pin to ground. I press Flash in the flasher and stay Waiting MAC and the log says Begin Find ESP8266 as the question I told in the begin and the ESP's led (blue led) blinks.
      2. Holding FLASH, press RESET, release FLASH. Still the same like 1.
      3. Wire D3 (GPIO0) to GND. Same result
    • With ESPtool - LINUX - Trying these commands python2 esptool.py --port /dev/ttyUSB0 read_mac python2 esptool.py --port /dev/ttyUSB0 write_flash 0x00000 firmware.bin

      1. Without any button or pin to ground. The output for the commands was Connecting... A fatal error occurred: Failed to connect to ESP8266
      2. Holding FLASH, press RESET, release FLASH. Same
      3. Wire D3 (GPIO0) to GND. Same result.
    • Via Arduino IDE, I installed the ESP8266 board and selected NodeMCU 1.0. The result to try upload some code -> warning: espcomm_sync failed error: espcomm_open failed

  • I tryed to connect the NodeMCU without the USB. Using an Arduino UNO, connecting like following... And I'm getting the same errors.

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
Community
  • 1
  • 1
RataDP
  • 409
  • 5
  • 15
  • Side note: you either have a v1 _or_ a v2 devkit. If it's a v2 then its version is 1.0. If it's a v1 then its version is 0.9. All confusing, I know ;-) See http://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/ for details. – Marcel Stör Feb 05 '16 at 13:08
  • "The driver is installed correctly" - how can you be sure? However, since you tried both on Windows and on Linux it seems unlikely that you have an issue with the driver on _both_ platforms. Did you try with a different USB cable? Did you try with an external power source? – Marcel Stör Feb 05 '16 at 13:16
  • @Marcel Stör It is the v2 or what is the same 1.0 devkit. I tried with different microUSB and different computers. I also powered with a movil phone charger and via Arduino – RataDP Feb 05 '16 at 13:19
  • @Marcel Stör What i mean when I said "installed correctly", is that I download the drivers from SiliconLab and when connect it to the pc, in windows says " Silicon Lab Usb Uart bridge cp212x", if my memory does not fail, and on linux the kernel says "CP212x assosiated to /dev/ttyUSB0" – RataDP Feb 05 '16 at 14:03
  • Updated the question with some discovery – RataDP Feb 07 '16 at 14:57
  • Did you have any success with this issue? – mh00h Oct 20 '16 at 08:32
  • @mh00h This week I will try the Maker Stream's answer. I will comment the results – RataDP Oct 23 '16 at 14:22

3 Answers3

2

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

IgnacioF
  • 51
  • 3
0

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!

0

Maybe you can try this setting.

$sudo esptool.py -p /dev/ttyUSB0 --baud 115200 write_flash -fs 16m -fm qio -ff 0x00000 firmware.bin
Keyur Potdar
  • 7,158
  • 6
  • 25
  • 40
高宇森
  • 25
  • 4