title: ESP32 Cam: A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
body: <p>I have an ESP32-Cam AIThinker and everytime I try to upload (File &gt; Examples &gt; ESP32 &gt; Camera), I always get this error everytime: <br><code>A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header.</code></p>
  <p>I've been following YouTube tutorials but none just seem to work for me :(</p>
  <p><a href="https://i.stack.imgur.com/caehd.png" rel="nofollow noreferrer">Here are my upload settings.</a> At the time of writing, I am using Arduino IDE 1.8.15 and esp32 board version 1.0.6.<br>
  <strong>I have tried:</strong><br></p>
  <ul>
  <li><p>Using FTDI232 to upload <br>
  <a href="https://i.stack.imgur.com/NHNSY.png" rel="nofollow noreferrer">Pinout Diagram</a></p>
  </li>
  <li><p>Using Arduino to upload <br>
  <a href="https://i.stack.imgur.com/KBZcF.png" rel="nofollow noreferrer">Pinout Diagram</a></p>
  </li>
  <li><p>Using ESP32-CAM-MB that came with the ESP32-Cam I bought.</p>
  </li>
  <li><p>Pressing the RST button while and before uploading (also waiting for the &quot;connection&quot; text to appear then pressing RST).</p>
  </li>
  <li><p>Switching between 3.3v and 5v, still the same error.</p>
  </li>
  <li><p>Switching between QIO and DIO flash mode.</p>
  </li>
  <li><p>Swapping RX and TX.</p>
  </li>
  </ul>
  <p>Though I didn't get any errors uploading using the ESP32-CAM-MB, I was stuck on <a href="https://i.stack.imgur.com/fhXrA.png" rel="nofollow noreferrer">this</a> and it wouldn't show me IP to where I can access the camera.</p>
  <p>I am new to this so please take it easy :)</p>