Programming ESP32: how its done and issues that might occur [solved]

  Переглядів 35,185

MoThunderz

MoThunderz

3 роки тому

In this video I show how to program an ESP32 (ESP32-WROOM-32D) with the Arduino IDE and discuss the following three errors that can occur:
NOTE: please make sure you restart the Arduino IDE after board installation.
NOTE2: make sure that the com port of the ESP32 shows up in the windows device manager. In some cases you might need to install these drivers:
www.silabs.com/developers/usb...
Error 1:
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
* Solution: press "Boot" for at least one second when programming in the connection phase
Error 2:
A fatal error occurred: Timed out waiting for packet content
* Solution: replace USB cable
Error 3:
USB device not recognized: The last USB device you connected to this computer malfunctioned, and Windows does not recognize it
* Solution: replace USB cable

КОМЕНТАРІ: 82
@vladimirastrelin1719
@vladimirastrelin1719 3 місяці тому
Thanks a lot for your advice ! It's really helpful !
@codeworId
@codeworId 2 роки тому
Thank you so much brother i m trying to search the solution of this problem since 4 days bt now it fixed thank you so much🥳🥳
@mothunderz
@mothunderz 2 роки тому
Glad to hear that it worked out for you !!
@KnightBear123
@KnightBear123 Рік тому
Addition : if you don't want to press the boot button when uploading you can use capasitor elcho 1uf 16v/10uf 16v and connect to ground and en
@mothunderz
@mothunderz Рік тому
Yes, this is a valid point. Thank you for contributing this.
@dominichawkins7997
@dominichawkins7997 2 роки тому
BOOM! Finally! Thanks loads! press boot x2 after compiling ':]
@mothunderz
@mothunderz 2 роки тому
Glad it helped!
@1queijocas
@1queijocas Рік тому
I think the reason why you need to have the right USB cable is that it must transfer data as well as power. Many USB cables are power only
@mothunderz
@mothunderz Рік тому
Yes indeed the cable must support data transfer and cannot just provide power, but even if you use a power that allows for data transfer there are some cables that dont work. It might be that there is too much cross talk between the wires or that there is too much interference, but the ESP is actually quite picky on the cable used.
@countcustoms7134
@countcustoms7134 Рік тому
Thank you so much for this tutorial. It helped me when I was working on ESP32 WROOM. Now, I'm working on ESP32-C3 and having same issue only this time the fatal error is No serial data received. Do you have any clues how do I sort this out? Thanks in advance
@mothunderz
@mothunderz Рік тому
Unfortunately I do not have the ESP32-C3 myself and thus have not been able to look into this. So my apologies, but am afraid I cannot help you with this issue. Hope you manage to solve the problem!
@eduardozavala1330
@eduardozavala1330 Рік тому
Did you found the solution? mine was working. got everything done except now i can´t make serial conneciton even tho with all disconnected.
@skyvortexhd8774
@skyvortexhd8774 Рік тому
I have the same error but with the ESP32 Devkit V1. Did you manage to solve your problem and if yes, how?
@countcustoms7134
@countcustoms7134 Рік тому
@@skyvortexhd8774 I managed to solve the problem at first. I got my custom built board running, the only mistake I did was I didn't document the steps I followed. Fast forward to few months later I designed another board with ESP32-C3 only this time without onboard flash chips. Now I have the board I can upload program to it, but I'm not sure if it executes it or not
@DiyintheGhetto
@DiyintheGhetto 2 роки тому
Do you press and hold down the boot while trying to upload after it compiles, Or do you press and release the button while trying to upload after it compiles?
@mothunderz
@mothunderz 2 роки тому
During compilation you dont have to press the button. You wait until it is done compiling and tries to upload to the ESP32. Then you press the boot button and hold it a few seconds. You can release as soon as it starts uploading. Hope this works for you!
@DiyintheGhetto
@DiyintheGhetto 2 роки тому
@@mothunderz I bought a 5 pack and the first 2 I got to program with the buttions and the other 3 don't want to program. 1 Out of them 3 the power LED doesn't come up. It seems the LDO and The diode is bad. So I cleared the two that does work and them them all back for new ones.
@mothunderz
@mothunderz 2 роки тому
@@DiyintheGhetto Yes, sounds like bad units. Hope the next batch works for you. Please try as well different USB cables. This can solve the problem too.
@DiyintheGhetto
@DiyintheGhetto 2 роки тому
@@mothunderz I have tons of usb cables and the 3 doesn't work. The one that doesn't power on I thought it might be a USB cable so I changed it 4 times and it still did not power up. So I know these 3 esp32 are bad.
@narendrarohit8455
@narendrarohit8455 Рік тому
Thank you for your tutorial bro, But I'm facing an other error like this "A fatal error occurred: MD5 of file does not match data in flash!" how to solve this error please help me on this bro thamk you in advance
@mothunderz
@mothunderz Рік тому
Unfortunately that sounds to me like you have corrupt memory in your ESP...
@ztiger09
@ztiger09 Рік тому
I have the wesmos d1 r32 and I had the same issue until I finally was able to upload it but then the circuit does not do any action at all. Like I've made a simple code for led light and nothing happens.
@mothunderz
@mothunderz Рік тому
Unfortunately I am not familiar with the wesmos d1. Hope you get your problem solved. What I do recommend is that you start with writing to the serial console. With LEDs there are some things that can go wrong (forget to initiate a port, connect the LED the wrong way around, broken LED, etc). With the serial port there is close to nothing that can go wrong as long as you set the correct baudrate.
@orangepoof4654
@orangepoof4654 9 місяців тому
how about error: Failed to connect to ESP32: Download mode successfully detected, but getting no sync reply: The serial TX path seems to be down. I try lot of way until i buy new usb cable and still didn't work, press and hold EN & Boot button, restart the ide, laptop etc. Still didnt work, help
@mothunderz
@mothunderz 8 місяців тому
Please make sure you do not have a phone connected to the computer when programming. Have you tried to program on a different computer? Have you tried a different usb port on the computer? Have you tried a different ESP32? Have you tried Arduino IDE 1.x and 2.x? By doing the above you should be able to isolate what the problem is.
@sujithonhaga8430
@sujithonhaga8430 2 місяці тому
Bro I got the same error on my new 😢 esp32 did you get any solution for this problem
@christiancalderon7428
@christiancalderon7428 7 місяців тому
Hello: I'm working with Xiao esp32 light sleep: I put this code at the beginig of the loop function. Now I cannot re-program the device. I've tryed by pressing the boot button while connecting USB-c; but fail to program the Xiao Esp32... I cannot make the device enter in download mode: A fatal error occurred: Failed to connect to ESP32-C3: Wrong boot mode detected (0x1)! The chip needs to be in download mode. Please some help.
@mothunderz
@mothunderz 6 місяців тому
My apologies, but I am not familiar with the Xiao Esp32
@vigneshmani4923
@vigneshmani4923 2 роки тому
I am facing some errors in compiling esp32 codes.pls give a solution. Error- variable or field'blynkwidgetwrite1'declared void
@mothunderz
@mothunderz 2 роки тому
Dear Vignesh, the error you are facing has to do with the code, not with the ESP32 itself. Debugging the code is not possible without seeing the complete code, but it seems to me that you did not define a variable properly. See for instance this link, perhaps this can help: forum.arduino.cc/t/variable-or-field-declared-void/201442
@RajinDragon
@RajinDragon 2 роки тому
I went through about 5 cables trying to get mine programmed, but finally got a good cable and programmed them all. Short thick usb cable.
@mothunderz
@mothunderz 2 роки тому
Great to hear it worked for you!
@LiliZorn
@LiliZorn Рік тому
Also had the problem with the usb cable, which is funny because i used that to program the esp8266 which worked fine :-)
@luisherrera7652
@luisherrera7652 9 місяців тому
In my case I had to use a different cable because the port was not recognized.
@mothunderz
@mothunderz 8 місяців тому
Thank you for your feedback, that is an excellent point. Another thing I noticed is that often times the ESP does not upload when a phone is connected with USB on the same USB hub on the computer. Great you got it working!
@penyomiraikhan7890
@penyomiraikhan7890 23 дні тому
The error comes as “ A fatal error occurred : Packet content transfer stopped (received 8 bytes) “ Can you please provide a solution asap , I have been banging my head and brainstorming still nothing is working. Also , I’m already using a 10uF capacitor between En and ground still the adamant error persists. Please provide a solution
@edward090909
@edward090909 2 роки тому
Mine is still giving issues. Even with capacitor and different cables used, the IDE does not go past "Connecting ......___....". Any other solutions I should try?
@mothunderz
@mothunderz 2 роки тому
The main thing is that during the "Connecting ......___...." phase that you press the boot button. Of course you should make sure that the IDE is properly configured and right serial port selected. No capacitor should be needed. If you then try various cables and nothing works that most likely your ESP is not functional...Hope you get it solved!
@educationaltechnology8363
@educationaltechnology8363 2 роки тому
wonderful 🤝👏👏👏👏 thanks
@mothunderz
@mothunderz 2 роки тому
Thank you! Cheers!
@KnightBear123
@KnightBear123 Рік тому
why when I reset the esp it still doesn't want to connect to wifi? and the serial monitor reads like random letters and numbers?
@mothunderz
@mothunderz Рік тому
We should first make a separation between whether you have a problem with programming the ESP or whether you have a problem with connecting to WiFi. If you program something else that simply writes some data to the serial interface, can you see that without problem? If that is the case then programming is not the issue and you should look into the code you use for connecting to WiFi. If this is not the case then focus on why programming is not working. If you give me some more information on what problem you have exactly I can try to help you out.
@SuperLukelo
@SuperLukelo Рік тому
I'm getting a fatal error: failed to connect to esp32: download mode successfully detected, but getting jo sync reply: the serial tx path seems to be down
@mothunderz
@mothunderz Рік тому
Here a few pointers for you to look at: I assume you have already verified many different USB cables -> they make a large difference Make sure there are no other USB devices on the same USB-hub that you are using. I have seen interference on some computers (depends on the quality of the hub) Is it a custom board that you using? In that case, pls check: esp32.com/viewtopic.php?t=25493 Please also consult: docs.espressif.com/projects/esptool/en/latest/esp32s3/troubleshooting.html I hope you can find the root cause for the problem!
@goldenentertainment5868
@goldenentertainment5868 9 місяців тому
Download mode successfully detected, but getting no sync reply: - how to solve this error ?
@mothunderz
@mothunderz 8 місяців тому
Sorry to hear this did not work for you. Hope you find a solution for your problem programming the ESP. Some new findings were: *) Make sure that there are no phones connected with USB to the computer (they disturb the communication to the ESP) *) Try different USB ports
@lazarusmagellan2367
@lazarusmagellan2367 Рік тому
FYI on Mac m1, you may need to quit and reopen arduino ide after pasting the link for the board installation to show up
@mothunderz
@mothunderz Рік тому
Thank you for your comment! I dont have a Mac myself, but I think also for the PC it is required to restart the Arduino IDE. I will add this to the comments of the video.
@jaykumarmehar4283
@jaykumarmehar4283 2 роки тому
The WiFi LED is not switching off and am not able to boot the ESP32 using the boot button.
@mothunderz
@mothunderz 2 роки тому
Please try different USB cables and make sure the ESP32 is properly configured. If nothing works than most likely you have a faulty ESP32 unfortunately. Good luck!
@filtermindmusic4208
@filtermindmusic4208 2 роки тому
very useful
@mothunderz
@mothunderz 2 роки тому
Really appreciated!
@rahulb5360
@rahulb5360 7 місяців тому
hard resetting via rts i am using esp 32
@rahulb5360
@rahulb5360 7 місяців тому
suggest me asap
@mothunderz
@mothunderz 6 місяців тому
Unfortunately it is not clear to me what you mean
@rahulb5360
@rahulb5360 6 місяців тому
@@mothunderz when i run my program i am getting hard resetting via rts pin what should i fot
@nicolasagustinmartinez9310
@nicolasagustinmartinez9310 Рік тому
Love you, thats all
@mothunderz
@mothunderz Рік тому
:-)
@0124akash
@0124akash Рік тому
Brother am facing problem with ESP32. This device is not connect to wifi serial monitor displayed "trying to connect" Please give me a solution. LED blink wifi scan Serial monitor display code is properly working.
@mothunderz
@mothunderz Рік тому
Hi Akash, sorry for my late reply, was out for a few days. I am not sure what the problem is you are facing and which code you are using. When I first read your comment I thought you are trying to use a "wifi serial monitor", but that does not exist. I think what you are stating is that you cannot connect to wifi and that the serial monitor states "trying to connect". Which code did you use? Perhaps the one from this video? ukposts.info/have/v-deo/aHGddYqjhW9mumQ.html If that is the case: did you update the username and password to the one of your router? Did you make sure your router is 2.4G capable (the ESP32 does not work with 5G wifi). Good luck! Sander
@0124akash
@0124akash Рік тому
@@mothunderz thanks for responding sir. But problem solved. Presently am facing different type problem like, I have node MCU chip and worked properly. As you know chip has only one adc pin, so am purchasing esp32. And my project code transfer to esp32 but I feel working is slow compare to nodemcu. Code is same for both chip and only header file name change. So please tell me what and where is problem ?
@mothunderz
@mothunderz Рік тому
@@0124akash the ESP32 should actually be really fast. However that can be very many different reasons why your code is not working well on the ESP. Please try some other reference codes. I hope you find the root cause.
@attariazeddine6603
@attariazeddine6603 2 роки тому
Merci...
@mothunderz
@mothunderz 2 роки тому
You're welcome :-)
@tipofthespear7821
@tipofthespear7821 2 роки тому
It keeps saying no i2c devices found HEELP
@mothunderz
@mothunderz 2 роки тому
To me that error makes no sense as I2C is not used for programming the ESP32. What code are you trying to program? Please start with a simple "hello world" or a simple LED blink code. Did you configure the "ESP32 Dev Module" board in the Arduino IDE? Which version of the ESP32 do you have exactly?
@kalyug_ka_karna
@kalyug_ka_karna 2 роки тому
Please send link esp 32
@mothunderz
@mothunderz 2 роки тому
Hi Akshay, what exactly do you mean with a link to the ESP32? These devices are developed by ESPRESSIF and the official site is: www.espressif.com/en/products/socs/esp32 For all my videos I use the ESP32-WROOM-32D, which is a common version of the ESP32 that you can purchase at many different stores: Digikey, Mouser, Amazon, Ebay, etc. It depends on the country you live in which of these stores works best. Cheers, Sander
@amalsatheesan329
@amalsatheesan329 Рік тому
thank u brother
@mothunderz
@mothunderz Рік тому
You're welcome!
@albertoschwendg
@albertoschwendg Рік тому
This is the first error I get when compiling any program. Not even programing in Python exec: "python": executable file not found in $PATH Compilation error: exec: "python": executable file not found in $PATH
@mothunderz
@mothunderz Рік тому
I have not encountered this issue before, but please check here: forum.arduino.cc/t/exec-python-executable-file-not-found-in-path/971847
@TheJavaSync
@TheJavaSync Рік тому
Micropython playliat, pls 🙏
@mothunderz
@mothunderz Рік тому
Thank you for the feedback. I have not looked into Micro Python yet, but will do after I finish my BLE tutorial session
@pdlngsqrs9547
@pdlngsqrs9547 2 роки тому
A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (0x00) 1: Capacitor, others have noted resistor, "solution" no good on ESP32_WROOM-32d 2: boot/enable button press combo 100000000 so no good. 3: hair loss extreme... 🤯
@mothunderz
@mothunderz 2 роки тому
That sounds like a broken device to me :-/
@pdlngsqrs9547
@pdlngsqrs9547 2 роки тому
@@mothunderz had to resign to that fact and returned it. Using esp8266 instead.-easy
@kanishkawijayananda6957
@kanishkawijayananda6957 Рік тому
i think this is the time waster esp32
@mothunderz
@mothunderz Рік тому
Not sure what you mean with the comment, but hope you get your ESP32 going!
@SaysAnX
@SaysAnX 8 місяців тому
Perdida de tiempo
@mothunderz
@mothunderz 8 місяців тому
sorry to hear this did not work for you. Hope you find a solution for your problem programming the ESP. Some new findings were: *) Make sure that there are no phones connected with USB to the computer (they disturb the communication to the ESP) *) Try different USB ports
@SaysAnX
@SaysAnX 8 місяців тому
@@mothunderz ok
ESP32 Access Point and Router connection explained
8:51
MoThunderz
Переглядів 42 тис.
Getting Started with ESP32 - Step-By-Step Tutorial
19:50
Tomasz Tarnowski
Переглядів 299 тис.
😳 Домінація! ОГЛЯД БОЮ ЛОМАЧЕНКО - КАМБОСОС
04:06
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Переглядів 162 тис.
ESP32 USB problem solved.
7:44
Martin Stach
Переглядів 28 тис.
Introduction to ESP32 - Getting Started
47:57
DroneBot Workshop
Переглядів 1,5 млн
OpenAI’s GPT-4o: The Best AI Is Now Free!
9:14
Two Minute Papers
Переглядів 16 тис.
INSANE OpenAI News: GPT-4o and your own AI partner
28:48
AI Search
Переглядів 70 тис.
Is this Best ESP32 board? New T-Display S3 ESP32S3
10:17
Volos Projects
Переглядів 338 тис.
STM32 UART #2 || Use Interrupt & DMA to send Data
13:00
ControllersTech
Переглядів 7 тис.
Setting up an ESP32 with Arduino IDE
4:03
Synthetic State
Переглядів 204 тис.