Nodemcu connects and disconnects continuously

Hello to all.
I’m having a problem with my project.
When I connect a second Nodemcu card, it connects and disconnects continuously.

When I load the same Sketch in the same card, but changing the project, it works very well.
I also assigned the card a fixed IP address … but nothing.

What can I do?
Thank you.

Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.


  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[] = "27e6935257c8465597238e70abc88c10";  //prova
char auth[] = "e7bcc4ff9ab6488c90bc34e2d6a80b9f";  //lavanderia

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Domotic Home";
char pass[] = "domotica";


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

  Blynk.begin(auth, "Domotic Home","domotica");
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

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


The problem is that I can not have more than one Nodemcu for each project?

At least this question can be answered without much wondering… No, you CAN have multiple devices, as long as they have different auth codes. And even then, if there are two devices with the same auth code, it will work, but much care should be taken (the devices are treated as ONE, and that can have some consequences)

As for the issue: Your device seem to restart, right after connection is established. If it is not power source issues, then you must provide further information, possibly debugging the ESP stack reading Serial output at 78400 bps

This is the terminal screen at 78400.

This is another screen.

No, it’s not a power problem because I’ve done various tests … I have the same result by connecting the card to the PC.

some of your screenshots (why not just copy/paste text??) are definitely NOT from your source code provided here.
The reboots in your case is caused by different causes too, check the reset causes:
reset causes:
0:
1: normal boot
2: reset pin
3: software reset
4: watchdog reset

While the result 2 is mostly caused by bad power source (VCC going too low results with this) the wdt (rst 4) is mostly caused by bad source code (program flow halted for too long)

Thanks for the help you are giving me!
You’re right, it seems strange, but I assure you that the sketch is exactly that!
Then inserted in a project where there are no other cards work very well …

Why?

TBH, I don’t get this sentence… what cards? NodeMCU? What project? :face_with_raised_eyebrow:

Can you describe your whole test bench/project?

Sorry if I answer now, but I had some unexpected events.

The card I’m having problems with is the NODEMCU 8266.
The sketch that is loaded is the base of BLYNK (Blynk Blynk).

When I insert this card creating a new project with the Blynk APP where there are NO other cards, everything is ok.

When invcece insert the Nodemcu card as new1 component in a project where there are already 3 cards in operation (1Arduino Yun Wifi, + Arduino Uno Ethernet Schield 2, + 1 Nodemcu 8266), this last inserted connects and disconnects continuously.

But the card and the sketch, are always the same … so I believe that the 2 Nodemcu cards go into conflict.

How can I solve ??

This is the sketch that i’m using:


  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[] = "...…..";  //prova
char auth[] = "...……...";  //lavanderia

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Domotic Home";
char pass[] = "...……..";


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

  Blynk.begin(auth, "Domotic Home","domotica");
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

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


Where’s this info coming from? Definitely not from your original post. Are you using static IP? if so, is it possible that you have an IP clash?

You are the info of the first post.
I am using a fixed IP address for this card and I have verified that it is free… not assigned to anyone else.
I don’t understand…
How come it restarts continuously only when in the same project there is already another card Nodemcu 8266?

Is it a bug of Blynk?

Silly question but… You are using different tokens for your devices, aren’t you??

yes yes, I use a different token for each device … And being that same card Nodemcu 8266 with the exact same sketch, in a project where there are no other devices work perfectly … while in a project where there is another Nodemcu 8266 restarting continuously makes me think it’s a Blynk problem. Also because if I delete the existing Nodemcu from the project and insert the “defective” one it works perfectly.

Ah, the same problem with other board Nodemcu 8266 … I can not insert more than one in the same project. Has it ever happened to anyone? How many do you use at the same time in your projects?

My project has 5 WiFi devices, but those are mixed type. But one of our active members is successfully using quite a few more than this. Look here:

You may need to load in debug serial (connected to USB and your PC) and record any error messages that the ESPs generate… they can go into reset for many reasons… bad/low power, WDT, improper pin connections, old Arduino ESP Core issues and so on…

1 Like