# Programming ESP 01- Failed to connect to ESP8266

**URL:** <https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723>\
**Category:** Programming\
**Created:** [August 6, 2022, 5:52am UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723 "2022-08-06T05:52:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![12king](https://avatars.discourse-cdn.com/v4/letter/1/e9a140/32.png) [@12king](https://forum.arduino.cc/u/12king)\
**Post date:** [August 6, 2022, 5:52am UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/1 "2022-08-06T05:52:52Z")

</div>

How do you solve a esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header ?

board set up : generic esp8266 module , com port : 3

Connections for programming

[https://create.arduino.cc/projecthub/pratikdesai/how-to-program-esp8266-esp-01-module-with-arduino-uno-598166](https://create.arduino.cc/projecthub/pratikdesai/how-to-program-esp8266-esp-01-module-with-arduino-uno-598166)

_ **ESP8266:-------------- \>Arduino:** _

_GND -------------------------- GND_

GPIO-2 -------------------------- Not connected (open)

GPIO-0 -------------------------- GND

RXD -------------------------- RX

TXD -------------------------- TX

CHPD ------------------------ 3.3V

RST -------------------------- Not connected (open)

VCC -------------------------- 3.3V

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/7/d/9/7d9c057c0194f2f3092fbf58b0b0741cbc5bc612.jpeg)

When I upload sketch

```cpp
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header

```

I found another way the ESP01 can be program via Arduino IoT cloud

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/b/2/3/b236549b3b7c579c97b9263990feea9f2cc41c7f.png)

I don't get option to upload sketch

---

<div class="post-metadata">

