Closed mopagemo closed 5 years ago
Caution: I might be wrong here. So please wait for other before doing the below.
Maybe an issue with flash size. You might want to change the platformio options to provide the correct flash size. The ESP-07 has a 4 MB flash size
https://docs.platformio.org/en/latest/platforms/espressif8266.html#flash-size
From the Examples - you would need to get the correct entry for board... esphome:
platformio_options: upload_speed: 115200 board_build.f_flash: 80000000L
Having the same issue, did you get anywhere?
Haven't had a chance yet to try changing the settings, but will do so over the next couple days and then report back.
The settings already look fine to me in the platform file (https://github.com/platformio/platform-espressif8266/blob/master/boards/esp07.json). I explicitly set the values in the esphome configuration yaml, but got the same error.
IIRC, doing the update OTA will not correct the flash layout, as it just rewrites the sketch (user code) portion of memory. If you need to change the size or layout you need to connect it via UART again and flash via the serial bootloader.
Also, did you edit the error message? The response should say 'wrong real' but you have 'wsong real' - and a / instead of a . in your IP address.
// check if new bin fits to SPI flash
if(bin_flash_size > ESP.getFlashChipRealSize()) {
_currentAddress = (_startAddress);
_setError(UPDATE_ERROR_NEW_FLASH_CONFIG);
return false;
}
(...)
} else if(_error == UPDATE_ERROR_NEW_FLASH_CONFIG){
out.printf_P(PSTR("new Flash config wrong real: %d\n"), ESP.getFlashChipRealSize());
}
Are you sure you have an ESP07? The error message indicates that you have 1M of flash, not 4M. You might try the esp01_1m
board instead.
This may be entirely useless to you, but I've had issues with some esp's having incorrect flash sizes. I just thought I'd try OTA this 'esp07' as 'esp01_1m' in the board description, and voila, it's working and I can OTA update it. I know changing the board description in the ESPhome OTA update is not supposed to do anything, but this has worked for me. Edit - Just read in the AIthinker data sheet, esp07 is 8Mbit (1MB) and esp07S is 32Mbit (4MB) flash...
same OTA error for me here. The board says it is an ESP-07, and pytool says it has a 1MB flash.
xx@xx:~ $ esptool.py --chip auto --port /dev/ttyAMA0 --baud 57600 write_flash --flash_size=detect -fm dout 0
Edit: fixed by using the Generic ESP8266 board (esp01_1m)
Operating environment/Installation (Hass.io/Docker/pip/etc.):
Ubuntu Desktop 19.04, Kernel 5.0.0-21-generic
ESP (ESP32/ESP8266, Board/Sonoff):
ESP8266 ESP-07
Affected component:
https://esphome.io/components/ota.html
Description of problem: OTA update fails whereas update via USB (using FTDI module) works fine.
Problem-relevant YAML-configuration entries:
Logs (if applicable):
OTA logs:
While USB had logging running:
Additional information and things you've tried: