1

After flashing an ESP8266 with a custom NodeMCU build ist doesn't work as with the version before. For the custom build I've used the cloud service at http://nodemcu-build.com, the prior version was nodemcu_float_0.9.6-dev_20150704.bin from github.

The problem now is that communication over serial port now is quirky, sometimes it seems to work, sometime not.

Example:

When I list files:

> for k,v in pairs(file.list()) do l = string.format("%-15s",k)
print(l.."   >..v.." bytes") end
stdin:1: ')' expected near 'bytes'
> 
> 

Or when I execute node.chipid()

þ®ÈJÀHƒÌHÜÞ{½ÝÕ½{ommw¯­íë= node.chipid()
> = node.cèipid()
stdin:1: '<eof>' expected near 'è'
> = node.,+¥‘¡)
stdin:1: '<name>' expected near ','
> = node.,+¥‘¡)
stdin:1: '<name>' expected near ','
> = node.chipid()
13840686
> = node.chipid()
13840686
> = node.chipid()
13840686
> 

In the above exapmle I've executed node.chipid() six or seven times, the latter two times it worked. Errors of this kind happen over and over again, uploading lua files doesn't work, although success was stated.

I've tried it with LuaLoader and LuaUploader, it is reproducable. When flashing the older firmware, everything works as expected, but it doesn't provided some modules I want to use. For flashing I've used ESP8266Flasher.exe.

What is going wrong? What did I do wrong? Changing baud rates did make some differences, but the problems persist.

2 Answers 2

1

I think the default baud changed with the latest version, try setting the reading side's baud rate to 115200.

Alternatively, try setting the baud rate of the ESP lower (9600) using lua code in the init file, mayby 115200 is too fast for your serial chip.

Sign up to request clarification or add additional context in comments.

4 Comments

Thank you, adding uart.setup(0,9600,8,0,1) as first line in init.lua did the trick. But first I had to execute this line on a higher baud rate, which took a few tries, because the baud rate was too high. Then it was possible to write the file, then everything seems to work niceley. It seems my €0,97 USB to serial converter is woth it's money, but not more than that :)
@user3392724 that's only partially correct. Yes, we did change the default but we also added auto-baud detection, see nodemcu.readthedocs.io/en/latest/en/modules/uart.
Marcel Stor: Cool, hadn't found that yet in the documentation :) Michi Kaa: I can recommende the cheap CP2012 based serial adapters, the pricing is the same, but they operate at the 3.3v the ESP needs, and sofar I've had very good stability, right up to their max rated baud rate (close to 1Mbit). Ofcourse your milage may vary :)
Thanks for the suggestion, I already asked my friend Ali to send me one.
0

If you're using ESPlorer to send Lua code/files try turning on 'turbo' mode in the settings. I vaguely remember issues like that.

2 Comments

I'll give ESPlorer and this setting a try, but it seems user3392724 has the solution for me.
If you're stuck at 9600 you wouldn't need turbo I guess ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.