BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

ESP8266 don't work

Hi everyone!

I’m looking since last night to find a solution to my strange problem.

My two nodeMCU won’t run with my Blynk project !
My ESP32 is running well with my project.

This is the serial screenshot :


Nothing good. :rofl:
I tried some basic examples, including blynk examples, everything works well.
I tried esp8266 core 2.5 and 2.61 without result.
I reinstall IDE and all libraries from scratch on an other computer too, but still same issue.
:thinking:

maybe lightning hit your NodeMCU’s??

1 Like

no, because blynk examples works well. :thinking:

yeah, sounds weird, but that was the best i have…

(really was just suggesting hardware may have changed?)

100% sure your baud is correct?

Yes, 115200 bauds !
I had the same idea :upside_down_face:

Things I’d try:

Restart your PC (it’s be helped with baud rate issues before for me)

Try a different USB port and cable

Try all different baud rates and hit the reset button on the NodeMCU until you find one where the MCU boot messages make sense, and use this baud rate for your serial print messages as well.

Load a sketch with the Erase Flash - All Flash Contents option.

Comment out any unusual libraries one at a time, along with the code that goes with them. You’ll eventually find what library it doesn’t like.

Pete.

Thank you Peter,

The only thing I have not tried is to load sketch with the Erase Flash All Flash Contents.
I also think a library is involved !
I 'll try one bye one !
But why an installation from scratch does not work anymore on another computer?

Might also be worth going to core 2.4.x - you know my feelings on 2.5 and higher.

Pete.

1 Like

Just tried with 2.4.2, same issue :upside_down_face:
There is no compilation error .
And a MCU reset always give me 14:53:20.322 -> $l⸮+⸮ fR[⸮$⸮⸮E⸮⸮4⸮
:rofl:

And this is the only difference between nodeMCU and ESP32 libraries, same sketch with a choice before compiling.
Sketch on ESP32 run like a charm .

#define NODEMCU1
//#define ESP32

#ifdef NODEMCU1
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <ESP8266mDNS.h>
#endif

#ifdef ESP32
#include <BlynkSimpleEsp32.h>
#include <WiFi.h>
#include <ESPmDNS.h>
#endif

Do your NodeMCU boards definitely default to 115200?
My Wemos D1 Mins default to 74880

Pete.

I changed to 9600 both, code and port, without effect :thinking:
And has I said, my big home project is only impacted, all examples run with 115200 bauds without issue.
So I don’t understand , why this project run on ESP32 and not on ESP8266 since last upload.
I uploaded my previous version , but it’s still the same on the 2 NodeMCUs.

But if you’re getting some sort of hardware message on reboot you need to be at the native baud rate for the device, otherwise the message will be illegible.

Pete.

1 Like

Where to change this native rate?
And why can not both NodeMCUs work suddenly?
Another thing, the led does not blynk, so I’m sure the code does not work, and the Android app says nodemcu not connected.

Are you talking about upload rate or serial monitor rate ?

Serial monitor rate. I’m not sure how to change it - maybe via an AT command with the original firmware, but I just set my serial baud rate to the default rate for the board i’m using so that I can set my serial monitor to the same rate and see messages from the hardware and the debug messages on the same debug screen.

When you’re connected at the correct baud rate and you do a reset you’ll see a message like this:

Jan  8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld#

If you then start getting WDT resets you’ll see a stack trace that you can copy and paste into the ESP Exception Decoder that will help you find the issue, but if your serial monitor isn’t set to the native speed of the board you’ll just get rubbish which you can’t use in the Exception Decoder.

Pete.

1 Like

Bingo ! 74880 bauds …
Now I will try to find what is the problem

16:09:35.224 ->  ets Jan  8 2013,rst cause:2, boot mode:(3,6)
16:09:35.224 -> 
16:09:35.257 -> load 0x4010f000, len 1384, room 16 
16:09:35.257 -> tail 8
16:09:35.257 -> chksum 0x2d
16:09:35.257 -> csum 0x2d
16:09:35.257 -> v482516e3
16:09:35.257 -> ~ld
16:09:35.292 -> V2
16:09:35.292 -> Mo
16:09:35.326 -> ⸮

Seems a bit of a generic error code. Maybe this helps, maybe not …

Thank you @Lichtsignaal, I have already explored this link.
I am creating a new sketch with copy and paste, step by step, until the problem is solved.
As I have snippets , it’s not too complicated even if it’s a bit long :rofl:


  //***************** Initialize TIMERS and buttons *****************//
  Serial.println("init timers");
  //timer.setInterval(320L, receiver);
  // "Sacrificial" Timer - needed when deleting timers as that will kill first timer created...
  timer.setTimeout(10L, []() {
  });  // END sacrificial Function
  /*timer.setInterval(BlinkDelay1, blinkLedWidget);
  timer.setInterval(530L, ImageWidget);
  timer.setInterval(2000L, SensorRead);
  timer.setInterval(32000L, clockDisplay);
  timer.setInterval(50730L, activetoday);
  timer.setInterval(60020L, UpTime); //1"*/
  timer.setInterval(63160L, TempUpdate);
  //timer.setInterval(66170L, TempCompare);
  timer.setInterval(70050L, connectionstatus);
  //timer.setInterval(70980L, sonde);
  /*timer.setInterval(80090L,  FuelLevel);
  timer.setInterval(220020L, courbe);
  TimerConso = timer.setInterval(2030L, consumption);
  timer.disable(TimerConso);
  StartHeatingTimer = timer.setInterval(2030L, StartHeating);
  timer.disable(StartHeatingTimer);*/

  Serial.println("init timers done");
}
1 Like

been there, done that.

worked for me!

(but no idea why!)

2 Likes

You might want to get a decent development platform like PlatformIO. It’ll make your life a whole lot easier. The Arduino IDE is a pain in the bum if you ask me.

A while a go I wrote a piece on PlatformIO, https://lichtsignaal.nl/2017/02/23/using-platformio-for-your-arduino-projects/, could be interesting to take a look. I’ve noticed you are a fanatic coder, so it could be worth checking it out (and let me know if you need more info, there are two articles on my site).

2 Likes