Question: is mDNS supposed to work in AP mode ?
Hi I have tried mDNS sample in Station Mode, and it works very well - excellent! But I have issue in AP mode: I have modified the sample code to start in AP mode without password
// Connect to WiFi network
//WiFi.begin(ssid, password);
WiFi.mode(WIFI_AP);
WiFi.softAP(ssid);
and started mDNS using AP IP
if (!mdns.begin("esp8266", WiFi.softAPIP())) {
webserver answer as expected on browser if using ip address (normal), but no answer when using http://esp8266.local - seems mDNS started without issue and I do not see any error on serial.
Is that normal ? or do I miss to setup something ?
Thanks,
Luc
I have tried this and it seems that multicast doesn't work over softAP interface. For multicast destinations udp_send returns error code 1, which is not one of lwIP error codes (which are all negative), so it must be coming from the lower level (netif->output). This looks like an issue with Espressif's softAP interface.
Ok thanks a lot for your answer so I close the issue or you want to keep a tracker ?
Verified fixed - sorry for the delay thanks again for your great work
I cannot seem to make this work. Using the current staging board manager build .begin("esp8266", WiFi.softAPIP()) and .begin("esp8266") both return false.
I have same issue - seems something is broken since last test No answer on STA neither AP on OSX/Windows/Android
Seems using a String and c_str() is not working well and even can lead to exception 28 like:
String shost = "esp8266";
.....
if (!mdns.begin(shost.c_str())) ...
but using an array of char is ok, like :
char hostname [12+1];
...
strcpy (hostname,"ESP_008261");
...
if (!mdns.begin(hostname)) ...
now both AP and STA are answering
Is this an issue with the String class or an issue with const char pointers? Does the ESP8266 attempt to append a .local on the end of the given hostname and reuse the same memory?
looking at the mDNS code, the content is copied so should not have issue
// Copy in domain characters as lowercase
for (int i = 0; i < n; ++i)
_hostName[i] = tolower(domain[i]);
_hostName[n] = '\0';
I noticed I needed "WiFi.mode(WIFI_AP);" before "WiFi.softAP(ssid);" Without setting mode, .begin("esp8266") returns false.
This worked both with a String and the strcpy above.
Hey there,
I'm sorry for reopening this old thread after almost 2 years, but I have the same issue. Does someone have the solution for that ?
Kind regards.
It works for me
On Jul 20, 2017 5:39 AM, "andre luis" [email protected] wrote:
Hey there,
I'm sorry for reopening this old thread after almost 2 years, but I have the same issue. Does someone have the solution for that ?
Kind regards.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/esp8266/Arduino/issues/96#issuecomment-316652153, or mute the thread https://github.com/notifications/unsubscribe-auth/AQC6Bj1ibkRe5jw7LhYzubVMaw2rdsIJks5sPyBTgaJpZM4EFvfG .
Use Captive Portal for redirect. Perfect!