4refr0nt / luatool

Small python script for loading init.lua to ESP8266 nodemcu firmware
http://esp8266.ru/
GNU Lesser General Public License v3.0
310 stars 96 forks source link

No proper answer from MCU #28

Open Tom-Neverwinter opened 9 years ago

Tom-Neverwinter commented 9 years ago

version mismatch issue!!!

root@kali:~# sudo python '/root/Desktop/luatool-master/luatool/luatool.py' --port /dev/ttyUSB0 --src '/root/Desktop/experimental/init.lua' --dest init.lua --verbose Set timeout None Set interCharTimeout None Upload starting Stage 1. Deleting old file from flash memory ->file.open("init.lua", "w")Traceback (most recent call last): File "/root/Desktop/luatool-master/luatool/luatool.py", line 170, in writeln("file.open(\"" + args.dest + "\", \"w\")\r") File "/root/Desktop/luatool-master/luatool/luatool.py", line 44, in writeln raise Exception('No proper answer from MCU') Exception: No proper answer from MCU

mattrasband commented 9 years ago

Sounds like you may have either a tight while loop or something is causing NodeMCU to crash loop (which is unfortunately easy to do). Whenever I have seen that, I've needed to re-flash the base firmware and start again.

If you are using any while loops, you may be better served by using tmr.alarm for scheduling repeating or singular time events.

MiracleMike commented 8 years ago

Hi! I have the same issue as Tom. It is my first try at Nodemcu...a real noob! :) I'm just trying with the init.lua that comes with your script in this repo. The only change I made is my SSID/password. I'm using the Nodemcu Amica R2. Did'nt change the firmware. I see my Nodemcu in my wirreless network (AI_THINKER_DXXXXX) I can do command like this "python tools\esptool\esptool.py -p COM4 read_mac" The windows driver sucessfully installed and is working.

C:\dev\mike\nodemcu\luatool>python luatool.py --port COM4 --src init.lua --dest init.lua --verbose Upload starting Stage 1. Deleting old file from flash memory ->file.open("init.lua", "w")Traceback (most recent call last): File "luatool.py", line 268, in transport.writeln("file.open(\"" + args.dest + "\", \"w\")\r") File "luatool.py", line 107, in writeln self.performcheck(data) File "luatool.py", line 60, in performcheck raise Exception('No proper answer from MCU') Exception: No proper answer from MCU

Any idea ? thanks!

acowley commented 8 years ago

I saw the same errors reported here until I replaced the firmware on a unit I received.

MiracleMike commented 8 years ago

@acowley OK. I've updated the firmware to the lastest "nodemcu_integer_0.9.6-dev_20150704.bin" and the script works now. Thanks a lot !

avmelnikoff commented 8 years ago

I had the same problems. Looks that NodeMCU need more amps (I didn't measure it, this is my first night of playing with it) and it do not work with some USB cables at all or do not have stable connects to PC (time to time). So, to solve this problem, I took short USB cable (30cm). The second problem, I get "No proper answer from MCU" if I try to use luatool without --baud argument (as it mentioned in readme), as I understand, in this case, luatool/nodemcu try to autoconfig baudrate. So, to solve it, I've added --baud 115200 and now, luatool works just fine.

urishani commented 6 years ago

i have this problem now... I use the floating version of the flash image.

fffabs commented 5 years ago

@avmelnikoff thank you so much, adding --baud 115200 fixed the issue for me!