BIN flashing Nano ESP32 problem

Hello i have no idea how to flash this board. I have bin files for bootloader, partition, firmware and web flasher cant connect to this boatrd. i pressed RST button twice nothing. What is the proper way to flash this board with bin files? when i try esptool.exe --chip esp32s3 --port COM11 --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m 0x0000 bootloader.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 firmware.bin i have
esptool.py v4.8.1

Serial port COM11

Connecting...

A serial exception error occurred: Cannot configure port, something went wrong. Original message: PermissionError(13, 'Device connected to pc doesnt work.', None, 31)

Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.

Please clarify whether you have a Nano ESP32 board or a generic ESP32 board

I have it from official store. It's official board.

Thank you. The reason that I asked is that there have been numerous posts here where the user has a generic ESP32 board

@kazzik to get the nano esp32 into bootloader mode you need to put a jumper between gnd and b1, press the reset then remove the jumper. The led on the board should go from green to purple (bootloader mode).

Before you goto the command line double check the port number it is possible that it can change.

On the command line I always use a baud of 115200 and I don't use any --before or --after instructions but I do erase flash before I start.

Is there a reason for not using arduino fimware?

thank you very much it worked!!!

1 Like

Hi @kazzik. In case you (or anyone with a similar question who finds this forum topic through their research) have an application where it is inconvenient to put the Nano ESP32 board into the ROM bootloader mode using a jumper as described by @sumguy, there is an alternative flashing method that doesn't require any action to put the board into a special mode. This uses a flashing tool named dfu-util (Arduino's fork of the tool is here) instead of esptool. This is how Arduino IDE uploads sketches to the Nano ESP32 board.

The equivalent command would look like this:

dfu-util --device 0x2341:0x0070 --download firmware.bin --final-detach

The Arduino core for the Nano ESP32 contains code that causes the sketch program to produce a DFU (device firmware upgrade) interface.

Even in cases where the sketch program does not produce a DFU interface, the DFU interface can be activated in preparation for flashing by performing a double reset, which causes the "nora_recovery" sketch program stored in the factory partition to run. However, if you overwrite the factory partition then this will no longer work and the only way to flash will be to activate the ROM bootloader (as described by @sumguy) and use esptool.