Add SimpleMDNS, IGMP, and .local lookup #2582

Merged
earlephilhower merged 6 commits from kl1 into master 2024-11-07 21:09:44 +03:00
earlephilhower commented 2024-11-04 22:50:46 +03:00 (Migrated from github.com)
No description provided.
earlephilhower commented 2024-11-06 03:34:36 +03:00 (Migrated from github.com)

@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."

@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."
jaguilar commented 2024-11-06 06:29:38 +03:00 (Migrated from github.com)

Yes, I will test it.

Yes, I will test it.
jaguilar commented 2024-11-06 07:03:13 +03:00 (Migrated from github.com)

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.

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 commented 2024-11-07 04:05:33 +03:00 (Migrated from github.com)

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!

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!
GUVWAF commented 2024-11-11 20:30:22 +03:00 (Migrated from github.com)

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.

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 commented 2024-11-11 21:03:57 +03:00 (Migrated from github.com)

@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 `begin` can only fail if it's already running or there are no `netif`s available. Want to do a PR to add the `bool` return to it and make it even better?
GUVWAF commented 2024-11-11 21:32:21 +03:00 (Migrated from github.com)

@earlephilhower Yes, will do that.

@earlephilhower Yes, will do that.
Sign in to join this conversation.