Uploading freeze

CUJimmy2
Posts: 1
Joined: Tue Oct 17, 2023 12:03 am

Uploading freeze

Postby CUJimmy2 » Tue Oct 17, 2023 12:14 am

Hi All, Im a newby using the ESP8266, and I'm stuck with a freeze when uploading a sketch. Using the Arduino IDE I get the following message "Leaving...Hard resetting via RTS pin..." with no further activity. Any advice would be appreciated.
Cheers

hobby_guy
Posts: 20
Joined: Sat Jan 29, 2022 3:29 pm

Re: Uploading freeze

Postby hobby_guy » Tue Oct 17, 2023 8:56 pm

Hi!

That is the standard message following a successful flashing. It only means the write is done, and the ESP will now reset.
If the process had failed, you'd get a different message (things like, port unavailable etc).

If you did program the ESP, you must have booted the chip with GPIO0 held low (possibly by pressing a button on the breakout). You should try to simply reboot the chip (without holding GPIO0 low) to see if your program runs. Remember to enable serial communications (in setup()) so you can print some text on the terminal, so you can easily see that your program is indeed running:

Code: Select all

void setup() {
  Serial.begin(115200);
  Serial.println("My Firmware v1.0");
}

Oggie62
Posts: 3
Joined: Wed Jul 03, 2024 10:34 am

Re: Uploading freeze

Postby Oggie62 » Wed Jul 03, 2024 11:16 am

Hi.....I am a newbie and I have the same problem. I understand this not an error but a status message. The module is an ESP 8266 ESP 01S and I am using a USB-UART - the type with a switch for USB/UART mode. I tried unplugging usb and re-plugging, same but flicking switch, loading a different program etc, but result is always the same "hard resetting via RTS" followed by......nothing! Big freeze....What am i doing wrong ? Please help me as i am out of options

User avatar
Inq720
Posts: 37
Joined: Fri Dec 22, 2023 1:36 pm
Location: North Carolina, USA
Contact:

Re: Uploading freeze

Postby Inq720 » Thu Jul 04, 2024 5:47 am

Oggie62 wrote:
Wed Jul 03, 2024 11:16 am
Hi.....I am a newbie and I have the same problem. I understand this not an error but a status message. The module is an ESP 8266 ESP 01S and I am using a USB-UART - the type with a switch for USB/UART mode. I tried unplugging usb and re-plugging, same but flicking switch, loading a different program etc, but result is always the same "hard resetting via RTS" followed by......nothing! Big freeze....What am i doing wrong ? Please help me as i am out of options
I prefer these blue ones...
esp1prg.png
esp1prg.png (475.77 KiB) Viewed 5260 times
...two reasons:
1) You don't have to switch or press any buttons. You simply upload and the output debuggers starts working immediately. The reset button is only if you want to reboot for some obscure reason. I actually keep one permanently attached to the back of my desktop computer so it's always there if I want to test some software only program.
2) It has the pin header so you can connect external hardware to pins for prototyping your external hardware.

I've never used the red one, but according to the red one's Ad, you have to have it in the prog mode to upload from the Arduino IDE. You then switch to uart mode to see the output on the Arduino IDE Serial Monitor. I would find this to be a PITA since the output in the setup will have already run before you get it switched over. You'd have to reboot it in uart mode again to see any messages.

I'd try using the sample blink sketch first. That way you would see the on board LED blink even if you don't see any output messages. You may have to switch the built in LED. The default is 2 and I guess some are on 2, but mine ESP-01S's are on pin 0. If that works, I'd then add output messages to that same loop method so they are continuously printing every time it blinks.

Oggie62
Posts: 3
Joined: Wed Jul 03, 2024 10:34 am

Re: Uploading freeze

Postby Oggie62 » Thu Jul 04, 2024 10:45 am

I have one of the red ones. I followed the instructions - switched to 'prog" mode and uploaded.....at one point the blue led flashed and then "hard resetting via RTS" and then.....nothing. I tried unplug/replug usb, same but switching to UART....nothing. In this application it is a relay switched using wifi, so it should show me IP address of module so I can switch it. I checked if the module connected to wifi but, yet again nothing

User avatar
Inq720
Posts: 37
Joined: Fri Dec 22, 2023 1:36 pm
Location: North Carolina, USA
Contact:

Re: Uploading freeze

Postby Inq720 » Fri Jul 05, 2024 12:26 pm

Oggie62 wrote:
Thu Jul 04, 2024 10:45 am
I have one of the red ones. I followed the instructions - switched to 'prog" mode and uploaded.....at one point the blue led flashed and then "hard resetting via RTS" and then.....nothing. I tried unplug/replug usb, same but switching to UART....nothing. In this application it is a relay switched using wifi, so it should show me IP address of module so I can switch it. I checked if the module connected to wifi but, yet again nothing
People here are willing to help newbies, but you either have to supply information or be willing to try suggestions offered. Your problem could be any number of things, and you have to use baby steps to resolve what your issue is. What were the results of the suggestions I made above. If you didn't understand them, say so. We don't know your skill level. There are many levels of newbness! :D

Upload the following Sketch:

Code: Select all

#define LED 2

void setup() 
{
  Serial.begin(115200);
  delay(1000);
  Serial.println("\n\nStarted");
  pinMode(LED, OUTPUT);  
}

void loop() 
{
  digitalWrite(LED, LOW);  
  delay(1000);                      
  digitalWrite(LED, HIGH);  
  delay(2000);
  Serial.println("Blinked");                      
}
You should see the LED blink and you should see output in the Serial Monitor. If you do...

(1) ...not see the LED blinking (every three seconds), try changing the LED value (Blue Circle) from 2 to 0. Some ESP's use a different pin.
(2) ...not see the serial print messages (Lime Green Circles), make sure you have the same same baud rate in the program as set on the Serial Monitor (Red Circles).

If you get both of these working, it means your hardware is all good... THEN try your WIFI program. If it still doesn't work, you'll have to provide that program for us to figure out your problem.

Good luck,
Inq
Capture.PNG
Capture.PNG (59.76 KiB) Viewed 5226 times

Oggie62
Posts: 3
Joined: Wed Jul 03, 2024 10:34 am

Re: Uploading freeze

Postby Oggie62 » Fri Jul 05, 2024 2:02 pm

Thank you for the help and patience. I had a look on the net and found a sketch that simply connects to wifi and returns the IP address of the ESP8266. I ran it but serial monitor remained blank. What was strange was that a slowly increasing number appeared on the serial monitor. I had a look at the code and sure enough there was a loop that increased and displayed the number during the interval during which it connects to the network. Obviously something was wrong. .....then it occurred to me. Somewhere I read not to use certain characters in passwords or names. My network SSID includes a space! The SSID has been the same for at least 3 years and I often gave access to friends and family and never had problems. I know certain characters are forbidden but since it worked for many years, I never suspected it. I arranged it and everything then worked perfecly. Guess it can be added to my experiences bucket. Thanks again for the help and patience. :D

Who is online

Users browsing this forum: No registered users and 6 guests