MDNS : Also increase # of sends when a send fails#8641
Conversation
|
@d-a-v : Cannot find the output on what is wrong with the style, only the fact that it is failing. |
|
Check the log of the style / formatting job; either by clicking the check
line down below or Checks tab above.
|
|
That is what I did but the info is : I don't know how to proceed with that |
|
Style job expects that the code is clang-format'ed; either apply the diff with On topic, these announces are simply not essential? Couldn't we introduce a longer wait time when it is failing? (like exponential back-off, or simply add a fixed number) |
|
The probes/announces are there to : On timing : On Probe result. One might discuss whether a "not UP link" or a link with errors should callback a Probe failed. |
|
OK. Lea approach is still a bit convoluted, but at least we get rid of this edge case. Regarding UP, I think we need to look at glue layer. I just noticed these bits
@d-a-v might have some explanation as to why it is that way |
I assume this is #8308 (comment) @mcspr I can't seem to remember whether you've been working on
Counterpart is there => lwIP => lwIP |
Right, but I meant this with debugging enabled |
There is the flag It is true that ip-not-set and Maybe the the second link //netif_set_up(netif); // unwanted call to netif_sta_status_callback()
netif->flags |= NETIF_FLAG_UP;should be something like if (ip_addr_isany(&netif->ip_addr)))
netif_set_down(netif); // or test first whether it is already down
else
netif_set_up(netif); // or test first whether it is already up(tests in comments are there because one has to be careful with the number of times netif callbacks are used) |
d-a-v
left a comment
There was a problem hiding this comment.
The mdns clock example runs fine with both AP and STA enabled
approving, noting that
- the netif up state case in comments is an external issue
- I may have not tested all cases (ap-sta -> ap -> off -> sta -> ap_sta ...)
|
@d-a-v : The check should be whether the clock example is running OK when mode = AP_STA and STA is not connected. |
Maybe you should update the example to enable it with both AP and STA. diff --git a/libraries/ESP8266mDNS/examples/LEAmDNS/mDNS_Clock/mDNS_Clock.ino b/libraries/ESP8266mDNS/examples/LEAmDNS/mDNS_Clock/mDNS_Clock.ino
index 6234e9f10..33c7a7f17 100644
--- a/libraries/ESP8266mDNS/examples/LEAmDNS/mDNS_Clock/mDNS_Clock.ino
+++ b/libraries/ESP8266mDNS/examples/LEAmDNS/mDNS_Clock/mDNS_Clock.ino
@@ -210,7 +210,8 @@ void setup(void) {
Serial.begin(115200);
// Connect to WiFi network
- WiFi.mode(WIFI_STA);
+ WiFi.mode(WIFI_AP_STA);
+ WiFi.softAP("ESPap", "thereisnospoon");
WiFi.begin(ssid, password);
Serial.println("");
(weird AP credentials are borrowed from another example) |
That will be a challenge for me. |
This solves the root cause of the infinite sending of host probes when STA is not connected.
Related to #8308
This solves the root cause of the infinite sending of host probes when STA is not connected.