How to flash ESP32 or ESP8266 from your Browser

How to flash ESP32 or ESP8266 from your Browser

Stefan's photo
Stefan
ยทJul 11, 2022ยท

3 min read

Subscribe to our newsletter and never miss any upcoming articles

Play this article

Table of contents

  • ESP Web Tool
  • Not sure which port to connect to?
  • Browser Compatibility
  • Alternatives
  • Connection failed?

Did you know you can flash .bin files onto ESP32 and ESP8266 boards using your web browser? I made a simple web app to simplify the process. Here's how it works.

ESP Web Tool

ESPWebTool Homepage

  1. Open esp.huhn.me
  2. Click Connect and select the serial port of your ESP board
  3. Upload your .bin file(s)
  4. Click Program

I made it as simple as possible, and it works with any project, including my ESP8266 Deauther. The default upload speed is set to 115200 baud, but you can adjust the settings on the home page to increase the upload speed.

This makes recreating projects so much more accessible. Instead of fighting with Arduino IDE, esptool, or other software, all you need is a compatible browser (which you probably already have)!

Not sure which port to connect to?

Easy! Click connect on the website and then plug in your board. Whatever port pops up in the list is what you're looking for.

You might want to check the cable and USB port if no port pops up. Or maybe you're missing the drivers for your device:

๐Ÿ”— CH340/CH341 Drivers: http://www.wch-ic.com/downloads/CH341SER_ZIP.html
๐Ÿ”— CP210x Drivers: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
๐Ÿ”— FTDI Drivers: https://ftdichip.com/drivers/

Browser Compatibility

Web Serial browser compatibility chart

Compatibility is the biggest problem with the web serial terminal right now. At the time of writing this, only Chrome, Edge, and Opera support the Web Serial API needed to make this work.

This makes me sad as a long-time Firefox user, but I'm not the only one. There's a lot of ongoing discussion about this in the Mozilla Community.

Phone or Tablet users are also out of luck for now. Only desktop browsers are supported at the moment. I hope it's just a matter of time until more browsers add support for the Web Serial API.

Alternatives

Of course, my tool isn't the only one that can do this. In fact, it's based on the wonderful esp-web-flasher. But the idea to make a tool like this was inspired by esptool-js.

So if you don't like my implementation, you can try these solutions, too. Like the projects above, mine is also open source: github.com/spacehuhntech/espwebtool

And if you're looking for non-web-based solutions to flash .bin files:

Connection failed?

Make sure to set the baud rate to 115200 in the settings. Higher baud rates allow faster upload speeds, but they can also introduce connection issues.

If that doesn't help, check out this blog post about common ESP8266 and ESP32 errors: https://blog.spacehuhn.com/espcomm/

And if you run into other issues, try using a different flashing tool/method. This will at least tell you if it's an issue with esp.huhn.me or with something else. Finally, in case you do find a bug, please leave a comment down below.

ย 
Share this