Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By HermannSW
#40819 Hi,

last year I bought this 4$ nodemcu development board:
Image

I installed Arduino IDE like I did previously when working with ESP8266-01 and Arduino IDE (successfully).
But the upload to /dev/ttyUSB0 never worked ("warning: espcomm_send_command: didn't receive command response").

Early December I figured out that esptool.py does work fine with that dev board.

So today I came back and wanted to get IDE flash successfully, still without success.
But I remembered esptool.py from December and read the complete IDE error message:
Code: Select all...
Sketch uses 203,872 bytes (46%) of program storage space. Maximum is 434,160 bytes.
Global variables use 33,162 bytes (40%) of dynamic memory, leaving 48,758 bytes for local variables. Maximum is 81,920 bytes.
Uploading 208016 bytes from /tmp/build8842525585841879818.tmp/sketch_feb09a.cpp.bin to flash at 0x00000000
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: didn't receive command response


Next I googled on how to use esptool.py flash_write and figured it out.
Then changing to the tmp directory and flashing with esptool.py:
Code: Select all$ esptool.py write_flash 0x00 sketch_feb09a.cpp.bin
Connecting...
Erasing flash...
Wrote 208896 bytes at 0x00000000 in 20.5 seconds (81.7 kbit/s)...

Leaving...
$ pwd
/tmp/build8842525585841879818.tmp
$


So flashing just worked, and this was the sketch I flashed:
Code: Select allint i=0;

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println(i++);
  delay(1000);
}


Next I opened Arduino IDE serial monitor on 9600bps and happily saw increasing numbers printed every second.

So I have a solution to work with the IDE, but the esptool.py workaround is not nice.

Can sombody please tell me what setting is wrong, or what I can try else to make the IDE flash alone?
Image

Hermann.
User avatar
By krzychb
#40823 Hi Hermann,

Such setting work fine for me except 9600 is really slow. This is the first time I tried it instead of 115200 :shock:

To narrow down the range of possible upload options to select, instead of “Generic ESP8266 Module” I would select “NodeMCU 1.0 (ESP-12E Module)” (that I see on your picture ) and check it again.

If it does not help, then post version of your Arduino IDE and version of ESP core.
I am using Arduino IDE 1.6.7 and core 2.0.0.

You did really great a deal of troubleshooting already and I guess your issue is to trivial pin down now :D

Good luck,

Krzysztof
User avatar
By HermannSW
#40826
krzychb wrote:... To narrow down the range of possible upload options to select, instead of “Generic ESP8266 Module” I would select “NodeMCU 1.0 (ESP-12E Module)” (that I see on your picture ) and check it again. ...


Thank you so much, I did try NodeMCU option before unsuccessfully (must have selected the 0.9 version).

Now flashing from ARduino IDE just works fine without any problems!
Code: Select all...
Sketch uses 203,872 bytes (19%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 33,162 bytes (40%) of dynamic memory, leaving 48,758 bytes for local variables. Maximum is 81,920 bytes.
Uploading 208016 bytes from /tmp/build8842525585841879818.tmp/sketch_feb09a.cpp.bin to flash at 0x00000000
............................................................................................................................................................................................................


Hermann.
User avatar
By HermannSW
#41921 Hi,

after Krzysztof's help I was able to use nodemcu development board without problems with Arduino IDE.
The next day I did order two new modules, from same supplier, and this time for <4$:
http://www.aliexpress.com/item/New-Wireless-module-NodeMcu-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266-with-pcb-Antenna/32303690854.html

They arrived yesterday (after only 15 days!), and together, although I had to place two separate orders in order to get free shipping (from China to Germany) :)

Unfortunately nothing worked with these, not even "esptool.py flash_id".

So I stopped a bit frustrated yesterday, and tried again some minutes ago -- same result.
Then I did "sudo esptool.py flash_id" and it did not result in an immediate error message, but hung.
After pressing CTRL-C I saw part of the correct response.
Repeating the command everything was fine, immediate correct response.
Now I was able to "esptool.py flash_id" and "esptool.py read_mac" even without "sudo".
Next I flashed esp8266 Blink demo (with "BUILTIN_LED") with Arduino IDE without problems.

The same procedure worked for the 2nd new dev board, but I had to try 4 or 5 times "sudo esptool.py flash_id" until anything got returned partially.

So I have no idea what state the modules were in when I received them, and why the procedure described was able to get them into good state. Any ideas?

The youtube video even demonstrates that Vin=9.56V is fine for these modules (I found quite some Vin questions):
http://youtube.com/watch?v=u3EzbNTiQcw
Image

Hermann.