Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiFi issue still exists #2202

Open
4 tasks done
SteffenR87 opened this issue Aug 10, 2024 · 85 comments
Open
4 tasks done

WiFi issue still exists #2202

SteffenR87 opened this issue Aug 10, 2024 · 85 comments
Labels
bug Something isn't working

Comments

@SteffenR87
Copy link

What happened?

Well I was affected with previous release WiFi disconnect. Two days ago I updated to latest version and today 4pm I had the same kind of disconnect. Reboot and back online.

To Reproduce Bug

I will wait if it happens in 2 days time again

Expected Behavior

Stable WiFi connection

Install Method

Pre-Compiled binary from GitHub

What git-hash/version of OpenDTU?

Latest

Relevant log/trace output

No response

Anything else?

No response

Please confirm the following

  • I believe this issue is a bug that affects all users of OpenDTU, not something specific to my installation.
  • I have already searched for relevant existing issues and discussions before opening this report.
  • I have updated the title field above with a concise description.
  • I have double checked that my inverter does not contain a W in the model name (like HMS-xxxW) as they are not supported
@SteffenR87 SteffenR87 added the bug Something isn't working label Aug 10, 2024
@zarzak12
Copy link

I have the same problem

@stefan123t
Copy link

Can you provide your actual version number ?

@zarzak12
Copy link

zarzak12 commented Aug 11, 2024

Can you provide your actual version number ?

V24.8.5

With each daily reboot I lose the Wi-Fi connection, I am forced to disconnect/reconnect it so that it connects

@xyCommander
Copy link

Hey. Ich hatte leider keine Zeit die letzten Tage um mich zu registrieren genau das zu melden: der Fehler existiert in der 24.8.5 definitiv immer noch. Ich muss seit der 24.8.1 jedem Tag einmal den Stecker ziehen, da die Weboberfläche nicht mehr antwortet und der HAss via Mqtt keine Daten mehr empfängt. Eine Ursache ist für mich ehrlich gesagt nicht erkennbar. Die Opendtu hat artig um 05:51:36 angefangen Daten zu senden und um 09:16:52 gestoppt. Der Router läuft durchgängig, am Netzwerkaufbau hat sich seit Monaten nichts geändert.

@Omega13x
Copy link

Omega13x commented Aug 11, 2024

Also ich habe keine Probleme. Meine DTU läuft auch mit der 24.8.5 stabil und ist jederzeit erreichbar. Ich habe drei WR eingetragen, von denen zwei über HA dynamisch geregelt werden. Ich habe eine selbstgebastelte DTU mit einem ESP32 S3, einem NRF24 und ein 2,42" Display.

@ckbaxter
Copy link

Ich kann das Problem bestätigen, alle paar Tage muss ich meine openDTU neustarten, weil nicht mehr erreichbar.
Version 24.8.5

@Juergen2453
Copy link

Wie @Omega13x schon geschrieben hat, habe ich auch keine Probleme mit der V24.8.5.
Auch wenn ich den WLAN-Router aus und einschalten Er verbindet sich immer wieder sauber mit dem WLAN.
Betriebszeit 7 Tage 00:20:14
Zum Testen würde ich doch einfach mal wenn der Fehler wieder auftritt,
openDTU eingeschaltet lassen und den WLAN-Router aus und einschalten ob die DTU sich dann wieder verbindet.

@xyCommander
Copy link

Zum Testen würde ich doch einfach mal wenn der Fehler wieder auftritt, openDTU eingeschaltet lassen und den WLAN-Router aus und einschalten ob die DTU sich dann wieder verbindet.

Gute Idee! Ich berichte dann

@travor05
Copy link

Seit dem neuesten Update habe ich auch WiFi Probleme. Mit der vorherigen hatte ich die nie.

@Juergen2453
Copy link

@travor05
Schön wäre es "neuesten Update" welche Version ?
"vorherigen hatte ich die nie" welche Version ?

@mroenne2022
Copy link

Bei mir tritt das Problem seit der Version v24.8.5 auch NICHT mehr auf, bei der vorherigen Version v24.8.1 hatte ich es auch mal nach Router Neustart. Hab einen ESP32 (ESP32-D0WD-V3) in Betrieb mit 3 WR (HM Serie), ansonsten nichts besonderes - lese die Daten nur über die WebGUI aus.

@jstammi
Copy link
Contributor

jstammi commented Aug 13, 2024

Ad 1: die Änderung in openDTU für die WIFI Verbindung ist, daß jetzt immer ein komplett neuer Verbindungsaufbau erzwungen wird bei openDTU (Re-)Boot und Neu-Verbindung zum AP nach einem Verbindungsverlust. Vorher hat sich openDTU nicht wieder mit dem AP (falls mehere APs: dem selben, idR besten) verbinden können ohne Power-Cycle, d.h. Trennung von der Stromversorgung (der AP nutzt einen neues "Association Packet" für den Verbindungsaufbau, openDTU hat immer an dem einmal für diesen AP festgelegten festgehalten - zu sehen im Serial Log)

Falls diese Änderung bei jemandem zu einer Verschlechterung führt ... kommen wir da IMHO nur mit einem Serial Log weiter (AFAIR sind nur dort die dafür relevanten Log Meldungen zu sehen). Oder einer ausreichend exakten Beschreibung, wie es dazu gekommen ist, so daß das reproduziert werden könnte. "Geht nicht mehr" hilft da meistens leider nicht.

Ad 2: es gibt IMHO mehr mögliche Ursachen für WIFI Probleme als obiges.

Da sind konkurrierende Netze der Nachbarn. Was evtl wieder das Verhalten des APs beeinflussen kann. Ich habe keine Erfahrung damit, ob zB die Fritzbox den Kanal mal wechselt. Und wie openDTU damit dann klarkommt (Erwartung: neuerdings verbindet sie sich wieder, früher nicht). Meine 3 APs nutzen feste Kanäle, da passiert das nicht.

Eine generell eher schlechte WIFI Verbindung.

Ich hatte auch schon ein "schlechtes" Kabel (fast-kabelbruch), wodurch geringste Lageänderung einen bedeutenden Unterschied ausmachte.

"Gefühlt" hat auch die Auslastung der Funkverbindungen eine Rolle gespielt - nicht nur WIFI, auch die zum WR. Habe das aber nie weiter gezielt untersucht, weil nach Kabel-Wechsel und dem eingangs beschriebenen WIFI Patch ich keine Probleme mehr habe.
Aber ich könnte mir vorstellen, dass wenn der WR nicht/schlecht erreichbar ist (=>vermutlich erhöhtes Funken wg Wdh => höhere Auslastung des ESP) plus die WIFI Verbindung in seiner Qualität variiert, daß da eine Grenze überschritten wird, dass MQTT plus für jeden Client im Browser per Websocket die Daten nicht mehr in-Time weitergereicht werden können ... kA wie sich das dann auswirken könnte, aber ein "Abhängen" eines/der Clients klingt für mich zumindest plausibel ... ?

PS: falls die WR Funkverbindung wackelig ist und meine Vermutung am Ende plausibel erscheint ... kenne ich mind 3 Ansatzpunkte: der Kondensator zum Funkchip (die Beschreibung dafür ist glaube ich ein wenig versteckt nach dem Umbau der GitHub Seiten), das Netzteil an sich (beides aus persönlicher Erfahrung) und die Funkfrequenz (hier in anderen Issues jetzt mehrmals erwähnt worden)

@xyCommander
Copy link

Was ist ein Serial Log und wie kommt man da ran?

Zur Reproduzierbarkeit: es gibt keine Änderungen im Umfeld, keine neuen Wlans, nichts umgebaut oder was weiß ich. Seit Oktober ist alles wie gehabt, jetzt kommt ein Update (bzw. zwei) und ja: es geht halt nicht mehr. Ich bin kein Programmierer oder was weiß ich, tut mir leid.

Andere Frage: Kann man über die Update-Funktion eine ältere Version hochladen als Rollback, ohne das was kaputt geht? Würde meine Anlage gerne vernünftig nutzen können...

@mroenne2022
Copy link

@xyCommander , ja man kann eine ältere Version über die Updatefunktion im Menue installieren, z.B. die Version vom 29.6. 24 ! "Kaputt" gehen sollte nichts, die Einstellungen bleiben erhalten wie bei einem Update auf eine höhere Version.
Hier findest du die Versionen : https://github.com/tbnobody/OpenDTU/releases

@jstammi
Copy link
Contributor

jstammi commented Aug 13, 2024

@xyCommander Serial Log = die serielle Schnittestelle (=einige PINs) des ESP mit dem Computer verbinden, meistens über einen USB-Serial Adapter

Und die ältere Version wieder draufspielen ist schon mal eine gute Idee. Bin gespannt, ob es danach wieder stabil ist.

Vielleicht noch am AP dazu beobachten, ob es da Kanal Wechsel für das 2,4GHz WLAN gibt

@stefan123t
Copy link

@SteffenR87 you wanted to give us feedback on your issue after two days.
Anything new, is it fixed with v24.08.05 or do you still have WiFi issues as others have reported as well ?

Please consider posting a Serial Log covering the time (from start) when it is still working until the OpenDTU looses the WiFi connection in order for us to analyze the issue more closely.
You should use the Slash Commands [/] Details and [/] Code Block to format the log file, if you do not attach it as a file.

@travor05
Copy link

@Juergen2453
Was ist den die aktuellste? 24.8.5 oder gibt es was neueres?
Die vorher war die 24.8.1 dann logischerweise

@Juergen2453
Copy link

@travor05
Die v24.8.5 ist OK
Die v24.8.1 hatte einen WLAN Fehler
Die v24.6.29 ist OK
Du kannst ja auf eine ältere Version Testweise zurück gehen.
https://github.com/tbnobody/OpenDTU/releases

@SteffenR87
Copy link
Author

@SteffenR87 you wanted to give us feedback on your issue after two days. Anything new, is it fixed with v24.08.05 or do you still have WiFi issues as others have reported as well ?

Please consider posting a Serial Log covering the time (from start) when it is still working until the OpenDTU looses the WiFi connection in order for us to analyze the issue more closely. You should use the Slash Commands [/] Details and [/] Code Block to format the log file, if you do not attach it as a file.

Hi Stefan, unfortunately still same issue with a disconnect after around 2 days. Using a fusion board. I am using Fritzbox cable 6490 and mesh network Fritz2400 Repeater.

@stefan123t
Copy link

@SteffenR87 thanks for the feedback and the confirmation that it may have something to do with either Fritz Mesh Network and or the Fritz Repeater in conjunction with the OpenDTU WiFi connecting to either of the two Access Points in your WLAN.
Can you double check the points that @jstammi mentioned, i.e.

  1. can you check to which of the two APs your OpenDTU is connected usually (Router/Repeater) according to Serial logs or Fritz logs.
  2. fix your network device to a dedicated 2.4GHz channel, the ESP32 will not be able to connect to 5GHz.
  3. verify that your NRF/CMT radio modules have the recommended 47/100uF condensator
  4. use a proven and beefy PSU for your setup
  5. check the frequency used by your DTU, e.g. in WLAN range Fritz may free some channels for Airplanes / AIS transponders.
  6. collect serial logs of the event that renders the DTU unreachable. This works on a PC/Laptop using the USB Serial Console.

