Updating OTA is amazing

You have had the wrong flash size since you started using the 12F. The IDE just gives you a default (which is not a 12F) and you need to make the selections for flash, baud etc etc.

Set it as 4M with 1M SPIFFS.

Compile at standard sketch (empty setup and empty loop) and let us now how that goes.

i just ran the flash check:

Flash real id: 001640E0
Flash real size: 4194304

Flash ide size: 4194304
Flash ide speed: 40000000
Flash ide mode: DIO
Flash Chip configuration ok.

empty sketch:

Sketch uses 221,999 bytes (21%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 31,564 bytes (38%) of dynamic memory, leaving 50,356 bytes for local variables. Maximum is 81,920 bytes.
Uploading 226144 bytes from C:\Users\Toshi2\AppData\Local\Temp\buildebf25e0338692218c57d14bc8d5b301d.tmp/sketch_aug15a.ino.bin to flash at 0x00000000
… [ 36% ]
… [ 72% ]
… [ 100% ]

1 Like

There you go, you have doubled your program memory today and set the flash size correctly.

is SPIFFS best set to 1M or 3M?

Doesn’t matter Dave but the structure of the ESP is at https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#flash-layout

SPIFFS is for storing things like web pages that you might want the ESP to serve to connected clients etc.
Leave it at 1M SPIFFS for now.

If your OTA doesn’t work now, try the basic OTA sketch and give us the results.

1 Like

yes - that’s what i am trying?

#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>

const char* ssid = "alphabetSoup";
const char* password = "backwardsZed";

void setup() {
  Serial.begin(115200);
  Serial.println("Booting");
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  while (WiFi.waitForConnectResult() != WL_CONNECTED) {
    Serial.println("Connection Failed! Rebooting...");
    delay(5000);
    ESP.restart();
  }

  // Port defaults to 8266
  // ArduinoOTA.setPort(8266);

  // Hostname defaults to esp8266-[ChipID]
  // ArduinoOTA.setHostname("myesp8266");

  // No authentication by default
  // ArduinoOTA.setPassword((const char *)"123");

  ArduinoOTA.onStart([]() {
    Serial.println("Start");
  });
  ArduinoOTA.onEnd([]() {
    Serial.println("\nEnd");
  });
  ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
    Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
  });
  ArduinoOTA.onError([](ota_error_t error) {
    Serial.printf("Error[%u]: ", error);
    if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
    else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
    else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
    else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
    else if (error == OTA_END_ERROR) Serial.println("End Failed");
  });
  ArduinoOTA.begin();
  Serial.println("Ready - TEST OTA");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  ArduinoOTA.handle();
}

And your results now you have the correct flash details?

“no response from device” in the IDE

and in Termite:

Error[2]: Connect Failed
Error[4]: End Failed

is this perhaps a firewall or router issue?

So compiling is ok.

After compiling did you power off the ESP before trying to do the OTA update?

yes, i keep power cycling it mate :wink:

And you have Serial Monitor closed?

serial monitor is closed,

Tx & Rx are unplugged

is there a firmware i should be usign?

i am using this one:

0.9.6-dev_20150627

well, i just put the basic firmware on:

AT22SDK100-2015-03-20-boot1.2.bin

still “no response from device”

i just tried a different ESP-8266-12E board and get same error…

Dave I am getting the same response.
If you figure it out please let me know.

Thanks
Denny

Hi Blynkers,
as additional way of upload and run your code via OTA, it can be done using Web Browser, you can find all details here:

http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html#web-browser

I did it time ago and it works fine!

Regards!

2 Likes

@psoro I find the web browser OTA system to be the most reliable.

1 Like

Could the “no response error” be router / security related?

@Dave1829 I guess it could be a router security issue.

I have uploaded your sketch and checked with Termite and all is fine here.

I know from your previous posts that you have port forwarding setup so you have been in to the router settings. I am not saying disable port forwarding but you might need to provide access to additional ports.

I also know you have “2 networks” running i.e not all the network is on 192.168.1.x. I think you might have 192.168.10.x too but as the IP port is appearing in the IDE this might not be the issue.

What computer and OS are you using.
Which router?