Timed out waiting for packet header: Failed to connect to ESP32

I have a problem with writing software to a IoTaap Magnolia board. Output of Visual Studio Code is:
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header.
My settings for COM Port :

When I am trying to upload using Platformio IO, I am facing this error:

What have I tried for resolving error:

  • holding reset while trying to upload software
  • trying to upload firmware.bin(created by VS Code) using esptool.py script (same result)

What should I do ?


I have suceed in writing software to IoTaaP Magnolia board with this steps:

  1. Set POWER switch to OFF.
  2. Start uploading software. When is uploading in step connecting, wait 2 seconds and then set
    POWER switch to ON .

Important: This is just one solution I have found, but it’s important to know that this will not suceed every time.

Best regards,

Hi Stjepan,
This issue can happen if there is no enough power on the USB port or if there is some component connected to the special pin(s) on the board (check this: https://docs.iotaap.io/docs-tutorials/iotaap-pins/ ) which causes device boot to fail.

Also, you can remove upload_port definition from line 15, because PlatformIO will automatically detect the port that you are using (port definition is needed only if you are developing on two or more boards at the same time).

1 Like

Hello Ivan,

Thank you very much for your solution.
Now I have plugged my cable directly to motherboard to USB3.0 port and it works great.

Best regards,

Stjepan škrnjug