-
Notifications
You must be signed in to change notification settings - Fork 13.3k
mDNS responder kills DHCP server on lwip v2 #6114
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
Comments
me too, thanks for the opening! |
me too, I'm facing this problem :/ |
Found a temporary solution, DO NOT USE WiFi.mode (WIFI_AP_STA), works fine in WIFI_AP or WIFI_STA |
When using both AP+STA, you need to start two different mDNS instances
and
...
Still missing:
|
I can confirm this workaround works, but... I also want to scan for available WiFi networks, which automatically switches back to WIFI_AP_STA. Mostly, I have the "configuration client" connected already when I initialize a scan, so I don't need the DHCP server anymore, but that's not a nice solution - so I'll stay with LWIP v1.4 for the time being. Updated MCVE:
But... that only works if STA is connected, right? Also why should mDNS have any influence on the DHCP server at all? Heiko |
@newHeiko I tried your MCVE in OP and the one just above (using |
No, sorry, I'm still on 2.5.2 (not 2.5.1 any more as per the OP) Will check with master next week, I need a "stable" solution over the weekend. But it would be great if this is fixed :) I'll also try explicitly specifying the WiFi.softAPIP() as you point out. Thanks, Just to clarify: Yesterday's updated MCVE only fails after the first scan reactivates STA mode. So if the client connects before and does not disconnect, the failure is dormant. |
I am using 2.5.2 and I can conform that esp AP mode(only AP) has also same issue.i have tested more than a week without restart and I found the issue. |
* Enable MDNS logs comment * Work around ESP8266 mDNS broken for AP See also esp8266/Arduino#6114 * Enable captive_portal in AP-only mode Fixes esphome/issues#671 * Make ESP32 connecting faster See also espressif/arduino-esp32#2989 * Format
* Enable MDNS logs comment * Work around ESP8266 mDNS broken for AP See also esp8266/Arduino#6114 * Enable captive_portal in AP-only mode Fixes esphome/issues#671 * Make ESP32 connecting faster See also espressif/arduino-esp32#2989 * Format
Basic Infos
Platform
Settings in IDE
Problem Description
I'm trying to connect to a WiFi on startup, wait for a timeout, then open an AP to allow the user to connect.
This works fine on lwip v1.4.
This works fine on lwip v2 Higher Bandwith with MDNS disabled (lines starting with MDNS commented out of the MCVE below)
This fails on lwip v2 Higher Bandwith with MDNS enabled - the client connects to the WiFi but does not receive an IP address and the Serial port debugging shows:
ERROR: dhcps send ack (error -13)
ERROR: dhcps send ack (error -13)
ERROR: send_offer (error -13)
ERROR: send_offer (error -13)
Note: I have replaced all the "check for connection or timeout" handling with a simple delay(5000) in the MCVE below. Same problem.
[MCVE] Sketch
Debug Messages from serial port
The text was updated successfully, but these errors were encountered: