7

Working with the RobotDyn ESP8266PRO version of the NodeMCU.

First, no doc provided by manufacturer.

Here is as far as I got:

  • 10Kohm between EN and 5V
  • 10Kohm between IO15 and gnd
  • ground IO0 and reset
  • I used a PL2303 cable (success with Ardruino Mino Pro)
  • python esptool.py --port /dev/ttyUSB0 write_flash -fm dio -fs 32m 0x00000 nodemcu-master-12-modules-2016-11-17-02-07-27-integer.bin 0x3fc000 esp_init_data_default.bin

Results: fatal error: Digest mistmatch

Anybody successful with this thing yet?

cc young
  • 18,939
  • 31
  • 90
  • 148

3 Answers3

7

I just received this unit from RobotDyn. Using the exact same pin connections as you, I am able to upload sketches via the Arduino IDE. I am using a CP2102 USB to UART. For uploading I selected "Generic ESP8266" and uploaded at 115200 baud.

Here is my Arduino IDE setup: https://i.stack.imgur.com/glRRn.png

Update: some additional scripts:

  • you're using this as a Arduino, not as a NodeMCU. will give it a shot in that direction. – cc young Jan 29 '17 at 03:11
  • Correct, sorry I didn't notice that you're trying to upload the nodemcu firmware. – Reza Pakdel Jan 29 '17 at 21:30
  • Used your guidance and got it going - as Arduino, not NodeMCU. Good enough! Very much appreciate your taking the time to share. – cc young Jan 31 '17 at 09:06
  • Able to talk to board, but hangs on `WiFi.status()`. You having any luck there? – cc young Jan 31 '17 at 09:55
  • I initially used a very simple script without wifi. Then I used the https://github.com/esp8266/Arduino/blob/master/doc/esp8266wifi/server-examples.md WifiWebServer example from the Arduino library. Is it stuck inside the loop? Perhaps add a `Serial.println(".")` inside the `while` loop. – Reza Pakdel Feb 02 '17 at 04:05
  • Here is my setup if it helps. IO0 must be pulled up for normal boot: https://imgur.com/gallery/uCR5S. The chipset is ESP8266EX and the pin mappings are the same. I'll post my sources tonight. – Reza Pakdel Feb 02 '17 at 04:15
  • way to go! Can you post the command line you used for `esptool.py`? – cc young Feb 02 '17 at 06:32
  • FYI, I tried flashing it using Nodemcu firmware which I'm not familiar with, but it seems to have worked for me? `esptool.py --port COM4 write_flash -fm dio 0x00000 nodemcu-master-7-modules-2017-02-02-05-56-36-float.bin` http://imgur.com/a/92Ako The other thing I read somewhere was that if you're feeding power via vin pin then it must be greater that 4.5V (since it's going through the 3.3V regulator). – Reza Pakdel Feb 02 '17 at 06:36
  • Thanks for tip on power - I am feeding 5v through the VIN pin and dodging the 3.3V pin altogether. What device are you using to talk between your COM4 and the RobotDyn? – cc young Feb 02 '17 at 06:59
  • I used a CP2102 USB to UART from AliExpress. Notice while I managed to upload the firmware I think I'm missing the actual run script so I cannot confirm if the upload is successful. – Reza Pakdel Feb 02 '17 at 07:17
  • @ccyoung, just wondering if you got any further with the ESP8266-PRO? I got I2C and SPI working after reading the ESP8266EX docs for the pin configurations: https://github.com/rpakdel/esp8266-pro-i2c-spi – Reza Pakdel Feb 06 '17 at 08:11
  • big breakthrough on half the problem. Was using `#include `. Paid a consultant to tell me to use `#include ` - that seems to work. Was unaware of these dual libraries. Have no idea how they differ or which should be used when. – cc young Feb 09 '17 at 08:45
3

Reza's answer certainly helped me, but I was able to program the RobotDyn ESP8266-Pro with a simpler configuration using no resistors or external 5V power.

For clarity's sake, let me say that I'm not using any external power, relying only on 5V the power coming through my SiLabs CP2102 breakout programmer plugged into my Mac. The wires from the CP2102 almost line up correctly with the EPS8266-Pro, except that you must swap order of GROUND and CTS coming from the CP2102. Here are the connections needed:

CP2102 -> ESP8266-Pro
---------------------
   DTR -> RST
   RXI -> TXD
   TXO -> RXD
   VCC -> 3.3V
   GND -> GND
   CTS -> IO12

In order to be able to program from the Arduino IDE, I then had to make a few more connections from the ESP8266-Pro to itself. I did not use resistors for the EN-VIN and GND-IO15 connections, as Reza did.

 EN -> VIN
GND -> IO15
GND -> IO0 

With any of the three above connections missing, you can't program the ESP8266-Pro. All three are necessary. This makes the board pretty inconvenient to program in place, so I think I'm not going to be ordering any others in the future.

Here are the settings I'm using in the Arduino IDE:

Arduino IDE 1.8.1 settings or RobotDyn ESP8266-Pro

Programming works just fine with these settings. When using an FTDI232 programmer, I had to drop the speed down to 460800 baud, but otherwise the experience was the same.

Unfortunately, I still can't seem to get the serial monitor working from the IDE so I can see what is (and is not) going on with my code.

Michael Oryl
  • 20,856
  • 14
  • 77
  • 117
  • 1
    I don't think the resisters are required. I vaguely remember reading on https://www.forward.com.au/pfod/ESP8266/GPIOpins/ESP8266_01_pin_magic.html that the resistors are meant for protection? Additionally, check my https://imgur.com/gallery/uCR5S for a simple way switching between uploading and running (PRG and RU labels on the switch). – Reza Pakdel Mar 08 '18 at 18:32
0

Mine worked from the Arduino IDE, out of the box, with some tweaks.

Initially, I had to hold down the boot button until the python script started sending the script.

Then I changed the setting Tools | Reset Method to select NodeMCU reset method, and I no longer need to hold down that pesky boot button.

The built-in LED interferes with / shares the IO pin with the Serial Port, so once you have a script running that is blinking the built-in LED, serial communication and loading a new script gets much more tricky.

My Serial Monitor works ok. Serial seems to go to 115200 * 8 - about 1000000 baud, but might not be so stable at that rate. I certainly was able to speed up the upload speed in the Arduino IDE.

I think maybe we should tell the IDE this is a NODEMCU (because I don't have a board definition for this board) and things seem to work smoother.