Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Freddie
#83350 I wasn't sure which forum was the right one, so I decided to post this in "General Discussions".
I've got Arduino IDE 1.8.5 for quite some time now.
I've been using ESP8266 (NodeMCU) to conrtol parts of my Smart Home for about two years now. Yesterday one of the blinds failed to go down and I found that the ESP8266 didn't set the output to the relay. So I decided to replace it with a new one. But: When I download the (old) sketch to the NodeMCU, I can't get neither a connection to the WIFI nor do I get anything useful out of the serial monitor. The serial connection (Serial.begin) is set to 115200, so is the monitor. I may use whatever baud rate I like, I just get rubbish. Apart from that, the WIFI does not connect.
Eventually I used a very simple sketch just to check the connection:
Code: Select all#include <ESP8266WiFi.h>        // Include the Wi-Fi library

const char* ssid     = "******";         // The SSID (name) of the Wi-Fi network you want to connect to
const char* password = "******";     // The password of the Wi-Fi network

void setup() {
  Serial.begin(115200);         // Start the Serial communication to send messages to the computer
  delay(10);
  Serial.println('\n');
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);             // Connect to the network
  Serial.print("Connecting to ");
  Serial.print(ssid);
 
  while (WiFi.status() != WL_CONNECTED) { // Wait for the Wi-Fi to connect
    delay(500);
    Serial.print('.');
  }
 
  Serial.println('\n');
  Serial.println("Connection established!"); 
  Serial.print("IP address:\t");
  Serial.println(WiFi.localIP());         // Send the IP address of the ESP8266 to the computer
}
 
void loop() {
 
}

The result in the monitor looks like this:
" ⸮nno⸮⸮⸮⸮|⸮⸮⸮o⸮nNo⸮⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|"
This does tell me that the connection was refused. This does happen with two different access points (router and Raspberry) .
Any idea what's wrong?

CU Freddie
User avatar
By QuickFix
#83366 What does the messages of the bootloader look like?
Connect ESP to your computer and start a terminal program (like PuTTY) at 74880 Baud (not a typo).

It should look something like this:
ets Jan 8 2014,rst cause 1, boot mode:(3,7)

load 0x40100000, len 24236, room 16
tail 12
chksum 0xb7
ho 0 tail 12 room 4
load 0x3ffe8000, len 3008, room 12
tail 4
chksum 0x2c
load 0x3ffe8bc0, len 4816, room 4
tail 12
chksum 0x46
csum 0x46
If you see lines that say "chksum err" flash was unsuccessful ("Checksum error").
Some more info can be found here.
User avatar
By Freddie
#83378 This didn't really look like a boot problem. Usually I do get the boot errors even in the IDE. (I did have a bunch of them when I started programming the NodeMCUs and tried my rusty knowledge (>30 years old) in C-programming. ;)
In this case I did get rubbish even after booting. (Pressing the "Reset"-button) which was absolutely unusual. I suppose that either something went completely wrong during compiling or when downloading the program into the memory.
After some fiddling around with several NodeMCUs and different parameter settings (Trying different settings for the baud rate etc.), suddenly it did show a successful start! Since then I've uploaded different programs into several NodeMCUs and without any problems.
The really annoying part of it is that I don't know what fixed it! :evil:

Thanks for trying to help anyway.

CU Freddie