Search code examples
esp32micropython

First time using ESP 32 and Micro Python


I am trying to program ESP-Wroom-32 (for a University project). I watched tutorials on YouTube and read on websites on how do that. I installed the USB to UART driver from here and the Micro Python from here. After Installing the driver i connected the board to my PC and at Ports USB to UART.... COM3 appeared. Later I installed esp tool with:

pip install esptool

then tried to erase the flash with:

python -m esptool --port COM3 erase_flash

After running the erase_flash command I got "A fatal error occurred: Could not open COM3, the port doesn't exist"

To make sure that I am not wrong with the COM3 part I unplugged and plugged to see which port appears and disappears. It was COM3. But still the same fatal error. After searching in the internet found anything helpful most of the "Could not open COM3" errors were for an IDE. I Used command prompt for installing esptool and erasing the flash. Found something on the Internet saying that It could be a Windows problem not a faulty driver or ESP32 error. Has anyone experienced the same problem? What could be the problem? How can I fix this? Thanks in advance :) .

I am using Windows 10 Education.

Note:

I have to use USB 3.0 because the Device Manager doesn't recognize the USB to UART on USB 2.0 . Not always I can see the USB to UART in Device Manager when plugged in USB 3.0 (it's like 50/50 chance). Ports In Device Manager

Device manager not recognizing the Chip

EDIT The ESP32 board was faulty. It wasn't the cable or the drivers.


Solution

  • The problem was with my drivers/windows (on my PC). I guess there are some restrictions with the newer updates for Windows 10. My laptop has Windows 10 (but the older version + the Windows license has ended) and it works. Device manager recognizes the UART and everything.