espressif / esptool-js

Javascript implementation of flasher tool for Espressif chips, running in web browser using WebSerial.
https://espressif.github.io/esptool-js/
Apache License 2.0
251 stars 101 forks source link

Make esptool-js available on Android device. #109

Closed liux-pro closed 1 month ago

liux-pro commented 10 months ago

The website https://caniuse.com/?search=webusb indicates that Web USB is available on Android devices. However, it's noted that Web Serial is currently not available on Android, as shown on https://caniuse.com/?search=serial.

To address this limitation, the project at https://github.com/google/web-serial-polyfill has developed a polyfill that enables Web Serial functionality alongside Web USB. This enhancement allows Android devices to access Web Serial capabilities.

I conducted a test by opening the following demonstration on my Android phone: https://googlechromelabs.github.io/serial-terminal/?polyfill. During the test, I successfully connected an ESP32s3 device to my Android phone. This resulted in the display of booting logs from the ESP32 on my Google Chrome browser on Android.

Considering this, I am curious whether the esptool-js project will consider making their tool available for use on Android devices. This expansion could further contribute to the accessibility and functionality of the tool.

TD-er commented 10 months ago

Just curious, how did you power the ESP device? I don't think powering it of the USB from your phone is a good idea.

liux-pro commented 10 months ago

Just curious, how did you power the ESP device? I don't think powering it of the USB from your phone is a good idea.

I have directly connected an ESP32 development board to my phone, and I personally believe that it should work well. The power consumption of the ESP32 is approximately 250mA. Modern smartphones typically support OTG (On-The-Go) functionality, which should allow them to output at least 500mA of current, in accordance with USB specifications.

brianignacio5 commented 8 months ago

If web serial is supported I believe esptool-js should be as well since it is basically code above the web serial code.