tasmota-webserial-esptool 9.1.0 → 9.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js/script.js CHANGED
@@ -3,6 +3,7 @@
3
3
  let espStub;
4
4
  let esp32s2ReconnectInProgress = false;
5
5
  let isConnected = false; // Track connection state
6
+ let isAndroidPlatform = false; // Track if running on Android
6
7
 
7
8
  const baudRates = [2000000, 1500000, 921600, 500000, 460800, 230400, 153600, 128000, 115200];
8
9
  const bufferSize = 512;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tasmota-webserial-esptool",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "description": "World's first tool for flashing and reading ESP devices on Android mobile devices using WebUSB. Flash & Read ESP devices using WebSerial/WebUSB - up to 10x faster flash read than esptool.py",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -25,12 +25,12 @@ export {
25
25
 
26
26
  export const connect = async (logger: Logger) => {
27
27
  let port: SerialPort;
28
-
28
+
29
29
  // Check if a custom requestSerialPort function is available (e.g., from WebUSB wrapper)
30
30
  const customRequestPort = (
31
31
  globalThis as { requestSerialPort?: () => Promise<SerialPort> }
32
32
  ).requestSerialPort;
33
-
33
+
34
34
  if (typeof customRequestPort === "function") {
35
35
  // Use custom port request function (handles Android/WebUSB automatically)
36
36
  logger.log("Using custom port request function");
@@ -40,8 +40,8 @@ export const connect = async (logger: Logger) => {
40
40
  if (!navigator.serial) {
41
41
  throw new Error(
42
42
  "Web Serial API is not supported in this browser. " +
43
- "Please use Chrome 89+, Edge 89+, or Opera on desktop, or Chrome 61+ on Android with USB OTG. " +
44
- "Note: The page must be served over HTTPS or localhost."
43
+ "Please use Chrome 89+, Edge 89+, or Opera on desktop, or Chrome 61+ on Android with USB OTG. " +
44
+ "Note: The page must be served over HTTPS or localhost.",
45
45
  );
46
46
  }
47
47
  port = await navigator.serial.requestPort();