ESP 8266 D1 Mini WLAN Problems?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hotspot_2
Normal user
Posts: 32
Joined: 09 Dec 2022, 21:43

ESP 8266 D1 Mini WLAN Problems?

#1 Post by hotspot_2 » 10 Nov 2024, 19:43

Hello everyone,

I use an ESP8266 D1 Mini on an oil heater to determine the switch-on times of the oil burner. This worked perfectly for about a year but suddenly the D1 Mini stopped working. It looks like WiFi problems to me but there could be other causes. It can no longer be used and a ping looks like this at the moment.

Do you have any idea what I can do here? Does the ESP need to be replaced?
d1mini_wlan.jpg
d1mini_wlan.jpg (175.43 KiB) Viewed 1336 times
After a restart it's much better but it's the same problem in about a day. I am using mega-20240822.

User avatar
Ath
Normal user
Posts: 4008
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP 8266 D1 Mini WLAN Problems?

#2 Post by Ath » 10 Nov 2024, 20:16

Can you get logging from the ESP? Best would be to capture that via the USB serial port on the unit, as the weblog and Syslog logging will both fail if the WiFi is failing...
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP 8266 D1 Mini WLAN Problems?

#3 Post by TD-er » 10 Nov 2024, 20:31

Did you recently replace the access point or changed settings on it?

Looks like you do hop between subnets anyway (.1.x and .3.x).
So maybe there is something else changed there too?

Can there be another node on your network using the same IP-address?

hotspot_2
Normal user
Posts: 32
Joined: 09 Dec 2022, 21:43

Re: ESP 8266 D1 Mini WLAN Problems?

#4 Post by hotspot_2 » 19 Nov 2024, 20:01

Ath wrote: 10 Nov 2024, 20:16 Can you get logging from the ESP? Best would be to capture that via the USB serial port on the unit, as the weblog and Syslog logging will both fail if the WiFi is failing...
Hi! It's not getting better with my WLAN problems.

Now i have logged some minutes with the same ping behaviour as shown before.

I attached the log file.

Code: Select all

