PlatformIO Community

Lolin D32: cannot connect

Hello,

I received a Wemos Lolin D32 ESP32 board. I installed the CH340 USB to Serial driver, my device appears in the device manager as PID1A86 VID7523

Knipsel

My platformio.ini file seems to be correct:
[env:lolin_d32]
platform = espressif32
board = lolin_d32
framework = arduino

Yet, building fails, as it looks for another device:
“Error: unable to open ftdi device with vid 0403, pid 6010, description ‘’, serial '’ at bus location ‘*’”

What is wrong? How can I solve this please?
I would really be gratefull is someone could help me out!

PS I tried with 3 usb cables, including the one of my Jabra headset
PS I have similar issues with the Arduino IDE…

o_O Did you press the Debug or Upload using Programmer button instead of Upload? Can you show a screenshot of what you’re pressing?

It seems to me that it attempts to invoke the openocd debug server and starts searching for the FTDI JTAG debugging chip – which your board doesn’t have, so it will never find one. You can upload via the serial device (COM3 in your case), but not debug it. (For that an external debugger as listed in the documentation would be needed).

Max,

Thank you very much. Indeed, I was going for debugging; However, a regular upload gives me still issues, actually exactly the same one as I was having in the Arduino IDE:

“Connecting……_____
A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (0x08)”

I reinstalled the CH340 driver, even tried with a second board (exactly the same)

Any ideas?

Thanks
Philip

The CH340 chip is notoriously bad at high upload speeds. To help, you should try two things:

  1. Manually put the ESP32 in bootloader mode before uploading. That is done by powering the board, connecting a wire between IO0 (labeled 0) and GND on the board (ref) and pressing the reboot button once, then removing the cable again. Then press the Upload button in the IDE.
  2. Or, attempt a upload at a lower speed by adding the line upload_speed = 115200 in the platformio.ini (docs)