-->
Page 1 of 1

ESP8266/Arduino IDE , server->on for httpwebupdater

PostPosted: Sun Aug 28, 2016 9:58 pm
by SBala
Hello people. I have a project where I'm using a ESP 8266 (NodeMCU V1.0) with code from the SDWebServer, WifiManager and HTTPUpdate Server library. I am trying to activate the update process on pressing a button on my index Web page on the SD card.
On the Button Action I have put "/update". In the Code I have
server.on("/update", [](){
Serial.println("Updating...") ;
httpUpdater.setup(&server);
});

Where httpUpdater has been defined as - ESP8266HTTPUpdateServer httpUpdater;

On entering 192.168.xx.xx/update my Serial port responds as "Updating ......" but nothing happens on the Server. I expected it to display the "Browse button and the Uplod button" as in the WebUpdater example sketch
Obviously I am doing something silly. What is it I should do ?
Regards

Re: ESP8266/Arduino IDE , server->on for httpwebupdater

PostPosted: Mon Aug 29, 2016 9:14 am
by martinayotte
You obviously didn't understood the basics of the ESP8266HTTPUpdateServer example.
It is opening port in setup() to listen for an external tool to upload firmware manually, in this example, it is mentioned to use "curl -F "image=@firmware.bin" esp8266-webupdate.local/update" to push the new firmware.

What you seems to wish is having a button that will trigger a download from external server. This means that the ESP8266httpUpdate/examples/httpUpdate/httpUpdate.ino example is better suit your needs, which is pulling the new firmware using ESPhttpUpdate.update("http://server/file.bin");

Re: ESP8266/Arduino IDE , server->on for httpwebupdater

PostPosted: Mon Aug 29, 2016 3:34 pm
by SBala
Ok.Thanks.I'll look into that and see if can get a working example

Re: ESP8266/Arduino IDE , server->on for httpwebupdater

PostPosted: Mon Aug 29, 2016 3:43 pm
by SBala
True. Being just three weeks into the world of ESP8266, I completely missed understanding that. Wil work on it and get back.