mDNS support on Pico #10932
-
|
Hi, is there mDNS support enabled on the RP2040/Pico port of Micropython (like ESP32 port)? I am running this MP version: Network connection is active but I cannot see the mDNS info on the network. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 11 replies
-
|
So I dug further into this issue and found some documentation about the mDNS service implemented in the lwip stack. This states to call this function to initialise the service: and then start responding on a netif by calling this function: On the Pico port, the first function is actually called in main.c but the second function never seems to be called. This leaves the service inactive. Looks like a bug in the MP Pico port. So I wonder which part of the MP implementation should call Anyone who can shed some light on this? |
Beta Was this translation helpful? Give feedback.
-
|
I think this bug report answers my question. |
Beta Was this translation helpful? Give feedback.
-
|
Hi, Just curious, were you able to get mDNS to work on the RP2040? |
Beta Was this translation helpful? Give feedback.
-
|
(this may not be a useful answer) I can confirm local DNS (not mDNS) with the nightly build MicroPython v1.23.0-preview.324.gd11ca092f on 2024-04-17; Raspberry Pi Pico W with RP2040 Set the hostname before you initialize the network: import network
network.hostname("picowX")
...For some reason, my LAN seems to prefer .ht.home over .local, but I can do this: |
Beta Was this translation helpful? Give feedback.
-
|
I have been able to get the same package to work that @ondrej1024 uses, just bare bones, pulling the example out of that repository. But has anyone ever got this to work with python http server, or any high level working web server? Basically Im wanting a user to be able to access pico w with : hostname.local and be redirected to a home web page, hosted from the pico. This isn't my strong suit by any means and I could be missing something very obvious, but could not get it to work. |
Beta Was this translation helpful? Give feedback.
-
|
The native MP (lwIP) mDNS support still does not seem to be fixed in MP 1.26 for Pico W. |
Beta Was this translation helpful? Give feedback.
I just retried today. Not sure what I changed but it is actually working as expected.
Just established a Wifi connection to my local network with the Pico W and now I can successfully ping
picow.local.The default hostname can be changed with
network.hostname("myname")before bringing up the connection on the Pico W.