NodeMCU getting blocked when rebooted

Hello. I'm trying to monitor the temperature of my rooms using the Arduino Cloud IoT platform using nodeMCU, and I'm facing problems : something, when rebooting the nodeMCU, using RST buttom, the nodeMCU is blocked (the portal is no more displaying the data I'm displaying, and no data are displayed on the Monitor interface).

In order to troubleshoot, I have created a basic script (see below).

#include "thingProperties.h"

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  // delay(1500);

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection, false);
 
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(4);
  ArduinoCloud.printDebugInfo();
  var_1=0;
}

void loop() {
  ArduinoCloud.update();
  Serial.print(".*");
}

Just before being blocked, the message that is displayed is :
...............................................................................................................*.*Connected to "HUAWEI ch 2022"
.TimeServiceClass::sync Drift: -1682068380 RTC value: 1682068384
.

Strange is that when the board is blocked for several minutes, and that has not been connected to the cloud for several minutes (because it is blocked), and I restart it, it works fine = it restarts and doesn't get blocked.
In the other hand, when the board is running fine and I restart it, it becomes blocked.

can you put a link or photo of the board you are using?

Hello. Here is the board I'm using. The fact is that I have tested with other NodeMCU manufacturer, and I have the same message.
I wonder if the pb is not in the scripts automatically generated by the Arduino Cloud IoT (initProperties();, ArduinoCloud.update();).


Hi. To be more precise : when I say that "when I reboot the nodeMCU it becomes blocked", it means:

  1. the NodeMCU is well restarted.
  2. the code is executed
  3. and then it becomes blocked.
    In oher words : this is not the restart that is blocked. This is after the nodeMCU has been restarted that it becomes blocked.

Hi @essarts-le-roi,
i have a different hw revision of the board, but i can connect without problems using the default sketch created by ArduinoIoTCloud.


The board name i select when adding this board is NodeMCU 1.0 (ESP-12E Module) and i'm using default configuration.

image
image
image

OK. Thanks... I will investigate. Do you know how I could receive more debug info (to know exactly where it stopps)?

You can open your IoT sketch in the webeditor and change the ESP core debug level:

Click on select other board and port


Then re- select the nodeMCU board
Configure debug port to Serial and change debug level

CORE+WIFI+ ... should be fine

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.