@stefan123t
Copy link

stefan123t commented Aug 13, 2024

@SteffenR87 do you have MQTT connected and can you check the BSSID value of your WiFi STAtion to which the OpenDTU is connected to ?
You may also see that under Info > Network under WiFi Information (Station): BSSID once you are connected to the OpenDTU UI.

@jstammi I came across the following threads:

Optimizing ESP32 Connections with WiFiMulti
https://thelinuxcode.com/strongest-wifi-network-wifimulti-esp32/

Establish WiFi connection to AP with strongest radio signal
https://esp32.com/viewtopic.php?f=19&t=18979

WIFI_ALL_CHANNEL_SCAN, this parameter doesn't seem to work (IDFGH-6630) #8269
espressif/esp-idf#8269

So basically they recommend to use WiFiMulti instead of WiFi as the reconnect time may be lower and it may even handle multiple APs with the same SSID more graceously.
Apart from that the closed issue on the esp-idf has some instructions on how to trace the issue, e.g. under Linux:

ifconfig down
iwconfig mode monitor
ifconfig up
iwconfig channel 7
wireshark

I for once only have a single Fritz!Box and no Repeaters, hence there are no potential problems with duplicate SSIDs but unique BSSIDs nor do afaik I have Fritz!Mesh enabled.

@jstammi
Copy link
Contributor

jstammi commented Aug 14, 2024 via email

@stefan123t
Copy link

@jstammi wouldnt it make sense to re-evaluate the reachable APs from time to time ? Afaik most examples i read do that every 30 seconds, though it may be sufficient every 1-5 Minutes as we got other work to do with the DTU.
Also I understood that getting a new connection with WiFiMulti goes down to 1/2s from 6-8s using WiFi.

@travor05
Copy link

travor05 commented Aug 14, 2024

@Juergen2453
Bin gestern nach meinem Post auch wieder auf die 24.8.1 zurück. Seitdem hängt sich der esp ständig auf. Er zeigt zwar das webinderface kann aber nichts mehr anklicken. Wie eingefroren.

@stefan123t
Copy link

@travor05 die v24.08.01 hat einen bekannten Fehler der in v24.08.05 behoben wurde. Bitte entweder die aktuelle Version oder die v24.06.29 verwenden. Das Problem ist ja bekannt und wurde in #2185 hinlänglich beschrieben.

@ComGreed
Copy link

ComGreed commented Aug 14, 2024

My Setup:

  • OpenDTU v24.8.5
  • FRITZ!Box 7590 with FRITZ!OS 7.90-115052 BETA
  • FRITZ!Repeater 6000
  • both devices connected in a mesh
  • 2.4 and 5 GHz wifi enabled
  • 2.4 GHz fixed channel, 5 GHz auto channel

Timeline:

  • ~06:19:24: FRITZ!Box firmware update start (timestamp guessed)
  • 06:19:41: OpenDTU connects to repeater (2.4 GHz)
  • 06:20:54: FRITZ!Box firmware update and restart complete
  • 06:21:11: OpenDTU disconnects from repeater (2.4 GHz)
  • 06:21:23: 5 GHz disabled because of Radar-priority
  • 06:22:48: the first device reconnects to the router over wifi
  • no wifi connection attempt logged on the router so far

Side note:
Because of the thunderstorm yesterday I disconnected my inverter from the grid and reconnected it at ~10am but this shouldn't have anything to do with the wifi connection.

@jstammi
Copy link
Contributor

jstammi commented Aug 14, 2024 via email

@jstammi
Copy link
Contributor

jstammi commented Aug 14, 2024 via email

@stefan123t
Copy link

stefan123t commented Aug 14, 2024

@ComGreed thanks for your review and the write up of your affected setup.
This helps us to identify that it has indeed something to do with the Fritz!Box and at least one Fritz!Repeater in Fritz!Mesh mode.
Actually the combination of roaming 802.11k and management 802.11v is described as "Mesh Steering" on their website:

What is Mesh Wi-Fi steering and how does it work?
https://en.avm.de/service/knowledge-base/dok/FRITZ-Box-7590/3515_What-is-Mesh-Wi-Fi-steering-and-how-does-it-work/

AVM erklärt WLAN Mesh Steering
https://avm.de/ratgeber/avm-erklaert-wlan-mesh-steering/

@jstammi I just found another thread which talks about 802.11k, 802.11r and 802.11v Support in ESP-IDF and points to the following issue about 802.11r support and WiFi roaming, which seems to be a pre-requisite.

ESP32 Fritz!Box-Mesh = same SSID for router & repeater force connecting to a certain MAC-Adress?
https://forum.arduino.cc/t/esp32-fritz-box-mesh-same-ssid-for-router-repeater-force-connecting-to-a-certain-mac-adress/1160028/2

Does ESP32 support seamless Wi-Fi roaming (IEEE 802.11v, r, k) in the STA mode? (IDFGH-1392)
#3671

espressif/esp-idf#3671

Effectively the discussion is about the two roaming example's in the EPS-IDF: https://github.com/espressif/esp-idf/tree/master/examples/wifi/roaming

Actually both 802.11k and 802.11r are necessary for seamless Basic Service Set (BSS) transitions aka roaming:

Here is a more detailled write up of the communication flows from Cisco:

802.11r BSS Fast Transition Deployment Guide
https://www.cisco.com/c/en/us/td/docs/wireless/controller/technotes/80211r-ft/b-80211r-dg.html

@CommanderROR9
Copy link

That would be an easy test IMHO..add an optional "ping heartbeat" setting. In my case I would just ping the Router 192.168.178.1 since that should always be Online

@stefan123t
Copy link

stefan123t commented Sep 2, 2024

I don't say it would be the best solution, but couldn't it at least help alleviate the problem until proper k/r/v is implemented.

k/r/v has to be implemented in the Arduino core. This is nothing which can be done in user space. Checking whether the connection is established is indeed already done. Its not done per interval its done event based. The IDF/Arduino core sends a disconnect event. Then the connection will be re-established. In this case you should also see an console output. It this does not happen, it's a bug in the Arduino Core.

@tbnobody did you look into the ESP-IDF example code for 802.11k/r/v mesh steering?

https://github.com/espressif/esp-idf/tree/master/examples/wifi/roaming

Maybe it is not yet implemented in the Arduino core which OpenDTU builds rely on.

But on another thought maybe the events and processes of switching the STA from one of these BSSIDs to another BSSID allow us to determine which event may be missing / needs to be changed to make it work in Arduino/OpenDTU too ?

https://github.com/espressif/esp-idf/blob/6673376297b921d438790d195014b860eaf8bb17/examples/wifi/roaming/roaming_11kvr/main/roaming_example.c#L48-L55

Here they explicitly distinguish the disconnect reason WIFI_REASON_ROAMING:

    } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
        wifi_event_sta_disconnected_t *disconn = event_data;
        ESP_LOGI(TAG, "station got disconnected reason=%d", disconn->reason);
        if (disconn->reason == WIFI_REASON_ROAMING) {
            ESP_LOGI(TAG, "station roaming, do nothing");
        } else {
            esp_wifi_connect();
        }

@tbnobody
Copy link
Owner

tbnobody commented Sep 2, 2024

Currently I don't care about the disconnect reason. If a disconnect is received I just try to reconnect:

case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
MessageOutput.println("WiFi disconnected");
if (_networkMode == network_mode::WiFi) {
MessageOutput.println("Try reconnecting");
WiFi.disconnect(true, false);
WiFi.begin();
raiseEvent(network_event::NETWORK_DISCONNECTED);
}
break;

But that leads again to my request of a console output in case of a reconnect... Do you see a WiFi disconnected disconnected in the serial console if the issue occurs?

@jonastr
Copy link

jonastr commented Sep 2, 2024

@tbnobody I would be happy to try to provide some logs. Unfortunately, I am not sure I have the means to retrieve the serial log. Did a bit of googling, returned various results, all with some gaps in the instructions, I feel.

The best resource I could find is this one: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/establish-serial-connection.html. But it's still pretty vague, not sure what to do exactly for the board that I have.

Do you have any better resources/howtos at hand?

@tbnobody
Copy link
Owner

tbnobody commented Sep 2, 2024

Do you have any better resources/howtos at hand?

https://www.opendtu.solar/firmware/howto/serial_console/

@schneeer
Copy link

schneeer commented Sep 2, 2024

Hi,
I am following the topic with interest.
Just a little update on my setup.
I will then leave the field here to the specialists.

For most, WLAN shouldn't cause any problems, unless there are only a handful of openDTUs.

My DTU has been running completely error-free for almost 23 days since the update to v24.8.5.

Connection characteristics: Wi-Fi 4, 20 MHz, WPA3, 1 x 1

FRITZ!Box 7590, FRITZ!OS: 7.90-115394 BETA
1 repeater 2400 as a LAN bridge, connected to the FB
1 repeater 1750E as a LAN bridge, connected to the FB
1 repeater 1750E as a WLAN bridge, connected to the 1st 1750E

Band and mesh steering are active
WLAN auto channel is active

2.4 GHz currently on channel 1
5 GHz currently on channel 36

At the moment the DTU (OpenOTU-BW) was directly connected to FRITZ!Box. (As can be seen in the picture.)
I have now restarted it and it is now connected to the 2nd 1750E repeater (WLAN bridge).
In the evening, however, the electricity is switched off at 2nd 1750E, for personal reasons to protect the neighbors from noise. The DTU would definitely have to rebook again.
I just simulated this by turning the fuse off and on. After 2 minutes the DTU on the 1st 1750E was online again.

I'm watching this.
If any unusual behavior turns out, I will report it.
Screenshot 2024-09-02 135032

@stefan123t
Copy link

stefan123t commented Sep 2, 2024

@schneeer please consider providing us with a detailled serial log as requested:

console output in case of a reconnect...
Do you see a WiFi disconnected in the serial console if the issue occurs?

Follow the link to the documentation to setup for USB / serial logging:
https://www.opendtu.solar/firmware/howto/serial_console/

@tbnobody would it be possible to add the disconnect reason to the logging somehow ?

I searched in arduino-esp32 and found the following issue for WiFi Roaming:

espressif/arduino-esp32#7921

it enables the following four options in the PR:

espressif/esp32-arduino-lib-builder#160

CONFIG_ESP_WIFI_11KV_SUPPORT=y
CONFIG_ESP_WIFI_SCAN_CACHE=y
CONFIG_ESP_WIFI_MBO_SUPPORT=y
CONFIG_ESP_WIFI_11R_SUPPORT=y

@schneeer
Copy link

schneeer commented Sep 2, 2024

Yes, I can do that, but as I said, to date the DTU has run without any errors for 23 days without (Wifi) interruption. I have no problems.
I only wrote my post because I read here that the FRITZ!Box Mesh could be the cause. That doesn't apply to me.

