You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently switched to a new batch of modules for a new manufacturing run
Had discovered that the new modules only support flash mode DIO, while the old ones supported QIO (the default).
Was now using --flash-mode dio on the esptool.py command line to program modules initially, with binaries built as before.
Binaries were then posted to a web server for OTA updates.
Cause
I tracked this down to the change in the flash mode. esptool.py was rewriting the flash mode in the .bin file as it programmed the module initially, so it was QIO in the .bin file, but DIO on the module.
Then, .bin files posted on the server for OTA were installed, and the bootloader's flash mode check failed on startup. This resulted in a dead module (from the customer's perspective; serial reprogramming still works fine).
Workaround
Modifying the build process to set the flash mode to DIO in the binary instead of while programming via esptool.py fixes the OTA problem. But, it's now not compatible with other modules that are already in the field, so a separate branch of .bin files must now be tracked on the OTA server - one for DIO and one for QIO.
Suggested solution
Either the flash mode (and maybe speed) should be verified before OTA succeeds, or it should be silently changed to match the mode that's already being used on the module, analogous to the way esptool.py does.
The text was updated successfully, but these errors were encountered:
Basic Infos
Platform
Settings in IDE
Problem Description
The symptom is that OTA update works normally, using
ESPhttpUpdate
:and then after reboot I see:
And the module stops.
The conditions under which this occur are:
--flash-mode dio
on theesptool.py
command line to program modules initially, with binaries built as before.Cause
I tracked this down to the change in the flash mode.
esptool.py
was rewriting the flash mode in the .bin file as it programmed the module initially, so it was QIO in the .bin file, but DIO on the module.Then, .bin files posted on the server for OTA were installed, and the bootloader's flash mode check failed on startup. This resulted in a dead module (from the customer's perspective; serial reprogramming still works fine).
Workaround
Modifying the build process to set the flash mode to DIO in the binary instead of while programming via
esptool.py
fixes the OTA problem. But, it's now not compatible with other modules that are already in the field, so a separate branch of .bin files must now be tracked on the OTA server - one for DIO and one for QIO.Suggested solution
Either the flash mode (and maybe speed) should be verified before OTA succeeds, or it should be silently changed to match the mode that's already being used on the module, analogous to the way
esptool.py
does.The text was updated successfully, but these errors were encountered: