RP2040: mDNS support in AP mode
Implement mdns in AP mode on RP2 port to allow users to access micropython device by hostname.
ports/rp2: Fix rp2 mdns responder issue.
Summary
As a number of users have reported via issues and discussions, the RP2 port of MicroPython has an incomplete mDNS implementation. The code in main.c calls mdns_resp_init() which opens the UDP socket for mDNS. However, no code in the cyw43 driver of the RP2 port makes the proper calls to mdns_resp_add_netif() and mdns_resp_remove_netif() to send the announce packets. The wiznet5k driver does make these calls and was used as a model for these changes.
This PR attempts to address this by very small changes to the extmod/network_cyw43.c driver file. As far as I can tell this driver is currently used only by the RP2 port.
Testing
This was tested by building the firmware and deploying to a PicoW, starting a WLAN connection and pinging PicoW.local from several devices on the local network. I also tested changing the hostname from the default.
Trade-offs and Alternatives
Alternatively, if this PR is not accepted we should disable the partial implementation by setting LWIP_MDNS_RESPONDER to 0 in lwipopts.h so that users can implement their own mDNS solutions without E_ADDRINUSE failures. A user should not have to build their own firmware to disable a partial/broken mDNS solution.