I can relatively easily deactivate every WLAN AP in the mesh to which the DTU is currently connected.

The 1st Test

  • DTU currently connected to 1. 1750E (LAN bridge).
  • Repeater switched off
  • After what felt like 20 seconds the DTU was back on the FRITZ!Box, this time connected to the FRITZ!Box.
  • And after a little while the DTU was also voluntarily connected to the currently open browser.
    Disconnects and reconnects can be seen in the log.
  • The log:
PuTTY log 2024.09.02 20:11:07

TX RealTimeRunData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D5 FF F2 00 00 00 00 00 00 00 00 DA B8 DB RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D5 FF F2 00 00 00 00 00 00 00 00 DA B8 DB RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D5 FF F2 00 00 00 00 00 00 00 00 DA B8 DB RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D5 FF F2 00 00 00 00 00 00 00 00 DA B8 DB RX Period End All missing Nothing received, resend count exeeded TX AlarmData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF F2 00 00 00 00 00 00 00 00 00 A3 00 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF F2 00 00 00 00 00 00 00 00 00 A3 00 **_WiFi disconnected_** **_Try reconnecting_** **_Websocket: [/livedata][1] disconnect_** RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF F2 00 00 00 00 00 00 00 00 00 A3 00 **_Network lost connection_** RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF F2 00 00 00 00 00 00 00 00 00 A3 00 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF F2 00 00 00 00 00 00 00 00 00 A3 00 RX Period End All missing Nothing received, resend count exeeded TX SystemConfigPara Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF F2 00 00 00 00 00 00 00 00 14 B7 14 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF F2 00 00 00 00 00 00 00 00 14 B7 14 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF F2 00 00 00 00 00 00 00 00 14 B7 14 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF F2 00 00 00 00 00 00 00 00 14 B7 14 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF F2 00 00 00 00 00 00 00 00 14 B7 14 RX Period End All missing Nothing received, resend count exeeded Fetch inverter: 116174406658 Request SystemConfigPara TX RealTimeRunData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D5 FF FA 00 00 00 00 00 00 00 00 1A DF 74 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D5 FF FA 00 00 00 00 00 00 00 00 1A DF 74 **_WiFi connected_** RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D5 FF FA 00 00 00 00 00 00 00 00 1A DF 74 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D5 FF FA 00 00 00 00 00 00 00 00 1A DF 74 **_WiFi got ip: 192.168.2.15_** **_Network connected_** RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D5 FF FA 00 00 00 00 00 00 00 00 1A DF 74 RX Period End All missing Nothing received, resend count exeeded TX AlarmData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF FA 00 00 00 00 00 00 00 00 C0 C4 AF RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF FA 00 00 00 00 00 00 00 00 C0 C4 AF RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF FA 00 00 00 00 00 00 00 00 C0 C4 AF RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF FA 00 00 00 00 00 00 00 00 C0 C4 AF RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D5 FF FA 00 00 00 00 00 00 00 00 C0 C4 AF RX Period End All missing Nothing received, resend count exeeded TX SystemConfigPara Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF FA 00 00 00 00 00 00 00 00 D4 D0 BB RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF FA 00 00 00 00 00 00 00 00 D4 D0 BB RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF FA 00 00 00 00 00 00 00 00 D4 D0 BB RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF FA 00 00 00 00 00 00 00 00 D4 D0 BB RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D5 FF FA 00 00 00 00 00 00 00 00 D4 D0 BB RX Period End All missing Nothing received, resend count exeeded Fetch inverter: 116174406658 Request SystemConfigPara TX RealTimeRunData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 02 00 00 00 00 00 00 00 00 69 86 5A RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 02 00 00 00 00 00 00 00 00 69 86 5A RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 02 00 00 00 00 00 00 00 00 69 86 5A RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 02 00 00 00 00 00 00 00 00 69 86 5A RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 02 00 00 00 00 00 00 00 00 69 86 5A RX Period End All missing Nothing received, resend count exeeded TX AlarmData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 02 00 00 00 00 00 00 00 00 B3 9D 81 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 02 00 00 00 00 00 00 00 00 B3 9D 81 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 02 00 00 00 00 00 00 00 00 B3 9D 81 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 02 00 00 00 00 00 00 00 00 B3 9D 81 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 02 00 00 00 00 00 00 00 00 B3 9D 81 RX Period End All missing Nothing received, resend count exeeded TX SystemConfigPara Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 02 00 00 00 00 00 00 00 00 A7 89 95 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 02 00 00 00 00 00 00 00 00 A7 89 95 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 02 00 00 00 00 00 00 00 00 A7 89 95 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 02 00 00 00 00 00 00 00 00 A7 89 95 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 02 00 00 00 00 00 00 00 00 A7 89 95 RX Period End All missing Nothing received, resend count exeeded Fetch inverter: 116174406658 Request SystemConfigPara TX RealTimeRunData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 0A 00 00 00 00 00 00 00 00 A9 E1 F5 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 0A 00 00 00 00 00 00 00 00 A9 E1 F5 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 0A 00 00 00 00 00 00 00 00 A9 E1 F5 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 0A 00 00 00 00 00 00 00 00 A9 E1 F5 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 0A 00 00 00 00 00 00 00 00 A9 E1 F5 RX Period End All missing Nothing received, resend count exeeded TX AlarmData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 0A 00 00 00 00 00 00 00 00 73 FA 2E RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 0A 00 00 00 00 00 00 00 00 73 FA 2E RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 0A 00 00 00 00 00 00 00 00 73 FA 2E RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 0A 00 00 00 00 00 00 00 00 73 FA 2E RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 0A 00 00 00 00 00 00 00 00 73 FA 2E RX Period End All missing Nothing received, resend count exeeded TX SystemConfigPara Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 0A 00 00 00 00 00 00 00 00 67 EE 3A RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 0A 00 00 00 00 00 00 00 00 67 EE 3A RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 0A 00 00 00 00 00 00 00 00 67 EE 3A RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 0A 00 00 00 00 00 00 00 00 67 EE 3A RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 0A 00 00 00 00 00 00 00 00 67 EE 3A RX Period End All missing Nothing received, resend count exeeded Fetch inverter: 116174406658 Request SystemConfigPara TX RealTimeRunData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 12 00 00 00 00 00 00 00 00 A9 4B 47 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 12 00 00 00 00 00 00 00 00 A9 4B 47 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 12 00 00 00 00 00 00 00 00 A9 4B 47 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 12 00 00 00 00 00 00 00 00 A9 4B 47 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 12 00 00 00 00 00 00 00 00 A9 4B 47 RX Period End All missing Nothing received, resend count exeeded TX AlarmData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 12 00 00 00 00 00 00 00 00 73 50 9C RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 12 00 00 00 00 00 00 00 00 73 50 9C RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 12 00 00 00 00 00 00 00 00 73 50 9C RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 12 00 00 00 00 00 00 00 00 73 50 9C RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 12 00 00 00 00 00 00 00 00 73 50 9C RX Period End All missing Nothing received, resend count exeeded TX SystemConfigPara Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 12 00 00 00 00 00 00 00 00 67 44 88 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 12 00 00 00 00 00 00 00 00 67 44 88 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 12 00 00 00 00 00 00 00 00 67 44 88 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 12 00 00 00 00 00 00 00 00 67 44 88 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 12 00 00 00 00 00 00 00 00 67 44 88 RX Period End All missing Nothing received, resend count exeeded Fetch inverter: 116174406658 Request SystemConfigPara TX RealTimeRunData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 1A 00 00 00 00 00 00 00 00 69 2C E8 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 1A 00 00 00 00 00 00 00 00 69 2C E8 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 1A 00 00 00 00 00 00 00 00 69 2C E8 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 1A 00 00 00 00 00 00 00 00 69 2C E8 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 1A 00 00 00 00 00 00 00 00 69 2C E8 RX Period End All missing Nothing received, resend count exeeded TX AlarmData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 1A 00 00 00 00 00 00 00 00 B3 37 33 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 1A 00 00 00 00 00 00 00 00 B3 37 33 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 1A 00 00 00 00 00 00 00 00 B3 37 33 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 1A 00 00 00 00 00 00 00 00 B3 37 33 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 1A 00 00 00 00 00 00 00 00 B3 37 33 RX Period End All missing Nothing received, resend count exeeded TX SystemConfigPara Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 1A 00 00 00 00 00 00 00 00 A7 23 27 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 1A 00 00 00 00 00 00 00 00 A7 23 27 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 1A 00 00 00 00 00 00 00 00 A7 23 27 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 1A 00 00 00 00 00 00 00 00 A7 23 27 RX Period End All missing Nothing received, resend whole request TX SystemConfigPara Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 05 00 66 D6 00 1A 00 00 00 00 00 00 00 00 A7 23 27 RX Period End All missing Nothing received, resend count exeeded Fetch inverter: 116174406658 Request SystemConfigPara TX RealTimeRunData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 22 00 00 00 00 00 00 00 00 A8 1F 22 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 22 00 00 00 00 00 00 00 00 A8 1F 22 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 61 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 22 00 00 00 00 00 00 00 00 A8 1F 22 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 75 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 22 00 00 00 00 00 00 00 00 A8 1F 22 RX Period End All missing Nothing received, resend whole request TX RealTimeRunData Channel: 3 --> 15 74 40 66 58 80 14 20 27 80 0B 00 66 D6 00 22 00 00 00 00 00 00 00 00 A8 1F 22 **_Websocket: [/livedata][2] connect_** RX Period End All missing Nothing received, resend count exeeded TX AlarmData Channel: 23 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 22 00 00 00 00 00 00 00 00 72 04 F9 RX Period End All missing Nothing received, resend whole request TX AlarmData Channel: 40 --> 15 74 40 66 58 80 14 20 27 80 11 00 66 D6 00 22 00 00 00 00 00 00 00 00 72 04 F9 RX Period End All missing Nothing received, resend whole request

