Skip to content

Leaving.. Hard reseting via RTS pin... on ESP8266 NODEMCU #6336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Jake-Peralt-a opened this issue Jul 24, 2019 · 25 comments
Closed

Leaving.. Hard reseting via RTS pin... on ESP8266 NODEMCU #6336

Jake-Peralt-a opened this issue Jul 24, 2019 · 25 comments

Comments

@Jake-Peralt-a
Copy link

Jake-Peralt-a commented Jul 24, 2019

Platform

  • Hardware: ESP8266 NODEMCU
  • Core Version: [latest git hash or date]
  • Development Env: Arduino ID
  • Operating System: Windows

Settings in IDE

  • Module: Generic ESP8266 Module
  • Flash Mode: dio
  • Flash Size: 512K
  • lwip Variant: [v1.4|v2 Lower Memory|Higher Bandwidth]
  • Reset Method: ck|
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [80Mhz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200|other] (serial upload only)

Problem Description

Unable to upload code to nodemcu (Leaving... Resetting via RTS pin)

MCVE Sketch

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "yPCwZ9AtBsjxhbzx2xGGieUodNAofDk";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "TP-Link";
char pass[] = "12345678";

void setup()
{
// Debug console
Serial.begin(11520);

Blynk.begin(auth, ssid, pass);
}

void loop()
{
Blynk.run();
}


### Debug Messages

