Skip to content

Protocol error when trying to flash ESP32-C3 Mini (ESPTOOL-752) #924

@ma3oun

Description

@ma3oun

Operating System

Ubuntu 22.04 LTS

Esptool Version

4.5.1

Python Version

Python 3.9.13

Chip Description

ESP32-C3-MINI-1

Device Description

I'm using a custom board, using a design similar to this
The ESP32 connects to the PC directly by USB (IO18 and IO19)

Hardware Configuration

I'm using a USB-C port on the board to connect to USB 2.0 or 3.0 standard ports on my PC.
The ESP32 interacts with a INA3221 current sensor by I2C.

How is Esptool Run

Terminal (python esptool.py ...) and latest Arduino IDE (lolin C3 board selected)

Full Esptool Command Line that Was Run

python esptool.py -t --before usb_reset --chip esp32c3 write_flash --no-compress 0x00 ~/Arduino/BlinkWithoutDelay/build/esp32.esp32.lolin_c3_mini/BlinkWithoutDelay.ino.bin

Esptool Output

esptool.py v4.5.1
Found 1 serial ports
Serial port /dev/ttyACM0
Connecting...
/dev/ttyACM0 failed to connect: [Errno 71] Protocol error

A fatal error occurred: Could not connect to an Espressif device on any of the 1 available serial ports.

More Information

The PC seems to recognize the ESP32 when the USB cable is plugged in.
dmesg output:

[ 8006.453801] usb 1-1: new full-speed USB device number 15 using xhci_hcd
[ 8006.627939] usb 1-1: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.01
[ 8006.627951] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8006.627955] usb 1-1: Product: USB JTAG/serial debug unit
[ 8006.627958] usb 1-1: Manufacturer: Espressif
[ 8006.627961] usb 1-1: SerialNumber: 64:E8:33:E2:9F:5C
[ 8006.635779] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

Aduino IDE terminal output after selecting the "Lolin C3 mini board":

Traceback (most recent call last):
  File "/home/toto/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool.py", line 34, in <module>

    esptool._main()
  File "/home/toto/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/__init__.py", line 1032, in _main
    main()
  File "/home/toto/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/__init__.py", line 674, in main
    esp = esp or get_default_connected_device(
  File "/home/toto/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/__init__.py", line 921, in get_default_connected_device
    _esp.connect(before, connect_attempts)
  File "/home/toto/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/loader.py", line 640, in connect
    last_error = self._connect_attempt(reset_strategy, mode)
  File "/home/toto/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/loader.py", line 525, in _connect_attempt
    reset_strategy()  # Reset the chip to bootloader (download mode)
  File "/home/toto/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/reset.py", line 100, in __call__
    self._setRTS(False)
  File "/home/toto/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/reset.py", line 40, in _setRTS
    self.port.setRTS(state)
  File "/opt/tools/anaconda3/lib/python3.9/site-packages/serial/serialutil.py", line 600, in setRTS
    self.rts = value
  File "/opt/tools/anaconda3/lib/python3.9/site-packages/serial/serialutil.py", line 463, in rts
    self._update_rts_state()
  File "/opt/tools/anaconda3/lib/python3.9/site-packages/serial/serialposix.py", line 708, in _update_rts_state
    fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_RTS_str)
OSError: [Errno 71] Protocol error
Failed uploading: uploading error: exit status 1

Other Steps to Reproduce

No response

I Have Read the Troubleshooting Guide

  • I confirm I have read the troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions