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

Moderator: igrr

User avatar
By dannybackx
#37547 Hey Krzysztof,

Now it works, even in my own application ;-)
I've copied some of recent reboot log below for your info.

Your latest message gave some insights that I must have overlooked in the documentation :
- need to use an external connection, not the IDE serial monitor
- stay away from OTA passwords for now

The other thing that probably went wrong (see your earlier input) was to use IDE 1.6.7 and remove the old $HOME/.arduino15 directory .

My app is on https://github.com/dannybackx/arduino-upnp , I'll post updated sources including OTA support later today.

Thanks for all your input.

Danny

AlarmService::begin (pin 0)
Starting OTA...
Ready!
OTA Start

OTA Progress: 0%
OTA Progress: 0%
OTA Progress: 1%
OTA Progress: 1%
..
OTA Progress: 99%
OTA Progress: 100%
OTA End



ets Jan 8 2013,rst cause:2, boot mode:(3,6)



load 0x4010f000, len 1264, room 16

tail 0

chksum 0x42

csum 0x42

@cp:0
ld
Alarm Controller

Boot version 31, flash chip size 4194304, SDK version 1.3.0
Free sketch space 2875392
Starting WiFi... MAC 5C:CF:7F:0E:AA:14, SSID {WiFi-2.4-44DF}, IP 192.168.1.101, GW 192.168.1.1
SPIFFS directory {/} :

/config.txt

SPIFFS directory {} :

/config.txt

SPIFFS total 957314 used 502 maxpathlength 32
SPIFFS : /config.txt exists, content 99 bytes
Starting HTTP...
Starting SSDP...
Configuration::Configuration(Alarm)
ReadConfiguration(Alarm)
Configuration match for Alarm code {1234}
AlarmService::begin (pin 0)
Starting OTA...
Ready!
User avatar
By krzychb
#37552 Hi Danny,

Cool project to discover and query devices using UPnP - congratulations :D
I am happy you were able to integrate OTA into it.

In the meantime I were able to replicate the issue you have with password.

Apparently the password I enter is ignored If I select "Upload Using: OTA"
OTA-password-not-passed-to-script.png

To make it work just leave "Upload Using: Serial".
OTA-password-passed-to-script.png

If this is the case for you as well then consider reporting it under https://github.com/esp8266/Arduino/issues


Krzysztof
You do not have the required permissions to view the files attached to this post.
User avatar
By dannybackx
#37555 My case appears to be slightly different. With "Upload using OTA" the -auth option is not present at all (as in your case), but with "Upload using Serial" (but an OTA port), the option passed is -auth= .

So the option is there but the password is empty (the IDE never asked me for a password).

Copying the command line to another window, and passing the right -auth=... parameter, makes the upload work as it should.

I'll report this, with a link to your finding as well. Thanks for the research.

Danny
User avatar
By dannybackx
#37613 An alternative implementation of the OTA callback functions :
Serial.printf("Starting OTA listener ...\n");
ArduinoOTA.onStart([]() {
Serial.print("OTA Start : ");
});
ArduinoOTA.onEnd([]() {
Serial.println("\nOTA Complete");
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
int curr;
curr = (progress / (total / 50));
if (prev < curr)
Serial.print('#');
prev = curr;
});

and obviously you need a "static int prev;" also.
This shows :

OTA Start : ##################################################
OTA Complete
instead of more than 100 lines of log.

Happy 2016 ;-)

Danny