Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: communicate via serial port using WebUSB API #47

Open
askvictor opened this issue May 8, 2019 · 2 comments
Open

Feature request: communicate via serial port using WebUSB API #47

askvictor opened this issue May 8, 2019 · 2 comments

Comments

@askvictor
Copy link

It would be super useful to have the same place to access the device via a WebREPL if that has been set up, or directly via a serial port if it hasn't. The WebUSB API (https://developers.google.com/web/updates/2016/03/access-usb-devices-on-the-web) can be used for this; albeit it only has the single data channel unlike websockets where multiple data channels are possible.

Going even further, it would be nice to be able to flash the Micropython firmware onto a device directly from such a website.

One potential problem is that WebUSB requires an HTTPS connection, while the current WebREPL cannot have one.

@rikvermeer
Copy link

It will only work on devices having a second USB port for this, that you have to control. My micropython esp32 is instantly serving as a serial connection, nothing else.

@rafaelaroca
Copy link

I have implemented this feature in 2020 but only saw your message now. It has a pending pull request here:
#53

You can get it here:
https://github.com/rafaelaroca/webrepl

Anyway, if you can see it working on BIPES project at the console tab:
https://bipes.net.br/beta2/ui/

About directly flashing MicroPython from the web browser, we have this page fully functional!
https://bipes.net.br/flash/esp-web-tools/

Just go to the link, connect an ESP32 or ESP8266, click Install, wait, and you'll have MicroPython on the board!

regards
Rafael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants