Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By gadigr
#34850 Hello :)

I received my nodemcu devkits and wanted to use the esp8266 - arduino framework to work with them but i just cant seem to upload any sketch.

One of the boards is flashed with nodemcu lua and this is what i get in esplorer on 9600 baudrate:
Code: Select all NodeMCU 0.9.6 build 20150704  powered by Lua 5.1.4

the other one i didnt flash anything and this is the output on esplorer on 115200 baoudrate:
Code: Select allAT-based firmware detected.
AT+GMR

AT version:0.25.0.0(Jun  5 2015 16:27:16)
SDK version:1.1.1
Ai-Thinker Technology Co. Ltd.


When working with esplorer everything seemes ok, i can send command to both of them and run code samples but when using the arduino ide (1.6.5) with the esp8266 add I cant upload code to the boards and it doesnt matter what board i choose from the board manager...
Here is the output:
Code: Select allSketch uses 201,082 bytes (19%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 44,592 bytes (54%) of dynamic memory, leaving 37,328 bytes for local variables. Maximum is 81,920 bytes.
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
warning: espcomm_sync failed
error: espcomm_open failed



Here's a picture of my boards for reference:
Image

Thanks!
User avatar
By gadigr
#34874 Ok, Something new happened.
When connection the usb while pressing the flash button and then trying to upload a sketch i get these errors:
Code: Select allSketch uses 303,088 bytes (29%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 51,068 bytes (62%) of dynamic memory, leaving 30,852 bytes for local variables. Maximum is 81,920 bytes.
Uploading 307232 bytes from C:\Users\gadi\AppData\Local\Temp\build3458532910459474289.tmp/HelloServer.cpp.bin to flash at 0x00000000
error: failed sending 1070 bytes
.error: failed sending 1044 bytes
.error: failed sending 1040 bytes
.error: failed sending 1040 bytes
.error: failed sending 1071 bytes
.error: failed sending 1084 bytes
.error: failed sending 1059 bytes
.error: failed sending 1094 bytes
.error: failed sending 1058 bytes
.error: failed sending 1057 bytes
.error: failed sending 1056 bytes
.error: failed sending 1053 bytes
.error: failed sending 1050 bytes
.error: failed sending 1057 bytes
.error: failed sending 1047 bytes
.error: failed sending 1050 bytes
.error: failed sending 1051 bytes
.error: failed sending 1050 bytes
.error: failed sending 1052 bytes
.error: failed sending 1046 bytes
.error: failed sending 1044 bytes
.error: failed sending 1049 bytes
.error: failed sending 1051 bytes
.error: failed sending 1054 bytes
.error: failed sending 1054 bytes
.error: failed sending 1063 bytes
.error: failed sending 1089 bytes
.error: failed sending 1054 bytes
.error: failed sending 1067 bytes
.error: failed sending 1067 bytes
.error: failed sending 1060 bytes
.error: failed sending 1056 bytes
.error: failed sending 1066 bytes
.error: failed sending 1059 bytes
.error: failed sending 1055 bytes
.error: failed sending 1058 bytes
.error: failed sending 1067 bytes
.error: failed sending 1062 bytes
.error: failed sending 1058 bytes
.error: failed sending 1047 bytes
.error: failed sending 1053 bytes
.error: failed sending 1050 bytes
.error: failed sending 1051 bytes
.error: failed sending 1058 bytes
.error: failed sending 1060 bytes
.error: failed sending 1050 bytes
.error: failed sending 1058 bytes
.error: failed sending 1060 bytes
.error: failed sending 1065 bytes
.error: failed sending 1057 bytes
.error: failed sending 1064 bytes
.error: failed sending 1056 bytes
.error: failed sending 1052 bytes
.error: failed sending 1046 bytes
.error: failed sending 1050 bytes
.error: failed sending 1051 bytes
.error: failed sending 1061 bytes
.error: failed sending 1044 bytes
.error: failed sending 1054 bytes
.error: failed sending 1051 bytes
.error: failed sending 1050 bytes
.error: failed sending 1042 bytes
.error: failed sending 1050 bytes
.error: failed sending 1056 bytes
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04
User avatar
By BeeGee
#35541 I had a similar problem, but with Adafruit HUZZAH ESP8266 module and Arduino IDE version 1.6.5. The HUZZAH board came with NodeMCU 0.9.5 originally.
Flashing from Arduino IDE always failed with communication errors.

Got it to work with using Arduino IDE version 1.6.6. I use the one from Arduino.cc, not the one from Arduino.org

For flashing I setup the IDE to:
Board: "Adafruit HUZZAH ESP8266" (You might try "Generic ESP8266 Module" if your board is not listed
Upload Using: "Serial"
CPU Frequency: "80MHz"
Flash Size: "4M (3M SPIFFS)"
Upload Speed: "115200"
Port: "COMxx" (select the port your USBtoTTL/FDDI cable is connected to)

Then the usual procedure (Press and hold GPIO0, press RST, release RST, release GPIO0).

Hope this helps.
User avatar
By schufti
#35569 with the nodemcu and the settings correctly to nodemcu it should not be necessary to use buttons for flashing...

don't alter baudrate etc, defaults selected with "nodemcu" will correspond to hardware used.

only if you select something generic, you need operate buttons.