INIT : Booting version: ESP_Easy_mega_20240822_normal_ESP8266_4M1M, (GitHub Acti                                                                                                                                                             ons) mega-20240822 (ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2                                                                                                                                                             .1.2 PUYA support)
00.322 : (29096) Info   : INIT : Free RAM:29096
00.324 : (29024) Info   : INIT : Manual Reboot #3 - Restart Reason: External Sys                                                                                                                                                             tem
00.326 : (28984) Info   : FS   : Mounting...
00.353 : (26736) Info   : FS   : SPIFFS mount successful, used 75802 bytes of 95                                                                                                                                                             7314
00.377 : (26536) Info   : ESPEasy console using ESPEasySerial
00.409 : (26448) Info   : Current Time Zone: STD time start: 1970-10-25 03:00:00                                                                                                                                                              offset: 60 min
00.422 : (26448) Info   : INIT : I2C
00.423 : (26408) Info   : INIT : SPI not enabled
00.423 : (26368) Info   : Set Network mode: WiFi
00.528 : (27024) Info   : WIFI : Set WiFi to STA
02.919 : (25680) Info   : WIFI : Disconnected! Reason: '(1) Unspecified'
03.121 : (25624) Info   : WIFI : Disconnected! Reason: '(1) Unspecified'
03.222 : (25600) Info   : Reset WiFi.
05.412 : (25296) Info   : WIFI : Connecting FFHomeNet24 2C:91:AB:44:34:43 Ch:6 (                                                                                                                                                             -49dBm) WPA2/PSK attempt #0
05.415 : (25256) Info   : IP   : Static IP : 192.168.3.201 GW: 192.168.0.1 SN: 2                                                                                                                                                             55.255.252.0 DNS: 192.168.0.1 / (IP unset)
06.363 : (25472) Info   : WIFI : Set WiFi to OFF
06.580 : (25632) Info   : WIFI : Set WiFi to STA
06.686 : (25072) Info   : WIFI : Connecting FFHomeNet24 2C:91:AB:44:34:43 Ch:6 (                                                                                                                                                             -49dBm) WPA2/PSK attempt #1
06.689 : (25016) Info   : IP   :▒192.168.0.1 SN: 255.255.252.0 DNS: 192.168.0.1                                                                                                                                                              / (IP unset)
06.698 : (25152) Info   : ESPEasy console using ESPEasySerial
06.700 : (25168) Info   : INIT : Free RAM:25208
06.729 : (24872) Info   : ESPEasy console using ESPEasySerial
06.731 : (24792) Info   : INFO : Plugins: 47 ["Normal","No Debug Log"] (ESP82xx                                                                                                                                                              Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
06.735 : (21904) Info   : Webserver: start
07.707 : (21104) Info   : WIFI : Connected! AP: FFHomeNet24 (2C:91:AB:44:34:43)                                                                                                                                                              Ch: 6 Duration: 995 ms
07.710 : (21040) Info   : WIFI : Static IP: 192.168.3.201 (ESP-FFHomeNet-2) GW:                                                                                                                                                              192.168.0.1 SN: 255.255.252.0 DNS: 192.168.0.1 / (IP unset)   duration: 25 ms
07.747 : (21112) Info   : Webserver: stop
07.760 : (21056) Info   : Webserver: start
07.882 : (19032) Error  : MQTT : Intentional reconnect
07.916 : (18720) Info   : MQTT : Connected to broker with client ID: ESP_FFHomeN                                                                                                                                                             et_2_2
07.922 : (17096) Info   : Subscribed to: ESPs/ESP_FFHomeNet_2/#
07.926 : (16520) Info   : UDP : Start listening on port 8266
07.927 : (16536) Info   : firstLoopConnectionsEstablished
08.083 : (17944) Info   : WD   : Uptime 0  ConnectFailures 0 FreeMem 18080 WiFiS                                                                                                                                                             tatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
08.542 : (19296) Info   : NTP  : NTP replied: delay 13 ms round-trip delay: 13 m                                                                                                                                                             s offset: 20046T19:17:12.164
08.545 : (19472) Info   : Time set to 1732043840.706
08.547 : (19424) Info   : Current Time Zone: STD time start: 2024-10-27 03:00:00                                                                                                                                                              offset: 60 min
08.551 : (19432) Info   : Local time: 2024-11-19 20:17:20
38.083 : (18728) Info   : WD   : Uptime 1  ConnectFailures 0 FreeMem 18864 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:01:08.083 : (19048) Info   : WD   : Uptime 1  ConnectFailures 0 FreeMem 19184 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:01:38.083 : (19048) Info   : WD   : Uptime 2  ConnectFailures 0 FreeMem 19184 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:02:08.083 : (19048) Info   : WD   : Uptime 2  ConnectFailures 0 FreeMem 19184 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:02:38.083 : (18320) Info   : WD   : Uptime 3  ConnectFailures 0 FreeMem 18456 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:03:07.025 : (18480) Error  : MQTT : Connection lost, state: Disconnected
00:03:07.093 : (17392) Info   : MQTT : Connected to broker with client ID: ESP_FFHomeNet_2_2
00:03:07.098 : (15768) Info   : Subscribed to: ESPs/ESP_FFHomeNet_2/#
00:03:08.084 : (18208) Info   : WD   : Uptime 3  ConnectFailures 0 FreeMem 18344 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:03:38.084 : (18320) Info   : WD   : Uptime 4  ConnectFailures 0 FreeMem 18456 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:04:08.084 : (16720) Info   : WD   : Uptime 4  ConnectFailures 0 FreeMem 16856 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:04:38.084 : (16720) Info   : WD   : Uptime 5  ConnectFailures 0 FreeMem 16856 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:04:43.025 : (18376) Error  : MQTT : Connection lost, state: Disconnected
00:04:43.118 : (17392) Info   : MQTT : Connected to broker with client ID: ESP_FFHomeNet_2_2
00:04:43.124 : (15768) Info   : Subscribed to: ESPs/ESP_FFHomeNet_2/#
00:05:08.083 : (18320) Info   : WD   : Uptime 5  ConnectFailures 0 FreeMem 18456 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:05:31.025 : (19208) Error  : MQTT : Connection lost, state: Disconnected
00:05:31.097 : (18280) Info   : MQTT : Connected to broker with client ID: ESP_FFHomeNet_2_2
00:05:31.103 : (16656) Info   : Subscribed to: ESPs/ESP_FFHomeNet_2/#
00:05:38.083 : (19208) Info   : WD   : Uptime 6  ConnectFailures 0 FreeMem 19344 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:06:07.026 : (19344) Error  : MQTT : Connection lost, state: Disconnected
00:06:07.094 : (18280) Info   : MQTT : Connected to broker with client ID: ESP_FFHomeNet_2_2
00:06:07.100 : (16656) Info   : Subscribed to: ESPs/ESP_FFHomeNet_2/#
00:06:08.083 : (19208) Info   : WD   : Uptime 6  ConnectFailures 0 FreeMem 19344 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:06:38.083 : (19208) Info   : WD   : Uptime 7  ConnectFailures 0 FreeMem 19344 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:07:08.083 : (19208) Info   : WD   : Uptime 7  ConnectFailures 0 FreeMem 19344 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:07:36.935 : (17856) Error  : MQTT : Connection lost, state: Disconnected
00:07:37.004 : (16792) Info   : MQTT : Connected to broker with client ID: ESP_FFHomeNet_2_2
00:07:37.010 : (15168) Info   : Subscribed to: ESPs/ESP_FFHomeNet_2/#
00:07:38.083 : (17720) Info   : WD   : Uptime 8  ConnectFailures 0 FreeMem 17856 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:08:08.083 : (17856) Info   : WD   : Uptime 8  ConnectFailures 0 FreeMem 17992 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:08:37.012 : (17192) Error  : MQTT : Connection lost, state: Disconnected
00:08:37.086 : (16128) Info   : MQTT : Connected to broker with client ID: ESP_FFHomeNet_2_2
00:08:37.091 : (14504) Info   : Subscribed to: ESPs/ESP_FFHomeNet_2/#
00:08:38.083 : (17056) Info   : WD   : Uptime 9  ConnectFailures 0 FreeMem 17192 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:09:08.083 : (17360) Info   : WD   : Uptime 9  ConnectFailures 0 FreeMem 17496 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:09:38.083 : (15656) Info   : WD   : Uptime 10  ConnectFailures 0 FreeMem 15792 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:09:43.025 : (17496) Error  : MQTT : Connection lost, state: Disconnected
00:09:43.096 : (16432) Info   : MQTT : Connected to broker with client ID: ESP_FFHomeNet_2_2
00:09:43.101 : (14808) Info   : Subscribed to: ESPs/ESP_FFHomeNet_2/#
00:10:07.026 : (17496) Error  : MQTT : Connection lost, state: Disconnected
00:10:07.104 : (16432) Info   : MQTT : Connected to broker with client ID: ESP_FFHomeNet_2_2
00:10:07.110 : (14808) Info   : Subscribed to: ESPs/ESP_FFHomeNet_2/#
00:10:08.083 : (17360) Info   : WD   : Uptime 10  ConnectFailures 0 FreeMem 17496 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
00:10:38.083 : (17312) Info   : WD   : Uptime 11  ConnectFailures 0 FreeMem 17448 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init


TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP 8266 D1 Mini WLAN Problems?

#5 Post by TD-er » 19 Nov 2024, 21:59

That's a rather 'stable' interval when the connection gets lost.

Sounds like either a TTL/keep alive which is not agreed upon on both sides, or maybe some acknowledgement from the broker to the ESP gets lost somehow (or the other way around).

Can you enable Gratuituous ARP on the tools->Advanced page?

I also notice you are using static IP.
Is it possible to try DHCP?

hotspot_2
Normal user
Posts: 32
Joined: 09 Dec 2022, 21:43

Re: ESP 8266 D1 Mini WLAN Problems?

#6 Post by hotspot_2 » 19 Nov 2024, 22:10

I activated Gracious ARP and DHCP. It's not getting better. Still many pings without answer.

I also changed to another D1 Mini, with the same configuration nothing changed. I use six more D1 Mini in the same area of my house and all have no pings or performance problems. The webinterface is also very slow on the D1 Mini with the problems.

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP 8266 D1 Mini WLAN Problems?

#7 Post by TD-er » 19 Nov 2024, 22:39

Can you force 802.11b/g mode (also on tools->Advanced page)
Make sure the access point allows clients to use 'g' mode and not just "N-only".

hotspot_2
Normal user
Posts: 32
Joined: 09 Dec 2022, 21:43

Re: ESP 8266 D1 Mini WLAN Problems?

#8 Post by hotspot_2 » 20 Nov 2024, 13:28

I just did these changes, but the ping behaviour did not change. Still many timeouts und really long delays.

All ESPs, i use, are connected to the same Access Point (Fritz, MESH WLAN) and all others work perfectly. No Timouts in the pings, normal mqtt connection and they deliever measuring data really good. But the one ESP does not.
d1_mini_io.jpg
d1_mini_io.jpg (18.69 KiB) Viewed 1120 times
d1_mini_problem.jpg
d1_mini_problem.jpg (21.7 KiB) Viewed 1120 times
I just recognized a difference beetween the ESPs (working frist picture / not working second picture). Could this be an information that could help why this happens?

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP 8266 D1 Mini WLAN Problems?

#9 Post by TD-er » 20 Nov 2024, 13:35

I do see '802.11n' in the screenshots. Are you sure it did connect using '802.11g' ?
N.B. if the ESP cannot connect for X attempts using forced 'g' mode, it will switch to 'n' mode.

Do you have your AP configured to use 'hidden SSID' ?

The reason why I suggested to use 'g' mode is that this also tells the AP not to use those newer features like band steering or forcing a node to rescan to connect to another AP which may be less busy.

Can you also try enabling "Extra Wait WiFi Connect" (tools->Advanced)

Is ECO mode enabled? If so, please disable it.
How strong is the signal of this ESP as seen from the AP's web interface?
You can try to enable "Send With Max TX Power" or increase the "WiFi Sensitivity Margin".

hotspot_2
Normal user
Posts: 32
Joined: 09 Dec 2022, 21:43

Re: ESP 8266 D1 Mini WLAN Problems?

#10 Post by hotspot_2 » 20 Nov 2024, 22:26

Thanks!

Connection with 802.11g now works. It suddenly got much better wenn I turned on the option "Send with Max TX Power". No timeouts anymore.

Should i switch to 802.11g and "Send with Max TX Power" on all my ESPs?

User avatar
Ath
Normal user
Posts: 4008
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP 8266 D1 Mini WLAN Problems?

#11 Post by Ath » 20 Nov 2024, 22:35

hotspot_2 wrote: 20 Nov 2024, 22:26 Should i switch to 802.11g and "Send with Max TX Power" on all my ESPs?
If it's needed to get a stable connection, then enable that. If it currently works as intended, and without failures, there's no need to enable these settings.

Most likely the new ESP either has a bad antenna, or the WiFi signal is disturbed/reduced in some way, maybe from a (large) metal object, thick wall(s), or a body of water like a fish tank, nearby or in the line-of-sight to the WiFi router.
Sometimes re-orienting the ESP by 90 degrees in position can improve the signal quality dramatically.

What value do you see for the RSSI?
/Ton (PayPal.me)

hotspot_2
Normal user
Posts: 32
Joined: 09 Dec 2022, 21:43

Re: ESP 8266 D1 Mini WLAN Problems?

#12 Post by hotspot_2 » 20 Nov 2024, 22:45

d1_mini_wg.jpg
d1_mini_wg.jpg (19.3 KiB) Viewed 1045 times

TD-er
Core team member
Posts: 9360
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP 8266 D1 Mini WLAN Problems?

#13 Post by TD-er » 21 Nov 2024, 00:07

There is no "one setting fits all" and thus there is also not a generic "enable sending at max TX" magic fix for all.

For example if your signal gets attenuated due to lots of obstacles inbetween ESP and AP, then it would help to increase TX power.
However if this attenuation is caused by metal or a badly tuned antenna (or detuned antenna due to materials close to the antenna), then increasing TX power may make it even worse.

Typically the attenuation from ESP to AP is about the same as from AP to ESP.
So the RSSI measured on the ESP should be somewhat similar to the RSSI reported on the AP for that ESP device.
The "sensitivity margin" is about the difference between those RSSI values.
ESPEasy will try to reduce TX power when the RSSI indicates a strong signal.
However if the attenuation differs a lot per direction (ESP -> AP and vice verse), then the resulting TX power will be too low.
By increasing the 'sensitivity margin', you tell the ESP to stay at a higher minimal TX power.

I think the 802.11g mode is the most helpful here, but it can certainly help to send with a bit more TX power.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests