[go: up one dir, main page]

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

Add SimpleMDNS, IGMP, and .local lookup #2582

Merged
merged 6 commits into from
Nov 7, 2024
Merged

Add SimpleMDNS, IGMP, and .local lookup #2582

merged 6 commits into from
Nov 7, 2024

Conversation

earlephilhower
Copy link
Owner

No description provided.

Adds a small wrapper around the LWIP-provided MDNS responder application.
Drop-in replacement in many basic cases for LEAmDNS.

For FreeRTOS it is important to not allocate memory on an LWIP callback.
LEAmDNS needs to do this to create response objects, leading to crashes.

Increase LWIP timers by bumping the LWIP_ARP number (as done before).

Replace ArduinoOTA LEAmDNS with SimpleMDNS and update a HTTPUpdateServer
example.
@earlephilhower
Copy link
Owner Author

@jaguilar, since you're doing FreeRTOS and MDNS, can you give this PR and the new SimpleMDNS library a test?

There were multiple LWIP tweaks needed to actually allow the MDNS responder to work, like increasing the internal LWIP timers. W/O it you'd panic as soon as you actually did some network I/O.

Basic testing replacing LEAmDMS in OTA and HTTPUpdateServer seem to "just work."

@earlephilhower earlephilhower changed the title Enable LWIP IGMP, MDNS internal server (unused) Add SimpleMDNS, IGMP, and .local lookup Nov 6, 2024
@jaguilar
Copy link
jaguilar commented Nov 6, 2024

Yes, I will test it.

@jaguilar
Copy link
jaguilar commented Nov 6, 2024

For anyone testing something like this from platformio in the future, the magic is:

[env:pico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
platform_packages = 
		framework-arduinopico @ https://github.com/earlephilhower/arduino-pico.git#1a05d9261df14c5ecabf6c9dc8af28b0ca6def9e

And I can confirm it works. I am able to resolve .local addresses after flashing with the rebuilt program. I did not test the MDNS responder because I do not know how it works and I have no code to use it at the moment.

@jaguilar
Copy link
jaguilar commented Nov 7, 2024

One other really great thing about this feature -- even though my server has a static IP my client was having some inconsistency reconnecting to it when I was manually loading the IP address. Now that we're over to mdns, I have restarted the server several times and seen no client reconnect failures. So happy!

@earlephilhower earlephilhower merged commit f5c4136 into master Nov 7, 2024
26 checks passed
@GUVWAF
Copy link
Contributor
GUVWAF commented Nov 11, 2024

I just came across this new SimpleMDNS library and it seems to work well in combination with FreeRTOS. Thanks for adding this.

One thing that doesn't make it a full drop-in replacement for us it that begin() doesn't return a bool for the success/fail status, as LEAmDNS does, but that can be worked around.

@earlephilhower
Copy link
Owner Author

@GUVWAF begin can only fail if it's already running or there are no netifs available. Want to do a PR to add the bool return to it and make it even better?

@GUVWAF
Copy link
Contributor
GUVWAF commented Nov 11, 2024

@earlephilhower Yes, will do that.

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