The 2nd test

  • DTU restarted, connects to 2400 (LAN bridge) within 10 seconds
  • Repeater restarted:
  • after what felt like 20 seconds, the DTU was again connected to the FRITZ!Box and the FRITZ!Box itself.
    And after a little while the DTU was also voluntarily connected to the currently open browser.
  • The log is as it was just now.
    Disconnects and reconnects can be seen in the log.

The 3rd test

  • DTU connected to FRITZ!Box
  • FRITZ!Box restarted:
  • after what feels like 2 minutes I can log in to the FRITZ!Box again.
  • the DTU is not yet visible, neither are the repeaters. The mesh is still missing from the view
  • The window can be updated in the browser, the DTU is online.
  • Checking the FRITZ!Box. The mesh is visible, this time the DTU is connected to the 2nd 1750E (WLAN_Bridge).
  • The log is as it was just now.
    Disconnects and reconnects can be seen in the log.

Edit:

Why the log is now destroyed, I have no idea.
In the preview everything was listed nicely in order.

@tbnobody
Copy link
Owner

tbnobody commented Sep 2, 2024

Yes, I can do that, but as I said, to date the DTU has run without any errors for 23 days without (Wifi) interruption. I have no problems.

Yes, same applies to me. I also cannot reproduce this issue. 11K is enabled on the relevant SSID, 11V is disabled (as I don't have any devices which support it).
And thats absolutly ok. If older devices don't support 11K, depending on the AP, they get just kicked out of one AP thinks that another one has better connection RSSI.
Background: A wifi client stays at one AP as long as it can reach it, even it finds another one with the same SSID but different BSSID. A workaround in previous days (and for compatibility reasons) was and is to kick the client from one AP and let it connect to another one. This is exactly what @schneeer describes if he turns off one repeater manually).

