-->
Page 1 of 1

NodeMCU (v0.9) restarts when opening serial port

PostPosted: Tue Oct 13, 2015 10:14 am
by konstan
Hey all,

I am playing with the two '8266 boards that I have. One is the ESP-01, the other one is the NodeMCU devkit board that is marked 'LoLin' on the bottom. Both boards are flashed to the NodeMCU Lua firmware, latest.

For the NodeMCU DevKit board, if I initiate a serial port connection the NodeMCU board in rapid succession, no more than 2 seconds between the disconnect and the following connect, it forces the board to restart. I found this out by using the nodejs based esp8266-cli tool (https://github.com/paulcuth/esp8266-cli). I like the tool because I can do things like 'esp file push filename.lua' to push a file to it, and 'esp file list' to show the list of files on the flash. Two commands in a rapid succession (for example 'esp file list' twice) cause the board to reset itself. Reliably, every time, if you do it in less than 2 seconds.

This problem is not specific to the command line tool. I did the same thing with Arduino IDE serial monitor and with Esplorer. It is sufficient to just connect-disconnect-connect quickly, and the board will reset.

My ESP-01, connected via a USB/Serial buddy with a CH340 chip, does not exhibit this behavior.

Anyone else seen this?

Re: NodeMCU (v0.9) restarts when opening serial port

PostPosted: Tue Jan 05, 2016 6:34 pm
by Rahjan
Hi konstan,

I have a LoLin NodeMCU V3 board with nearly the same behaviour. The board disconnects after a few seconds when connected. Unfortunately it only connects once when it is plugged in. After a few seconds it disconnects and tries to re-connect with a 'connection failed' message. Have you found a solution for your problem?
For me it seems to be a Windows 7 driver problem. I tried to connect the board to Ubuntu without any disconnect...

Re: NodeMCU (v0.9) restarts when opening serial port

PostPosted: Sat Jan 30, 2016 3:40 pm
by espalu
I own also LOLin V3 ( v0.1) and play under Linux with ESPlorer and have similar behaviour i think.
I've tried firmware LUA 0.9.6 and 1.4.0 (integer). BOOT seems OK. I can read version, heap and so on. But while 1-st sending of file xxx.lua to ESP, communication stops. After reset: sometimes I can read, that xxx.lua exists ( lenght=0Bytes), sometimes I see a lot of 'lua'-Code-Line dumps. Strange ;-(.

Linux uses ch341 USB to SERIAL driver. ( Chip on board CH340G ).
ESPlorer uses defaults 74880 baudrate
Perhaps do I have to shortcut some pins to run LUA? Any :idea: ?

Re: NodeMCU (v0.9) restarts when opening serial port

PostPosted: Sun Jan 31, 2016 5:03 pm
by espalu
last dmesg-entry was: perf interrupt took too long (2506 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
I don't know exactly if it's the solution/workaround. I have set baud rate to 38400 and its OK. Everything works.
Someone knows, what to do for "speed up" the ch341 driver? Thanx.