**Author:** ![BitSeeker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bitseeker/32/1241632_2.png) [@BitSeeker](https://forum.arduino.cc/u/BitSeeker)\
**Post date:** [August 6, 2022, 7:02am UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/2 "2022-08-06T07:02:32Z")

</div>

> [@12king](#):
>
> RXD -------------------------- RX
> 
> TXD -------------------------- TX

Connections should be:

RXD ------\> TX  
TXD ------\> RX

THIS IS INCORRECT. SEE POST BELOW BY 6v6gt.

---

<div class="post-metadata">

**Author:** ![6v6gt](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/6v6gt/32/225488_2.png) [@6v6gt](https://forum.arduino.cc/u/6v6gt)\
**Post date:** [August 6, 2022, 7:23am UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/3 "2022-08-06T07:23:56Z")

</div>

> [@BitSeeker](#):
>
> Connections should be :
> 
> RXD ------\> TX  
> TXD ------\> RX

Normally yes, but not in this special case when you are using the Uno as a USB/UART adapter.  
The labelling (TX/RX) on the Uno refers to its ATmega328P chip not to its ATmega16U2 (USB) chip which is the one that is used here.

---

<div class="post-metadata">

**Author:** ![Deva\_Rishi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/deva_rishi/32/227254_2.png) [@Deva\_Rishi](https://forum.arduino.cc/u/Deva_Rishi)\
**Post date:** [August 6, 2022, 8:39am UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/4 "2022-08-06T08:39:45Z")

</div>

Where are you getting the 3.3v ?  
Sticking stripped wires into the female headers is not very reliable,  
I usually load an empty sketch onto the UNO rather than connecting Reset to GND.  
**The voltage divider on the ESP's RX pin is missing !!** You are likely to damage the unit.  
ESP's are not 5v tolerant. UNORX -\> 1K -\> ESPRX -\>1K -\> 1K -\> GND will be safer.

---

<div class="post-metadata">

**Author:** ![12king](https://avatars.discourse-cdn.com/v4/letter/1/e9a140/32.png) [@12king](https://forum.arduino.cc/u/12king)\
**Post date:** [August 6, 2022, 8:51am UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/5 "2022-08-06T08:51:41Z")

</div>

> [@Deva\_Rishi](#):
>
> Where are you getting the 3.3v ?

I am getting 5 volts from USB and taking 3.3 volts from Arduino.

---

<div class="post-metadata">

**Author:** ![12king](https://avatars.discourse-cdn.com/v4/letter/1/e9a140/32.png) [@12king](https://forum.arduino.cc/u/12king)\
**Post date:** [August 6, 2022, 8:53am UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/6 "2022-08-06T08:53:10Z")

</div>

> [@BitSeeker](#):
>
> Connections should be:
> 
> RXD ------\> TX  
> TXD ------\> RX

This description is not given in the link and I was following the link

---

<div class="post-metadata">

**Author:** ![Deva\_Rishi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/deva_rishi/32/227254_2.png) [@Deva\_Rishi](https://forum.arduino.cc/u/Deva_Rishi)\
**Post date:** [August 6, 2022, 9:59am UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/7 "2022-08-06T09:59:55Z")

</div>

> [@12king](#):
>
> I am getting 5 volts from USB and taking 3.3 volts from Arduino.

Not on the picture you are. Anyway add the voltage divider, you may have already damaged the ESP.

> [@12king](#):
>
> This description is not given in the link and I was following the link

The link is correct.  
[Check also this one](https://acoptex.com/project/290/basics-project-021a-how-to-upload-sketch-esp8266-esp-01-wi-fi-module-at-acoptexcom/)  
Have you selected the correct port ?

---

<div class="post-metadata">

**Author:** ![12king](https://avatars.discourse-cdn.com/v4/letter/1/e9a140/32.png) [@12king](https://forum.arduino.cc/u/12king)\
**Post date:** [August 6, 2022, 10:13am UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/8 "2022-08-06T10:13:37Z")

</div>

> [@Deva\_Rishi](#):
>
> Not on the picture you are. Anyway add the voltage divider, you may have already damaged the ESP

My esp01 is still fine and it is working once the sketch was uploaded in it

What is shown in the picture is not the original connection.

This is my original connection which i have done on bread board. It will be difficult to identify the connection in the picture so I am not posting the picture.

_ **ESP8266:-------------- \>Arduino:** _

_GND -------------------------- GND_

GPIO-2 -------------------------- Not connected (open)

GPIO-0 -------------------------- GND

RXD -------------------------- RX

TXD -------------------------- TX

CHPD ------------------------ 3.3V

RST -------------------------- Not connected (open)

---

<div class="post-metadata">

**Author:** ![Deva\_Rishi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/deva_rishi/32/227254_2.png) [@Deva\_Rishi](https://forum.arduino.cc/u/Deva_Rishi)\
**Post date:** [August 6, 2022, 12:33pm UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/9 "2022-08-06T12:33:52Z")

</div>

> [@12king](#):
>
> My esp01 is still fine and it is working once the sketch was uploaded in it

That is good to hear. Still you should add the voltage divider. The GPIO pins on an ESP are not 5v tolerant. That it hasn't broken so far doesn't mean it won't later. (in fact chances are it will break at some point)

---

<div class="post-metadata">

**Author:** ![BitSeeker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bitseeker/32/1241632_2.png) [@BitSeeker](https://forum.arduino.cc/u/BitSeeker)\
**Post date:** [August 6, 2022, 1:58pm UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/10 "2022-08-06T13:58:01Z")

</div>

> [@6v6gt](#):
>
> > [@BitSeeker](#):
> >
> > Connections should be :
> > 
> > RXD ------\> TX  
> > TXD ------\> RX
> 
> Normally yes, but not in this special case when you are using the Uno as a USB/UART adapter.  
> The labelling (TX/RX) on the Uno refers to its ATmega328P chip not to its ATmega16U2 (USB) chip which is the one that is used here.

Oops! yes, absolutely correct. My bad.

---

<div class="post-metadata">

**Author:** ![12king](https://avatars.discourse-cdn.com/v4/letter/1/e9a140/32.png) [@12king](https://forum.arduino.cc/u/12king)\
**Post date:** [August 7, 2022, 2:26pm UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/11 "2022-08-07T14:26:01Z")

</div>

I found another way the ESP01 can be program via Arduino IoT cloud. I have tried it but I am not getting the option to upload the sketch you can see the screenshot in post one.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [February 3, 2023, 2:26pm UTC](https://forum.arduino.cc/t/programming-esp-01-failed-to-connect-to-esp8266/1019723/12 "2023-02-03T14:26:09Z")

</div>

Closed on February 3, 2023, 2:26pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