@tbnobody
Copy link
Owner

tbnobody commented Sep 2, 2024

@tbnobody would it be possible to add the disconnect reason to the logging somehow ?

Sure, just apply this code changes or wait for the next release:

diff --git a/include/NetworkSettings.h b/include/NetworkSettings.h
index 40ddc914..433867e9 100644
--- a/include/NetworkSettings.h
+++ b/include/NetworkSettings.h
@@ -62,7 +62,7 @@ private:
     void setStaticIp();
     void handleMDNS();
     void setupMode();
-    void NetworkEvent(const WiFiEvent_t event);
+    void NetworkEvent(const WiFiEvent_t event, WiFiEventInfo_t info);
 
     Task _loopTask;
 
@@ -85,4 +85,4 @@ private:
     bool _lastMdnsEnabled = false;
 };
 
-extern NetworkSettingsClass NetworkSettings;
\ No newline at end of file
+extern NetworkSettingsClass NetworkSettings;
diff --git a/src/NetworkSettings.cpp b/src/NetworkSettings.cpp
index 55ea428e..31313feb 100644
--- a/src/NetworkSettings.cpp
+++ b/src/NetworkSettings.cpp
@@ -23,20 +23,21 @@ NetworkSettingsClass::NetworkSettingsClass()
 void NetworkSettingsClass::init(Scheduler& scheduler)
 {
     using std::placeholders::_1;
+    using std::placeholders::_2;
 
     WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
     WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL);
 
     WiFi.disconnect(true, true);
 
-    WiFi.onEvent(std::bind(&NetworkSettingsClass::NetworkEvent, this, _1));
+    WiFi.onEvent(std::bind(&NetworkSettingsClass::NetworkEvent, this, _1, _2));
     setupMode();
 
     scheduler.addTask(_loopTask);
     _loopTask.enable();
 }
 
