Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Mr.Tom
#32147 Hi,
I tried to flash the "NodeMcu Amica V3 ESP-12E ESP12E 4MB FLASH Lua WIFI Networking dev board ESP8266" from ebay with the esphttpd webserver using the esptool.py. On windows it works perfekt, but I want to compile and flash it under linux and with the same params it fails each time with:
Code: Select allConnecting...
Traceback (most recent call last):
  File "./esptool.py", line 532, in <module>
    esp.connect()
  File "./esptool.py", line 159, in connect
    raise Exception('Failed to connect')
Exception: Failed to connect


I used Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-65-generic i686 with the latest CP210x driver source.
What are the differences on driver for win and linux?
Any other tools for linux to flash the binaries?

Best Regards
Mr.Tom
User avatar
By Mr.Tom
#32204 Ok.. I found the solution :D
After some modifications on esptool.py I've got the exception details:
In the function connect I've got the exception:
Code: Select alldevice reports readiness to read but returned no data (device disconnected?)

After some google'ing I've found this article
https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1501345
Ok.. a kernel bug..
With kernel "linux-image-3.13.0-65-generic 3.13.0-65" this bug kills the esptool. :twisted:
Ok.. update the kernel:
Code: Select allapt-get update
apt-get upgrade
apt-get distupgrade
reboot

Check for the correct kernel
Code: Select alluname -a
Linux SHOP-PC 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:21:40 UTC 2015 i686 i686 i686 GNU/Linux


Code: Select allErasing flash...
Wrote 34816 bytes at 0x00000000 in 1.1 seconds (262.8 kbit/s)...
Erasing flash...
Wrote 181248 bytes at 0x00040000 in 5.5 seconds (261.9 kbit/s)...

Leaving...


Yeah.. and it works... :D