esp 8266 issue "Leaving... Hard resetting via RTS pin..."

May 2024 ยท 4 minute read

I'm new in arduino and esp8266 i trued to upload a simple blink example of esp

/* ESP8266 Blink by Simon Peter Blink the blue LED on the ESP-01 module This example code is in the public domain The blue LED on the ESP-01 module is connected to GPIO1 (which is also the TXD pin; so we cannot use Serial.print() at the same time) Note that this sketch uses LED_BUILTIN to find the pin with the internal LED */ void setup() { pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output } // the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level // but actually the LED is on; this is because // it is active low on the ESP-01) delay(1000); // Wait for a second digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH delay(2000); // Wait for two seconds (to demonstrate the active low LED) } 

it's start well and the led start blinking and after a second it's stop and i get

Error downloading http://arduino.esp8266.com/versions/2.4.1/package_esp8266com_index.json Sketch uses 257696 bytes (24%) of program storage space. Maximum is 1044464 bytes. Global variables use 26572 bytes (32%) of dynamic memory, leaving 55348 bytes for local variables. Maximum is 81920 bytes. esptool.py v2.6 2.6 esptool.py v2.6 Serial port COM4 Connecting.... Chip is ESP8266EX Features: WiFi MAC: 84:0d:8e:a4:77:12 Uploading stub... Running stub... Stub running... Configuring flash size... Auto-detected Flash size: 4MB Compressed 261856 bytes to 191268... Writing at 0x00000000... (8 %) Writing at 0x00004000... (16 %) Writing at 0x00008000... (25 %) Writing at 0x0000c000... (33 %) Writing at 0x00010000... (41 %) Writing at 0x00014000... (50 %) Writing at 0x00018000... (58 %) Writing at 0x0001c000... (66 %) Writing at 0x00020000... (75 %) Writing at 0x00024000... (83 %) Writing at 0x00028000... (91 %) Writing at 0x0002c000... (100 %) Wrote 261856 bytes (191268 compressed) at 0x00000000 in 17.0 seconds (effective 123.2 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin... 

how i can make it run for ever until i stop the ide note : after i run it again this line

Error downloading http://arduino.esp8266.com/versions/2.4.1/package_esp8266com_index.json disappear

3 Answers

The "hard resetting" message is fine and usually indicates that the upload was successful. If the serial output appears blank or garbled or stuck afterwards, then it's probably either a problem with the code or the serial monitor.

Make sure that your serial monitor's baud rate matches the value used by Serial.begin in your code. The top ESP32/ESP8266 example on Google uses 115200 whereas most people have their serial monitor set to 9600 because it's a common Arduino sketch value. This mismatch is the most common reason for people Googling this issue.

For other connection issues, such as COM connection issues, try these steps:

  • Press the little "Reset" button (or "RST") on your board.
  • Unplug the board's USB cable.
  • Unplug anything from the TX/RX pins.
  • Close all Arduino IDE windows including the serial monitor.
  • Plug the USB cable back in and wait a few seconds.
  • Reopen the Arduino window and choose the correct port under Tools > Port. If you see multiple unlabeled COM ports, you can use the "Get Board Info" option or simple trial and error to figure out the right port.
  • Open the serial monitor and make sure the baud rate matches the one found in your code.
  • Upload the sketch.
  • If the upload fails, wait a few seconds and try it a second time.
  • I'm not sure if this related to newer versions of the Arduino IDE or something else, but if you power cycle the board after you see this message it will run as you expect.

    I've also noticed that in my case (macOS Catalina) I also have to reset the board to be able to upload sketches.

    Hope that helps.

    try to choose board "NodeMCU 1.0 (ESP-12E Module)"

    ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobHFsYWaCd32OnqqpZWhng3d5yKyqrp1dobKiwsinnmagkaexbr7ErJytrJmjtG7CyJpkq6yjYr2qug%3D%3D