Sketch uses 279800 bytes (55%) of program storage space. Maximum is 499696 bytes.
Global variables use 28856 bytes (35%) of dynamic memory, leaving 53064 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.6
2.6
esptool.py v2.6
Serial port COM5
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: cc:50:e3:c7:34:66
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0240
Compressed 283952 bytes to 204290...

Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 283952 bytes (204290 compressed) at 0x00000000 in 18.0 seconds (effective 126.3 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...



@JAndrassy
Copy link
Contributor

it is a sucessful upload. the esptool resets the esp8266 after upload

@Jake-Peralt-a
Copy link
Author

Jake-Peralt-a commented Jul 24, 2019

Hi ,its still not working.How long does it take to reset

@JAndrassy
Copy link
Contributor

JAndrassy commented Jul 24, 2019

reset is immediate. how do you know it doesn't work?
why do you set Generic ESP8266 if you have a NodeMcu?

@Jake-Peralt-a
Copy link
Author

The NodeMCU is not connecting to my wifi router, I set it to nodemcu and tried again but got the same message .

@d-a-v
Copy link
Collaborator

d-a-v commented Jul 24, 2019

Check GPIOs are correctly driven at boot or reset time:

  • GPIO0 and GPIO2 must be high
  • GPIO15 must be low

reference1
reference2

@JAndrassy
Copy link
Contributor

do you have some debug prints in setup()?

@devyte
Copy link
Collaborator

devyte commented Jul 24, 2019

Closing because I don't see a core issue here.

@devyte devyte closed this as completed Jul 24, 2019
@sakthi123-s
Copy link

sakthi123-s commented Sep 21, 2019

I am also get same error
Hard resetting via rts pins how to solve it any suggestions

@JAndrassy
Copy link
Contributor

I am also get same error
Hard resetting via rts pains how to solve it any suggestions

read the comments above

@GonzalezAnguita
Copy link

After updating the Arduino IDE to 1.8.10 the ESP-01s with this usb adapter does not reset after successfully uploading a program using the generic configuration. I've tried with a NodeMCU 0.9 (ESP-12) and that one resets correctly using the board specific configuration.

@d-a-v
Copy link
Collaborator

d-a-v commented Oct 26, 2019

This adapter has a physical switch for running or programming an esp-01.
What is the exact version of the core and configuration of the menu that allows the board to reset and run right after programming ?

@JAndrassy
Copy link
Contributor

JAndrassy commented Oct 27, 2019

@d-a-v they left the switch in programming mode. the old esptool didn't reset after upload so the uploaded sketch did run until next reset. It allowed quick debugging.

@d-a-v
Copy link
Collaborator

d-a-v commented Oct 27, 2019

@GonzalezAnguita Are you able to try #6429 ?

@DuKings
Copy link

DuKings commented Nov 14, 2019

@Saketh-Bobbala I Had the same issue, try changing the baud value in the serial monitor (do this if you are using Arduino) to the one that is in the code.

@jpalepu
Copy link

jpalepu commented Nov 16, 2019

change the connection frequency to 2.4Ghz

@VeeruSubbuAmi
Copy link

This article might help you to to understand anf fix the issue
https://electronicsinnovation.com/hard-resetting-via-rts-pin-fixed-explained/

@MrPxx
Copy link

MrPxx commented Feb 17, 2020

@Saketh-Bobbala This worked for me. Tools > Reset Method > "no dtr (aka ck)".

Then I got this :
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 277792 bytes (202445 compressed) at 0x00000000 in 18.0 seconds (effective 123.8 kbit/s)...
Hash of data verified.

Leaving...
Soft resetting...

@rugimike
Copy link

rugimike commented Mar 1, 2020

I solved it this way:
-connect the serial port(GPIO 0) to ground. makes arduino act as a serial port to ESP8266
-run the sketch.
-while it starts connecting, connect the RESET of ESP8266 to ground. then disconnect before connecting... finishes.
-the above resets the ESP8266. remember, all this time, RESET of the arduino is grounded.
-Wait for the code to be uploaded to ESP8266.
-When you see. ' leaving.. hard reseting via RST pin', disconnect the serial port(GPIO 0).
then connect the RESET of ESP8266 to ground for 1 second and then release it.
when you release it, the program will start running. you will see this in the serial monitor.(make sure you
select the correct baud rate on the serial monitor)

-Above should work well

@rugimike
Copy link

rugimike commented Mar 1, 2020

@Saketh-Bobbala This worked for me. Tools > Reset Method > "no dtr (aka ck)".

Then I got this :
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 277792 bytes (202445 compressed) at 0x00000000 in 18.0 seconds (effective 123.8 kbit/s)...
Hash of data verified.

Leaving...
Soft resetting...

@JAndrassy
Copy link
Contributor

JAndrassy commented Mar 1, 2020

@rugimike, if your board doesn't have autoreset feature, you don't need to make this adrenaline action. if io 0 is low at reset the esp8266 starts in flashing mode and stays in it until next reset. then at reset again the io 0 level counts

@rugimike
Copy link

rugimike commented Mar 1, 2020 via email

@rugimike
Copy link

rugimike commented Mar 1, 2020 via email

@MehranEsfandiari
Copy link

[image: image.png]

On Sun, 1 Mar 2020 at 22:47, Michael Rugi @.> wrote: Hi. Its true.(even my board does not have autoreset). what you do after seeing 'leaving.. hard/soft resetting via RTS pin..' is to. 1. disconnect the GPIO 0 pin. 2. connect the RESET of the ESP8266 to ground, for just a second and then disconnect it. please see below. [image: image.png] On Sun, 1 Mar 2020 at 21:45, Juraj Andrássy @.> wrote: > @rugimike https://github.com/rugimike, if your board doesn't have > autoreset feature, you don't need to make this adrenaline action. if io 0 > is low at reset the esp8266 starts in flashing mode a stays in it until > next reset. then at reset again the io 0 level counts > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <#6336?email_source=notifications&email_token=ABULD4CLEOYS2YWXVZPYLGTRFKUMBA5CNFSM4IGLSON2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENNHHIA#issuecomment-593130400>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/ABULD4C6O5ZEI4TUMY5BUILRFKUMBANCNFSM4IGLSONQ > . > -- Best Regards Michael Rugi Njoroge
-- Best Regards Michael Rugi Njoroge

Thanks.great

@ahmettsdvn
Copy link

I solved it this way:
-connect the serial port(GPIO 0) to ground. makes arduino act as a serial port to ESP8266
-run the sketch.
-while it starts connecting, connect the RESET of ESP8266 to ground. then disconnect before connecting... finishes.
-the above resets the ESP8266. remember, all this time, RESET of the arduino is grounded.
-Wait for the code to be uploaded to ESP8266.
-When you see. ' leaving.. hard reseting via RST pin', disconnect the serial port(GPIO 0).
then connect the RESET of ESP8266 to ground for 1 second and then release it.
when you release it, the program will start running. you will see this in the serial monitor.(make sure you
select the correct baud rate on the serial monitor)

-Above should work well

Thanks...

@VeeruSubbuAmi
Copy link

You can find your answer here.
https://youtu.be/McjIEpc26Do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests