diff --git a/index.html b/index.html index 36632ec..f0f5938 100644 --- a/index.html +++ b/index.html @@ -362,12 +362,22 @@
By default a new installation will erase all data before installation.
- If you want to leave this choice to the user, set the optional key
+ If you want to leave this choice to the user, set the optional manifest
+ key
new_install_prompt_erase
to true
. ESP Web
Tools offers users a new installation if it is unable to detect the
current firmware of the device (via Improv Serial) or if the detected
firmware does not match the name specififed in the manifest.
+ When a firmware is first installed on a device, it might need to do some
+ time consuming tasks like initializing the file system. By default ESP
+ Web Tools will wait 10 seconds to receive an Improv Serial response to
+ indicate that the boot is completed. You can increase this timeout by
+ setting the optional manifest key
+ new_install_improv_wait_time
to the number of seconds to
+ wait. Set to 0
to disable Improv Serial detection.
+
ESP Web Tools supports the
diff --git a/src/const.ts b/src/const.ts
index 5fbfe42..03414d2 100644
--- a/src/const.ts
+++ b/src/const.ts
@@ -19,6 +19,8 @@ export interface Manifest {
/** @deprecated use `new_install_prompt_erase` instead */
new_install_skip_erase?: boolean;
new_install_prompt_erase?: boolean;
+ /* Time to wait to detect Improv Wi-Fi. Set to 0 to disable. */
+ new_install_improv_wait_time?: number;
builds: Build[];
}
diff --git a/src/install-dialog.ts b/src/install-dialog.ts
index 31b1bd4..3e0d176 100644
--- a/src/install-dialog.ts
+++ b/src/install-dialog.ts
@@ -661,18 +661,25 @@ class EwtInstallDialog extends LitElement {
}
}
- private async _fetchManifest() {
- if (this._manifest) {
- return;
+ private async _initialize(justInstalled = false) {
+ if (this.port.readable === null || this.port.writable === null) {
+ this._state = "ERROR";
+ this._error =
+ "Serial port is not readable/writable. Close any other application using it and try again.";
}
const manifestURL = new URL(
this.manifestPath,
location.toString()
).toString();
- this._manifest = await fetch(manifestURL).then(
- (resp): Promise