Skip to content

Remove forced OTA DNS announce #3770

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

Closed

Conversation

jonatanolofsson
Copy link
Contributor

OTA should not force a DNS publication. This is not the job of the OTA server, and it interferes with previously configured DNS announcements.

@jonatanolofsson jonatanolofsson force-pushed the feature/otadns branch 5 times, most recently from 0245248 to 7f2bc85 Compare October 30, 2017 08:41
@igrr
Copy link
Member

igrr commented Nov 3, 2017

I agree that we should avoid overriding previously configured mDNS. But as it is, the change will break existing sketches which did just ArduinoOTA.begin. From the perspective of the user who just wants to use OTA, but doesn't care about mDNS, ArduinoOTA should take care of mDNS registration.

How about adding a function to mDNS class to check if mDNS is configured, and then using it in ArduinoOTA? If not configured, then ArduinoOTA must call mDNS.begin, otherwise OTA will not work (Arduino IDE will not see the device on the network).

Also suggest keeping 'setHostname'/'getHostname' function for compatibility with existing sketches.

@jonatanolofsson jonatanolofsson force-pushed the feature/otadns branch 3 times, most recently from e6a70ef to a8b8234 Compare December 5, 2017 11:44
@jonatanolofsson
Copy link
Contributor Author

I rewrote the commit per your suggestion and added a check if the mDNS had already been started

@jonatanolofsson jonatanolofsson force-pushed the feature/otadns branch 2 times, most recently from bd922bf to 6a5c480 Compare December 16, 2017 08:20
@jonatanolofsson
Copy link
Contributor Author

@igrr I just rebased this. Should I do something more before it is merged?

@igrr
Copy link
Member

igrr commented Mar 7, 2018

Thanks, the changes look good. This will be merged once 2.4.1 is released, which should happen very soon.

@CZEMacLeod
Copy link

Would be better if we could have OTA enabled without mDNS at all.
Perhaps an optional #define ArduinoOTA_No_mDNS and some #ifndef ArduinoOTA_No_mDNS's around the include and calls?
I have problems with mDNS crashing and causing other problems if it is started at all, so would prefer (for now at least) to leave it out altogether.
But this helps and is backwards compatible which is always good.

@jonatanolofsson
Copy link
Contributor Author

@igrr I just rebased this. Should I do something more before it is merged?

@earlephilhower earlephilhower added waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. component: MDNS labels Jan 25, 2019
@earlephilhower
Copy link
Collaborator

Thanks for your PR, but MDNS has been completely rewritten with this release, so this PR can't apply anymore without massive rework.

I'll leave open for two weeks and come back after Feb 10 and see if there's interest from the original submitter. If not, will close then.

@d-a-v
Copy link
Collaborator

d-a-v commented Jul 5, 2019

duplicate #5494 which is already merged

@d-a-v d-a-v closed this Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: MDNS waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants