Unable to upload to NodeMCU-32S

I’ve been successfully uploading projects using Espressif32 (1.11.1) / Arduino on latest PlatformIO / VS Code… until last weekend. Now getting the following error messages whenever I try to upload. I have reloaded Espressif32 platform, tried small tests, confirmed USB/Serial driver is updated, but no improvement. Anyone have any suggestions?

Ray

DATA:    [          ]   4.5% (used 14700 bytes from 327680 bytes)
PROGRAM: [==        ]  16.0% (used 209819 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM3
Uploading .pio\build\esp32dev\firmware.bin
esptool.py v2.6
Serial port COM3
Connecting........_____.....
Traceback (most recent call last):
  File "C:\Users\RayB\.platformio\packages\tool-esptoolpy\esptool.py", line 2959, in <module>
    _main()
  File "C:\Users\RayB\.platformio\packages\tool-esptoolpy\esptool.py", line 2952, in _main   
    main()
  File "C:\Users\RayB\.platformio\packages\tool-esptoolpy\esptool.py", line 2653, in main    
    esp.connect(args.before)
  File "C:\Users\RayB\.platformio\packages\tool-esptoolpy\esptool.py", line 463, in connect  
    last_error = self._connect_attempt(mode=mode, esp32r0_delay=True)
  File "C:\Users\RayB\.platformio\packages\tool-esptoolpy\esptool.py", line 440, in _connect_attempt
    self.sync()
  File "C:\Users\RayB\.platformio\packages\tool-esptoolpy\esptool.py", line 379, in sync     
    timeout=SYNC_TIMEOUT)
  File "C:\Users\RayB\.platformio\packages\tool-esptoolpy\esptool.py", line 315, in command
    self._port.timeout = new_timeout
  File "c:\users\RayB\.platformio\penv\lib\site-packages\serial\serialutil.py", line 368, in 
timeout
    self._reconfigure_port()
  File "c:\users\RayB\.platformio\penv\lib\site-packages\serial\serialwin32.py", line 222, in _reconfigure_port
    'Original message: {!r}'.format(ctypes.WinError()))
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: WindowsError(31, 'A device attached to the system is not functioning.')
*** [upload] Error 1

Have you tried a lower upload speed, e.g.

upload_speed = 115200

in the platformio.ini?

Yes, tried as low as 9600 but not successfully. Any other thoughts?

Swap the USB cable and try another USB port…

1 Like

@manuelbl, THANK YOU!!! I only have a single USB port, but inlined a hub and that fixed it. Then removed hub and it works again without the hub.