Installing MicroPython on ESP32

Hii!!

I have a new Nano ESP32, and I'm trying to install MicroPython via the installation executable. The utility seems to locate my board okay, but whenever I click the Install button, I get the following error messages:

Error running dfu-util: 'Command failed: "C:\Users\MsReb\AppData\Local\MicroPythonInstaller\app-1.2.1\resources\app\node_modules\firmware-flash\bin\win32\ia32\dfu-util.exe" -a 0 -d 0x2341:0x0070 -D "C:\Users\MsReb\AppData\Local\Temp\ARDUINO_NANO_ESP32-20230914-unstable-v1.20.0-475-g174bb28d8.app-bin" -Q

Any idea what to do with this? I'd appreciate any input. Thanks!!

1 Like

Hi @rebeccajoy !
May I ask, have you uploaded successfully any Arduino sketch before that? Please try to upload a blink sketch via Arduino IDE and let me know if that works. Thing is, behind the scenes it uses the same tools to flash the firmware.
In any case, could you please install the latest version of the tool and launch it from the command line ( PowerShell) using:
micropython-installer.exe | echo
and provide the full log output? More information on that here: GitHub - arduino/lab-micropython-installer
Thanks!

Hi, @sbhklr.

I am having the exact same issue with my new Nano ESP32: when running the MicroPython Installer, I also get an error message similar as the one above (Error running dfu-util) - except the paths are different. I get the same error message regardless if I open the MicroPython Installer from Windows Explorer or from PowerShell, running as administrator or not.

Following your suggestion, I tried to load the Blink sketch into the Nano ESP32 using the Arduino IDE 2.2.1: it also fails with the following error message:

Cannot open DFU device 2341:0070 found on devnum 6 (LIBUSB_ERROR_NOT_FOUND)
No DFU capable USB device available
Failed uploading: uploading error: exit status 74

Finally, the output of micropython-installer.exe | echo is:

> .\micropython-installer.exe | echo

feedURL https://update.electronjs.org/arduino/lab-micropython-installer/win32-x64/1.2.1
requestHeaders { 'User-Agent': 'update-electron-app/2.0.1 (win32: x64)' }
checking-for-update
update-not-available
🔍 Finding latest firmware for board 'ARDUINO_NANO_ESP32' ...
🔗 Firmware URL: https://downloads.arduino.cc/micropython/ARDUINO_NANO_ESP32-20231005-v1.21.0.app-bin
🌐 Downloading firmware ...
👀 Device found: Nano ESP32 at COM13
👍 Device is already in bootloader mode.
🔥 Flashing firmware 'ARDUINO_NANO_ESP32-20231005-v1.21.0.app-bin' ...
Command failed: "C:\Users\nasf\AppData\Local\MicroPythonInstaller\app-1.2.1\resources\app\node_modules\firmware-flash\bin\win32\ia32\dfu-util.exe" -a 0 -d 0x2341:0x0070 -D "C:\Users\nasf\AppData\Local\Temp\ARDUINO_NANO_ESP32-20231005-v1.21.0.app-bin" -Q
Cannot open DFU device 2341:0070 found on devnum 6 (LIBUSB_ERROR_NOT_FOUND)
No DFU capable USB device available

Error running dfu-util: 'Command failed: "C:\Users\nasf\AppData\Local\MicroPythonInstaller\app-1.2.1\resources\app\node_modules\firmware-flash\bin\win32\ia32\dfu-util.exe" -a 0 -d 0x2341:0x0070 -D "C:\Users\nasf\AppData\Local\Temp\ARDUINO_NANO_ESP32-20231005-v1.21.0.app-bin" -Q
Cannot open DFU device 2341:0070 found on devnum 6 (LIBUSB_ERROR_NOT_FOUND)
No DFU capable USB device available
'

Additional info:
I am running Windows 10 Enterprise on an HP Elitebook (Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz 1.80 GHz, 8,00 GB). Arduino IDE 2.2.1 works fine in this computer with all my other Arduino boards, including the new Arduino Uno R4 WiFi.

Any idea on how to fix this?
Thanks!

UPDATE:

Using the Arduino IDE 2, I installed the board Arduino Nano ESP32 (I should have done that before :roll_eyes:). During this installation, the missing driver is installed. After that, I was able to install MicroPython using the MicroPython Installer and run Python code using the Arduino Lab for MicroPython.

Problem solved!

1 Like

Ooh, yes, the "Arduino ESP32 boards" package includes the Windows drivers that are useful to talk to the device.
Thanks for letting us know :+1: and happy hacking!

1 Like

Hi @felipenmartins

I'm happy to hear that you were able to solve it. The thing about drivers on Windows is mentioned in the readme (GitHub - arduino/lab-micropython-installer) but I understand that it's very easy to overlook. Bundling the drivers in the tool would make the maintenance much more complex so we decided not to do that. Maybe on Windows the tool could display a warning. I'll think about it :slight_smile:

2 Likes

That would be interesting.
Thanks! :slight_smile: