Skip to content

NodeMCU v2 dev board not working #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lordp1 opened this issue May 20, 2015 · 27 comments
Closed

NodeMCU v2 dev board not working #292

lordp1 opened this issue May 20, 2015 · 27 comments

Comments

@lordp1
Copy link

lordp1 commented May 20, 2015

Hello esp8266 team,

I can upload firmware to the NodeMCU v2 board succesfully, but the board wont work after the upload of the arduino sketch (even after reset or fully disconnecting & reconnecting the board).
I've tried a external 3,3 voltage source as well as connecting an FDTI to the serial ports, but noting works (my other esp-03 module does work).

I use the latest mac osx & windows 1.6.4 arduino IDE with the url in the board manager (have tried your url & adafruit's esp8266 url).

Here a simple sketch that i uploaded to the NodeMCU V2 board, as you can see the serial function doesnt work:
nodemcu not working

@igrr
Copy link
Member

igrr commented May 20, 2015

Can't find any specifications for this board. What flash size and interface does it have?

@lordp1
Copy link
Author

lordp1 commented May 20, 2015

i have orderdered the board from: https://www.antratek.nl/nodemcu-v2-lua-based-esp8266-development-kit they refer to NodeMCU for information, here is there github about the board: https://github.com/nodemcu/nodemcu-devkit-v1.0

it hase 32Mbits(4MBytes) of flash and cp2102 usb to uart integrated, forthermore it uses the AI-thinker esp8266 module.

on seedstudio & antratek this module is called the V2, but on the github is is the V1 board ??
fortheremore I see a lot of problems with flasing in the seedstudio comments, and that you should use DIO mode ??? (could this be the problem?, sorry I couldn't find info about DIO mode and dont know what it does...).

@robotiko
Copy link

nodemcu v2 is the confusing commercial name some sellers are using for the devkit 1.0.

Main changes:
"It is the 5th design of NodeMCU devkit. It uses CP2102 as UART bridge, and can flash firmware automatically by using nodemcu-flasher. It support apple's MAC OS. "

It seems to have different pinout and also included buttons have different wiring and purpose (user button is now reset).
Also based on ESP12 with 4MB. Announced as 32Mb (32Mbits == 4MBytes), pure marketing noise.

In case that it helps :D

@jeffryr
Copy link

jeffryr commented May 20, 2015

Does it work with Ivan's full IDE package (not the official Arduino IDE + board manager package)? The DTR/RTS patch hasn't made it into the official Arduino codebase. Without that patch I found that I could compile and upload sketches to an ESP-01 using a CP2102 USB-UART via the board manager technique but the serial monitor would hold the ESP8266 in a perpetual state of reset, see http://www.esp8266.com/viewtopic.php?f=26&t=3094 for some discussion.

@lordp1
Copy link
Author

lordp1 commented May 20, 2015

where can i find the full ide package (compiled), link?? (could find it here anymore)..

I have found a old version of the esp arduino IDE in a backup and uploaded a sketch, it stil doesn't work..
i get the text " load 0x40100000, len 26816, room 16 " and furthermore noting (sometimes i get this message, also with the official arduino + boardmanager methode), after i pres the reset button on the board I get "0�~?�4�!���A�O7E��Y�" on the serial bus (have tried every baud-rate but dont get a clear message), this is stange because if I reflash the lua nodemcu firmware the serial (on a baude-rate of 9600) works normally.

Other functions than serial like pull a pin high and low with delay dont work either (
measure with a multimeter).

@igrr
Copy link
Member

igrr commented May 21, 2015

NodeMCU board shouldn't need the DTR/RTS patch because of the clever wiring of Reset and GPIO0 signals. When both DTR and RTS are asserted, reset and gpio0 remain high. At least this was the case for the original board (v0.9).

@tprochazka
Copy link

So where is problem if it doesn't need the DTR/RTS patch?

@lordp1
Copy link
Author

lordp1 commented May 21, 2015

uploading to the board is not the problem, and if I select NodeMCU as te device I don't have to press reset + flash button *(works automaticly, as mentioned above).
the problem is that after the succesful flasing of the board, the arduino sketch's doesn't work..

@jeffryr
Copy link

jeffryr commented May 22, 2015

Can you power that module independently from the USB connection? If so, try loading a simple sketch that does nothing but joins your WiFi network and writes a bunch of stuff to the serial port or toggles a led. Disconnect the USB port and power it up. If you can ping the module and/or any leds are blinking, it is probably some interaction between the Arduino IDE serial monitor and the module. If not, something else is going on. In that case, try loading different firmware like the Lua interpreter and see what happens.

@lordp1
Copy link
Author

lordp1 commented May 22, 2015

I already have tried running the board of a 5v powersupply (it has an LDO converter to turn it in the 3,3 volt that the board uses), with the independent powersupply the arduino sketch still doens load and doesnt connect to my wifi (can't see a new device in device manager of my router).

when i reupload the NodeMCU firmware (lua) everything works normally (it start and puts a message via te serial connecton (cant test further because I dont know lua, only C(++)), this is while powered from the usb jack (so this is not the problem).

Could it be a problem with the arduino firmware that is uploaded, that it doesnt work with the amount or type of flash? (or are there similar boards like this with 4mb of (SPI DIO mode)flash that does work?)

@tprochazka
Copy link

According the 2A-ESP8266__IOT_SDK_User_Manual__EN_v1.0.1.pdf documentation, flash memory with 1024kB and more kB has different addressation, you can see it here

http://bbs.espressif.com/viewtopic.php?f=10&t=175

@lordp1
Copy link
Author

lordp1 commented May 23, 2015

so the problem with the arduino IDE is that the boot file @ 0X00000000 doesn't load the rest (sketch I presume) that the compiler uploads to 0X00010000 ? could this not be fixed with a little change in the IDE (only upload location of the second file, or is a change in the compiler needed so that the boot-file adresses the correct memory-location (that also needs to change?))?

@igrr
Copy link
Member

igrr commented May 23, 2015

Oh, so you have DIO flash? Then can you try modifying boards.txt, changing

nodemcu.build.flash_mode=qio

to

nodemcu.build.flash_mode=dio

Don't forget to restart the IDE after this change.

@andysmithfal
Copy link

Setting flash mode to DIO is all you need to do - here's a board definition you can add to boards.txt for the NodeMCU dev kit v2
https://gist.github.com/andysmithfal/c8d08898ee6ef146355c

@igrr
Copy link
Member

igrr commented May 23, 2015

@andysmithfal would you be comfortable sending this addition as a pull request? if not, would you let me add it to the Arduino package?

@lordp1
Copy link
Author

lordp1 commented May 23, 2015

confirmed igrr 's methode, the board works now perfectly (thanks)!!.
I tried andysmithfal 's methode by editing the boards.txt in the esp8266 hardware folder (on osx with arduino 1.6.5 (latest hourly build, because the url for the normal osx version on the arduino.cc website give now the windows version (will likely be fixed soon)) but this methode gave me error code's will compiling (probably because the v2 folder isn't in the hardware folder).

@andysmithfal
Copy link

@igrr submitted a pull request. Works for me on OS X.

@Makuna
Copy link
Collaborator

Makuna commented May 24, 2015

At first it didn't seem to work for me (just modified the existing entry). I restarted Arduino several times, even changed the line endings to be lf/cr that Windows Notepad loves, it just didn't work. The last thing I did was switch away from the NodeMcu to generic and back, and it worked? Maybe the IDE is caching?

@igrr
Copy link
Member

igrr commented May 24, 2015

@andysmithfal thanks, merged and updated a bit.

Toshik pushed a commit to Toshik/Arduino that referenced this issue May 27, 2015
Rebased the bugfix from the original Google Code issue esp8266#292 to work with Arduino 1.6.x

Description of original fix provided by Pete62:
The later 8 bit AVR's use two registers (TCCRxA, TCCRxB) whereas the ATmega8 only uses a single register (TCCR2) to house the control bits for Timer 2.  Bits were inadvertently being cleared.
Toshik pushed a commit to Toshik/Arduino that referenced this issue May 27, 2015
Replaced direct register manipulation with calls to bitWrite(). Fixed TIMSK5 usage on Leonardo (as well as some other preprocessor statements).
@dicka55
Copy link

dicka55 commented Jul 29, 2015

I had the same problem addressed in this issue and this issue solved it. I am making this comment in the hope that it will help someone.

The post by igrr on May 23 says that, if you are running DIO flash, change boards.txt as follows:
nodemcu.build.flash_mode=dio (not "qio" as I had).

(I now notice that Flasher was showing SPI = DIO rather than "QIO" in the Advanced menu.)

andysmithfal's post below igrr's post gives a link to an addition to boards.txt which I tried first after restarting the Arduino IDE. This addition uses "dio" but did not work for me.

So I made igrr's change, and it worked!

(Note: I found board.txt quickly when I ran a file search. It was buried in User/AppData.)

@Makuna
Copy link
Collaborator

Makuna commented Jul 29, 2015

If you grab the latest, I don't think you need to do any of this anymore. There is a board entry specifically for this board and it jsu works.
@lordp1 you should confirm and close this issue.

@asetyde
Copy link

asetyde commented Jul 29, 2015

I confirm the last soft (Json ) work perfectly

@lordp1
Copy link
Author

lordp1 commented Jul 29, 2015

the latest version seems to work for me..
so I close this issue.

@mbajlo
Copy link

mbajlo commented Nov 10, 2015

Hi, I'm using nodemcu dev board 0.9(ESP8266-12) and arduino ide 1.6.5, but every time when I try to program my board I get:
"warning: espcomm_sync failed
error: espcomm_open failed"

is there any solution for this? I tried holding flash button at the time of programming but didn't work either.

@dicka55
Copy link

dicka55 commented Nov 10, 2015

Check to see if you have the correct board called up from Boards Manager.Then try other upload speeds.Other than that, it may be a problem in the board.I'm no expert so that's all I can offer.

 On Tuesday, November 10, 2015 1:28 PM, mbajlo <[email protected]> wrote:

Hi, I'm using nodemcu dev board 0.9(ESP8266-12) and arduino ide 1.6.5, but every time when I try to program my board I get:
"warning: espcomm_sync failed
error: espcomm_open failed"is there any solution for this? I tried holding flash button at the time of programming but didn't work either.—
Reply to this email directly or view it on GitHub.

@lordp1
Copy link
Author

lordp1 commented Nov 10, 2015

sometimes i have this problem (V2 == dev board 1.0??) with the current version of the IDE, I than have to reset en press the flash button once (not holding on to it) and than press the upload button in the IDE.
I find this stange because in earlier version of the ide with the mod (DTR/RTS patch) the automatic reset worked 100% off the time, but this manual reset works for me..

@mbajlo
Copy link

mbajlo commented Nov 10, 2015

Hi guys thank you for your responses, I've found out that I have set the esp module in programming mode by pushing and holding the flash button, and pushing the reset button once. That worked for me.
Here is the link where it is described:
http://www.esp8266.nu/index.php/Tutorial_Arduino_Firmware_Upload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants