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

ESP8266mDNS using the provided IP in the begin method #2349

Merged
merged 1 commit into from
Aug 1, 2016

Conversation

haiduc32
Copy link
Contributor

this fix forces the mDNS to use the provided IP in the begin method
instead of the auto detected IP. this is required if the ESP8266 starts
in the AP_STA mode and activates only the AP initially.

because of the old behaviour of the begin method, and how the ip is retrieved, if the current mode is AP_STA, only the STA ip will be tried. the fix allows the usage of the explicitly provided IP. now I can start the esp in AP_STA, with only AP active, and provide the AP ip. when STA will be connected the mDNS will continue to listen for connections on the AP IP, not disrupting the behaviour.

there still might be a problem in how the mDNS behaves when using the begin method with only the hostname and the initial mode is AP, then esp moves to AP_STA and connects to a station, as it subscribes to station events even when started in AP.

this fix forces the mDNS to use the provided IP in the begin method
instead of the auto detected IP. this is required if the ESP8266 starts
in the AP_STA mode and activates only the AP initially.
@codecov-io
Copy link

codecov-io commented Jul 31, 2016

Current coverage is 27.62% (diff: 100%)

Merging #2349 into master will not change coverage

@@             master      #2349   diff @@
==========================================
  Files            20         20          
  Lines          3656       3656          
  Methods         335        335          
  Messages          0          0          
  Branches        678        678          
==========================================
  Hits           1010       1010          
  Misses         2468       2468          
  Partials        178        178          

Powered by Codecov. Last update b7c7bc0...01c67a0

@igrr igrr merged commit b682d59 into esp8266:master Aug 1, 2016
swarren added a commit to swarren/esp8266-arduino that referenced this pull request Jan 15, 2017
…6#2349)"

Manually specifying the AP IP isn't required; the next change will modify
the MDNS code to correctly handle any combination of AP and STA modes, and
correctly respond to requests on all active interfaces.

This reverts commit b682d59.
igrr pushed a commit that referenced this pull request Jan 17, 2017
Manually specifying the AP IP isn't required; the next change will modify
the MDNS code to correctly handle any combination of AP and STA modes, and
correctly respond to requests on all active interfaces.

This reverts commit b682d59.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants