问题
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.
回答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.
回答2:
If you're using ESPlorer to send Lua code/files try turning on 'turbo' mode in the settings. I vaguely remember issues like that.
来源:https://stackoverflow.com/questions/38200425/nodemcu-custom-firmware-problems