Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By dannybackx
#37496 Hi Krzysztof,

Thanks for all the work. I moved ~/.arduino15 somewhere else and started over, and this does indeed fix the build problems.

The connection problem is still there though : both the Serial Monitor in the IDE, and the upload process can't attach to my ESP-8266 systems.

Danny

Using library ESP8266WiFi at version 1.0 in folder: /home/danny/.arduino15/packages/esp8266/hardware/esp8266/2.0.0/libraries/ESP8266WiFi
Using library ESP8266mDNS in folder: /home/danny/.arduino15/packages/esp8266/hardware/esp8266/2.0.0/libraries/ESP8266mDNS (legacy)
Using library ArduinoOTA at version 1.0 in folder: /home/danny/.arduino15/packages/esp8266/hardware/esp8266/2.0.0/libraries/ArduinoOTA

Sketch uses 222,940 bytes (21%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 34,466 bytes (42%) of dynamic memory, leaving 47,454 bytes for local variables. Maximum is 81,920 bytes.
python /home/danny/.arduino15/packages/esp8266/hardware/esp8266/2.0.0/tools/espota.py -i 192.168.1.101 -p 8266 -f /tmp/build50532c4e1e6a0ddaa4ec9763ed22b24e.tmp/MyOTALeds.ino.bin
Authenticating...FAIL
20:15:01 [ERROR]: No Answer to our Authentication
python /home/danny/.arduino15/packages/esp8266/hardware/esp8266/2.0.0/tools/espota.py -i 192.168.1.101 -p 8266 -f /tmp/build50532c4e1e6a0ddaa4ec9763ed22b24e.tmp/MyOTALeds.ino.bin
20:15:19 [ERROR]: No Answer
User avatar
By krzychb
#37502 Hi Danny,

This is great news you have progress!

I propose to check it step by step and use original sketch BasicOTA.ino (without any modifications besides SSID and password) instead of OTALeds.ino. The reason is that BasicOTA.ino does show IP address that clearly indicates that module joined Wi-Fi network.

Here is result of my compilation and loading over serial port.

Code: Select allUsing library ESP8266WiFi at version 1.0 in folder: /home/krzysztof/.arduino15/packages/esp8266/hardware/esp8266/2.0.0-rc2/libraries/ESP8266WiFi
Using library ESP8266mDNS in folder: /home/krzysztof/.arduino15/packages/esp8266/hardware/esp8266/2.0.0-rc2/libraries/ESP8266mDNS (legacy)
Using library ArduinoOTA at version 1.0 in folder: /home/krzysztof/.arduino15/packages/esp8266/hardware/esp8266/2.0.0-rc2/libraries/ArduinoOTA

Sketch uses 223,116 bytes (21%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 34,922 bytes (42%) of dynamic memory, leaving 46,998 bytes for local variables. Maximum is 81,920 bytes.
Uploading 227264 bytes from /tmp/build73d96262e07f1737eba16ac069adaa0f.tmp/BasicOTA.ino.bin to flash at 0x00000000
..............................................................................................................................................................................................................................


Code: Select alltail 0
chksum 0x42
csum 0x42
Booting
Ready
IP address: 192.168.1.115



What is yours?

Once this is verified we would move to loading over a network port.


Krzysztof
User avatar
By dannybackx
#37506 I can get it to load that application (via USB).

Obviously I had to edit the source to specify my wifi ssid and password.
When I build it with just those edits, and upload and run, the application starts and is visible in the Tools->Ports menu, but connecting to it doesn't work. It always wants me to type a password.

So I commented out the line that sets an OTA password.
But that gives the same result :
1. for the OTA upload :
Authenticating...FAIL
22:01:50 [ERROR]: Authentication Failed

2. for trying to connect a Serial Monitor :
Unable to connect: wrong password?
User avatar
By krzychb
#37540 Hi Danny,

Example sketechs BasicOTA.ino and OTALeds.ino do not have any password enabled. I would take fresh example sketch and make sure it is working with OTA before going to next step like adding a password.

If after loading such sketch over serial IDE is still asking for a password I would restart IDE. I noted IDE retains last password and tries to use it without displaying a prompt. I was able to replicate "[ERROR]: Authentication Failed" when playing with various passwords entered.

Serial Monitor over network is not implemented for esp8266/Arduino - https://github.com/esp8266/Arduino/blob ... leshooting. Use external serial monitor for testing. What do you see on external serial monitor when authentication fails?

Does your module meet https://github.com/esp8266/Arduino/blob ... quirements ?

Good luck!
:D


Krzysztof