nnn
nnn

Reputation: 5165

No proper answer from MCU while uploading lua script onto Feather Huzzah ESP8266

I have a Adafruit Feather Huzzah ESP8266 and want to load a lua script onto it.

The script is out of this Adafruit tutorial and I changed only the Wifi and MQTT connection settings.

I followed the instructions at https://github.com/4refr0nt/luatool#run and used the following command:

python ./luatool.py --port /dev/tty.SLAB_USBtoUART --src LightSensor-master/init.lua --dest init.lua --verbose

I get the following error

Upload starting
Stage 1. Deleting old file from flash memory
->file.open("init.lua", "w")Traceback (most recent call last):
  File "./luatool.py", line 272, in <module>
    transport.writeln("file.open(\"" + args.dest + "\", \"w\")\r")
  File "./luatool.py", line 111, in writeln
    self.performcheck(data)
  File "./luatool.py", line 61, in performcheck
    raise Exception('No proper answer from MCU')
Exception: No proper answer from MCU

What is the error here, what am I doing wrong?

I tried flashing the nodemcu dev version to the Feather. This didn't change the problem. I also read some advice to stabilize the power supply and added a battery to the feather–-also without success.

Upvotes: 0

Views: 390

Answers (2)

Vishvendra Singh
Vishvendra Singh

Reputation: 494

I had the same problem, I detached the cable and attached again and ran the command

sudo python esp8266/luatool.py --delay 0.6 --port /dev/ttyUSB0 --src init.lua --dest init.lua --restart  --verbose

1st time it fails but next time execute the same command and it works for me.

Upvotes: 1

nnn
nnn

Reputation: 5165

Adding a delay of 0.6 ms to the luatool.py solved the problem for me:

python ./luatool.py --delay 0.6 --port /dev/tty.SLAB_USBtoUART --src LightSensor-master/init.lua --dest init.lua --verbose

I found this solution because I read some advice that the python script might try to talk to the Feather faster than the Feather can answer.

Upvotes: 2

Related Questions