logo elektroda
logo elektroda
X
logo elektroda

[Solved] Failed to connect to ESP32: Timed out waiting for packet header”

wosiekpl 3867 17
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18296532
    wosiekpl
    Level 21  
    Hello

    I am trying to program two ESP 32 modules and during the upload when it finishes the write process I get this error :
    Failed to connect to ESP32: Timed out waiting for packet header”


    On YouTube and websites I found a description of how this problem can be solved. I soldered a 10 uF capacitor between pin E and GND but nothing helped. The Arduino I am using i.e. the software is version 1.8 and Win 7. The drivers are correctly uploaded.
    The modules I am trying to program are these :

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

    Added after 1 [hour] 24 [minutes]: .

    I only now noticed , that I should move this topic to another section. Therefore, I ask the admin to close here and move it to the section ESP 8266 and ESP 32 because there it seems to me it should be posted

    I am watching on YouTube how the program is uploaded to the module with the capacitor. And as far as I can see , after connecting , the red led lights up ( before uploading ) and the blue led flashes. In my case, only the red is lit.
  • ADVERTISEMENT
  • #2 18296889
    khoam
    Level 42  
    wosiekpl wrote:
    I soldered a 10 uF capacitor between the E and GND pin
    .
    Completely unnecessary.

    What code upload speed do you have set in the Arduino IDE?
  • #3 18296905
    wosiekpl
    Level 21  
    Hello

    This is what it looks like:
    Failed to connect to ESP32: Timed out waiting for packet header” .
    Failed to connect to ESP32: Timed out waiting for packet header” .

    Now I upload to the module , which is on the left in the photo

    The program is Wifi scan

    Interestingly , it used to be to the module , the one on the right , I uploaded the program to Blynk to switch the relays and it worked. Now I try to upload it again and get an error
  • ADVERTISEMENT
  • #4 18296915
    khoam
    Level 42  
    Reduce the speed to 115,200 and check.
  • #5 18296917
    wosiekpl
    Level 21  
    just changed and uploading

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

    Still error

    Maybe the module you have selected is unsuitable


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



    Failed to connect to ESP32: Timed out waiting for packet header” .
  • #6 18296934
    khoam
    Level 42  
    Now there is a different and slightly different problem ( Invalid head of packet ). I would replace the USB cable to start with, just in case. When loading the code into the second module (the one on the right, that's the ESP8266), does it also get this error?

    Added after 2 [minutes]: .

    The USB port on the comp is configured for 9600 ?! I don't use windows so I don't know if it matters.
  • ADVERTISEMENT
  • #7 18296948
    wosiekpl
    Level 21  
    It was on 9600 and now I have changed it to 115200 . After the change it does not work , the other module also. Now I change the cable

    I have changed both the cable and the port and still nothing, the same error keeps popping up
  • #8 18296971
    khoam
    Level 42  
    wosiekpl wrote:
    the same error keeps popping up
    .
    So which of the two that were already occurring?
  • #9 18296989
    wosiekpl
    Level 21  
    Now this is how it looks like , The module on the left side , I marked it with number 1
    Failed to connect to ESP32: Timed out waiting for packet header”

    In the manager I had a mouse driver error , it was displayed twice , one OK and the other with an error and I deleted it

    Now it looks like this
    Failed to connect to ESP32: Timed out waiting for packet header”


    Module 1 is working , this is how the reading from the port looks like

    Failed to connect to ESP32: Timed out waiting for packet header”
  • #10 18296992
    khoam
    Level 42  
    From the first image, it appears that the code loaded correctly.
  • #11 18296997
    wosiekpl
    Level 21  
    This is what it looks like now that modulus number 2 is connected

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

    It detects it as a mouse

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

    This is how it is after uploading to module number 2. I have not changed the module type in the tools , it is still saved as ESP32 Dev Module

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

    After connecting this module , there is a blue Led on the top right . The second led , also blue , next to the usb connector lights up but very weakly . After compilation during uploading both LEDs turn off.
  • #12 18297003
    khoam
    Level 42  
    It looks like there is no proper USB driver installed for this second board. The images that are in the first post are too vague to see what USB-UART bridges are sitting there.
  • #13 18297022
    wosiekpl
    Level 21  
    Both have the same CP2102 chip, now when I buy I will choose another, the CH340

    After connecting , in the manager after updating it shows that the driver is installed. Now I will do the same in Arduino, looking for a library

    Failed to connect to ESP32: Timed out waiting for packet header” .
  • #14 18297024
    khoam
    Level 42  
    wosiekpl wrote:
    This is after uploading to module num 2. I have not changed the module type in the tools , it is still saved as ESP32 Dev Module
    .
    Is this module number 2 also an ESP32? Because if it's an ESP8266, then you need to choose a different board.
  • ADVERTISEMENT
  • #15 18297045
    wosiekpl
    Level 21  
    Yes , you are right
    I have a library Failed to connect to ESP32: Timed out waiting for packet header” for ESP32

    But there is no one for ESP8266

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


    Only that during the update after connecting it does not detect the ESP8266 module
  • #17 18297057
    wosiekpl
    Level 21  
    The libraries seem to be there but are not installed, only Blynk seems to have them

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

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

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

    Now I will try to install

    Added after 22 [minutes]:

    This is what it looks like after installing the library

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


    And this is how it looks after compilation , an error message pops up

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


    And here after uploading the example skech as it is in the Arduino program and it works. So in the earlier one something is not set right

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

    I am now going to upload my program to Blynk to control the relays. This program has worked correctly before

    Added after 4 [hours]:

    After struggling with the program for a few hours, I finally managed to connect to both one and the other module.
    Thank you for your help
  • #18 18297172
    wosiekpl
    Level 21  
    The libraries seem to be there but are not installed, only Blynk seems to have them

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

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

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

    Now I will try to install

    Added after 22 [minutes]:

    This is what it looks like after installing the library

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


    And this is what it looks like after compilation , an error message pops up

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


    And here after uploading the example skech as it is in the Arduino program and it works. So in the earlier one something is not set right

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

    I am now going to upload my program to Blynk to control the relays. This program has worked correctly before

    Added after 4 [hours]:

    After struggling with the program for a few hours, finally managed to connect to both one and the other module.
    Thank you for your help

    Added after 1 [minute]:

    After correctly installing the libraries and selecting the module appropriately ( each is different ), it was possible to connect and program both.

Topic summary

The discussion revolves around troubleshooting the error "Failed to connect to ESP32: Timed out waiting for packet header" encountered while programming ESP32 modules using Arduino IDE on Windows 7. The user attempted various solutions, including soldering a capacitor and adjusting the upload speed in the Arduino IDE. Despite changing the speed to 115200 and replacing USB cables, the error persisted. The conversation highlights the importance of ensuring the correct USB driver is installed, as well as verifying the selected module type in the Arduino IDE. The user also faced issues with an ESP8266 module, leading to discussions about the need for appropriate libraries and board manager installations for both ESP32 and ESP8266. Ultimately, the user managed to upload a program successfully after resolving library installation issues.
Summary generated by the language model.
ADVERTISEMENT