-void NetworkSettingsClass::NetworkEvent(const WiFiEvent_t event)
+void NetworkSettingsClass::NetworkEvent(const WiFiEvent_t event, WiFiEventInfo_t info)
 {
     switch (event) {
     case ARDUINO_EVENT_ETH_START:
@@ -76,7 +77,8 @@ void NetworkSettingsClass::NetworkEvent(const WiFiEvent_t event)
         }
         break;
     case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
-        MessageOutput.println("WiFi disconnected");
+        // Reason codes can be found here: https://github.com/espressif/esp-idf/blob/5454d37d496a8c58542eb450467471404c606501/components/esp_wifi/include/esp_wifi_types_generic.h#L79-L141
+        MessageOutput.printf("WiFi disconnected: %d\r\n", info.wifi_sta_disconnected.reason);
         if (_networkMode == network_mode::WiFi) {
             MessageOutput.println("Try reconnecting");
             WiFi.disconnect(true, false);

@schneeer
Copy link

schneeer commented Sep 2, 2024

I was interested to know whether the latest updates have led to increased DTU activity and thus increased power consumption.
It could have been that, for example, the power supply is too weak and therefore there are problems with the WLAN or problems with the connection to the inverter.

I couldn't find anything unusual.

When restarting, my DTU with display and NRF24 requires around 180 mA, and after a few seconds it only needs just under 100 mA. This is pretty much the same for several firmware versions.

So I can rule that out.

tc66c USB-C Power-Meter

@CommanderROR9
Copy link

CommanderROR9 commented Sep 3, 2024

I still can't provide any meaningful insight, but turning off "auto channel" on my FritzBox 7690 seems to have completely eliminated the issue.

Edit: I installed an Update for my Router this afternoon. At first the OpenDTU was still alive after the Update, but had connected to a different AP within the mesh. When I checked again later, the DTU had completely lost connection to the Network and never reconnected.

@Andre0be
Copy link

Andre0be commented Sep 7, 2024

I once bought an ESP32-S3 because it works better with WiFi. Yes, it's true. The S3 can handle AVM Mesh much better. I'm now going to switch to the S3 completely.

@stefan123t
Copy link

Wwe would need some more logs from any of the Mesh users posting about a problem here:

@SteffenR87 @jonastr @DietmarSi @ComGreed @CommanderROR9 @home-cloud @cortmen and whoever else still has the problem of loosing the connection with the DTU / inverter please 🙏 send us a log so we can analyse the issue in more detail.

Currently we only have anecdotal evidence that you are all plagued by this issue and it may have something to do with Mesh Roaming / Steering.
But we need logs (Oh Precious Lognuts).

Follow the link to the documentation to setup for USB / serial logging:
https://www.opendtu.solar/firmware/howto/serial_console/

PS: @Andre0be we have found out that neither our OpenDTU nor the default Arduino WiFi libraries do support 802.11r/k/v yet. That is the ESP-IDF has some example code but regardless of whether you are using the ESP32S3 or any other Espressif chip, neither will make use of these developments yet.

You may be right that ESP32S3 could be a bit better at WiFi in general eg compared with the slightly older ESP32 Wroom models but not with the above three standards on mesh roaming and steering.

@jonastr
Copy link

jonastr commented Sep 8, 2024

Wwe would need some more logs from any of the Mesh users posting about a problem here:

@SteffenR87 @jonastr @DietmarSi @ComGreed @CommanderROR9 @home-cloud @cortmen and whoever else still has the problem of loosing the connection with the DTU / inverter please 🙏 send us a log so we can analyse the issue in more detail.

Hi @stefan123t, fully understood. While I am willing to contribute, I didn't have the time yet to set everything up. It's no one's fault, but given that I need to get another machine ready to monitor the logs doesn't make it easier; I don't have one at hand. It may take some more days, perhaps weeks until I find the time. :)

In the meantime, I can report that my problems seem to have vanished for now after physically relocating the DTU very close to the main Fritzbox. This was only possible because I relocated the inverter before. In any case, I had no interruptions since multiple days after that, despite mesh steering being activated. I am pretty sure I can reproduce it in the old physical DTU location, though. So again, when I find the time, I will capture the logs.

@CommanderROR9
Copy link

So.... unfortunately I still can't provide any logs, but after having a stable connection for about a week I decided to turn the "Auto Channel" feature back on in my FritzBox and...after just an hour or so the OpenDTU lost connection again and never rejoined the Network.

@stefan123t
Copy link

@CommanderROR9 bitte die Logs dazu sonst können wir das Problem nicht analysieren. Danke!

Follow the link to the documentation to setup for USB / serial logging:
https://www.opendtu.solar/firmware/howto/serial_console/

@CommanderROR9
Copy link

@CommanderROR9 bitte die Logs dazu sonst können wir das Problem nicht analysieren. Danke!

Follow the link to the documentation to setup for USB / serial logging: https://www.opendtu.solar/firmware/howto/serial_console/

Next week I should have a little more time and will attempt to provide the logs.

@jonastr
Copy link

jonastr commented Sep 11, 2024

I am also curious about the logs!
From what you observe @CommanderROR9 and from what I have observed, I see the following pattern that is not so much related to Mesh only:
The DTU has trouble reconnecting in multiple scenarios:

  • Wifi channel change (not a Mesh-specific feature)
  • Assumed mesh steering activity from the AP (when Fritzbox Mesh steering is activated)

@cortmen
Copy link

cortmen commented Sep 12, 2024

Hi there, i have change my opendtu to esp32-s3 and a new location.
since one week no wifi disconnect with v24.8.5

@SebStaeubert
Copy link

Zum Testen würde ich doch einfach mal wenn der Fehler wieder auftritt, openDTU eingeschaltet lassen und den WLAN-Router aus und einschalten ob die DTU sich dann wieder verbindet.

Gute Idee! Ich berichte dann

Das bringt bei mir nichts. Erst mit Neustart der OpenDTU kommt wieder eine Verbindung zustande (ich habe 1+ Stunde vergeblich gewartet und gehofft, dass die Verbindung automatisch wieder hergestellt wird).

@HomeAutoUser
Copy link

@ALL, hat jemand schonmal die Terminalausgaben mitgezeichnet wenn die Verbindung abbricht?

Ich selbst war betroffen mit der Meldung #2290.
Sollten noch keine Erfahrungen vorliegen, würde ich mit einem Testaufbau an dem Device die ständige Terminalausgabe zu protokollieren. Es wäre schön, den Fehler zu finden um nicht auf der Version 24.6.29 hängen zu bleiben.

@stefan123t
Copy link

stefan123t commented Oct 11, 2024

@tbnobody how can one enable the Arduino / ESP-IDF Debugging for Network Interface.

According to this old doc on ESP8266 one has to enable some build_flags:

build_flags = -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_PORT=Serial

https://community.platformio.org/t/debugging-wificlient-with-an-esp8266-on-platformio/9891

@BoKi8123
Copy link

Hi everybody,
I have the same problem of loosing WiFi connection of my OpenDTU after some days since SW newer than v24.6.29. Until and including this release, everything worked fine for me, too. Now I had the chance to write a serial console log of the OpenDTU FW v24.10.5 over the time loosing connection. Refer to attached zip-file (myserial# masked).
In normal operation I request recent Data from Inverter every 5 seconds. It seems, that this may have al little impact on how long it took to let the OpenDTU disconnect from WiFi. When polling every 5 seconds, it took normally about 2 days loosing connection. For logging purposes I switched polling data to 60 seconds, having not too much log overhead of normal function. With this longer polling period it now took more than 5 days for OpenDTU to loose WiFi connection.
I hope this information helps to debug the root cause of the problem.

2024-10-12_044718_OpenDTU_disconnects_from_FritzBox_at_00h02
2024-10-12_050301_MQTT-Data_stops_immediatelly_after_midnight
OpenDTU-v24.10.5_console-capture_2024-10-11_04h14_until_2024-10-12_04h40_requesting_data_every_60s.zip

@BoKi8123
Copy link

According to the fix in latest FW v24.10.15 "Fix: Correct output of wifi disconnect reason code" I recorded another console log with this latest FW comprising the moment of WiFi disconnect from OpenDTU. I hope, this helps even more.
Regards
2024-10-20_182514_FritzBox_WiFi-disconnect_of_OpenDTU_16h55
2024-10-20_184223_OpenDTU_MQTT-Data_stops_at_16h55
OpenDTU_v24.10.15_console-log_2024-10-20_04h40_until_18h21_polling-5s_WiFi-disconnect-at-16h55.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests