I am trying to upload a sketch on a brand new Arduino Nano ESP32 board. The first time I try to upload some sketch, the upload works, but from the second time on I get the following error:
Traceback (most recent call last):
File "/home/ciccio/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool.py", line 34, in <module>
esptool._main()
File "/home/ciccio/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/__init__.py", line 1032, in _main
main()
File "/home/ciccio/.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/ciccio/.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/ciccio/.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/ciccio/.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/ciccio/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/reset.py", line 83, in __call__
self._setDTRandRTS(False, False)
File "/home/ciccio/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool/reset.py", line 58, in _setDTRandRTS
fcntl.ioctl(self.port.fileno(), TIOCMSET, struct.pack("I", status))
OSError: [Errno 71] Protocol error
Failed chip erase: uploading error: exit status 1
Some things to take into account:
- The code is uploaded using Programmer (CTRL+Shift+U), as uploading it normally resulted in the
dfu-util: Failed to retrieve language identifiers dfu-util: Cannot set alternate interface: LIBUSB_ERROR_OTHER Failed uploading: uploading error: exit status 74error; - This happens with brand-new boards, as well as with boards I've already been using for a long time before and didn't give me this error with any of the sketched I've tried uploading;
- This happens with both different USB cables and different USB ports;
How could this problem be addressed? Any help in solving it will be appreciated!!
Thanks in advance ![]()
Francesco
