-1
\$\begingroup\$

I borrowed an ESP32 DevKitC from a neighbour. It doesn't show up as an external drive when connected (using a decent USB data cable) to either my Windows 10 laptop or my Ubuntu 20.04 laptop. Is that normal?

I'm interested in using an ESP32 for a project instead of an ItsyBitsy M4, but it's a non-starter if drivers need to be installed before it'll show up as a USB drive.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ It most likely will not show up like an external HDD or a mouse. Which IDE are you using? Have you checked Windows Device Manager to see it it's listed or something like USB Device Tree Viewer? \$\endgroup\$
    – raaymaan
    Jan 31, 2023 at 10:30
  • \$\begingroup\$ @raaymaan, I must admit, I didn't look there. The project is a consumer electronics thing which needs to support firmware updates over USB, so plug and play is essential. \$\endgroup\$ Jan 31, 2023 at 10:36

2 Answers 2

2
\$\begingroup\$

ESP32 DevKit and clones have a USB-Serial chip (usually PL2302). That will pop up as a serial port and there is no way to make it into a mass storage device.

Bare ESP32 module doesn't have this chip, so in order to program it you must use a serial adapter.

ESP32-S2/S3 have USB so you may program these chips to act as a mass storage device. Note S3 uses a Risc-V core instead of Extensa: some libraries will require porting.

However, the elephant in the room is why would you want to program it with USB? I can't think of a reason. If it's bricked because a buggy firmware was uploaded, you'll have to use serial anyway to reflash it. And if it's not bricked, it has WiFi, which is the main reason to use ESP32.

ESP32 is used in tons of smart objects like lightbulbs, plugs, etc. It would be very inconvenient to have to connect these with USB to a computer in order to update the firmware. I mean imagine going through the house with a ladder, a laptop and a USB cable to update the firmware of all these gadgets, not to mention pulling out the dishwasher to get to that smart socket behind it!

I'll use Tasmota as an example of how it works:

  • Power the device
  • It creates its own WiFi network, to which you can connect with your phone. It presents a web interface where you can enter your home WiFi credentials.
  • It then connects to your home WiFi and serves a web interface through which you can control it and update the firmware.

Firmware update is usually done automatically as ESP32 fetches it from a web server somewhere on the internet. Manual update can also done via the web interface by giving it a URL that it then fetches, or HTTP upload. If you don't use the web interface, there's also ArduinoOTA via Arduino IDE.

Most of these "smart objects" don't have any accessible serial port, so they must keep a spare known-good copy of the firmware next to the version that was just uploaded. So if the new firmware fails at WiFi and bricks the device, pressing the button will force it to reboot using the firmware that works, and then new firmware can be uploaded.

\$\endgroup\$
2
\$\begingroup\$

As far as I know, the ESP32 will not show up as a USB drive at all.

The documentation for the ESP32 DevKitC says that the USB connector goes to a USB to serial converter on the ESP32. It will only show up as a serial port on your computer.

USB-to-UART Bridge - Single USB-UART bridge chip provides transfer rates of up to 3 Mbps.

Micro USB Port - USB interface. Power supply for the board as well as the communication interface between a computer and the ESP32-WROOM-32 module.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.