-
Notifications
You must be signed in to change notification settings - Fork 12
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
mDNS on RPi Pico #9
Comments
Hello, I am pretty sure this has to do with MicroPython having a default MDNS implementation on the RPi Pico already activated and you need to disable it before being able to use MDNS for service discovery. However, the implementation has currently only been tested with ESP32 configuration and it has recently pointed out to me that it will likely not work on other implementations: #8 (comment) If you only want to see / have an address in WiFi for you device and not any kind of service discovery you might not want and/or need to use this library: https://github.com/cbrand/micropython-mdns#intended-audience The hostname if you do a MDNS lookup should already advertise itself on the network: micropython/micropython@2ccf030 (This is for esp32 but I think the rpi pico also has something similar when this error message comes up). |
I really cannot find any documentation or source code about this MDNS service built into the Pico Micropython build. And So my guess is it actually isn't there and your MDNS package doesn't run on the Pico either (for the reasons you mentioned), so the EADDRINUSE it causes might just be misleading. |
What I presume is going on that it registers its host name (A Record) and that is not seen by avahi-discover (which is scanning for |
Yes, I tried that, but without success. I tried the hostname which I get from
I also did a port scan of the Pico but this didn't find any open ports 🙄 |
Alright sorry about that then. I think without having a Pico here myself I can not help you any further. Hope you'll find the issue and figure it out! Closing this for now. Feel free to open a new issue once you've debugged the base issues on the Pico. I would like to add support for the library for other systems, too so would be eager to hear if you get it to run and if not what error message you receive. Good luck :) |
I was able to get around that error by compiling micropython myself, and setting the include for I got past the EADDRINUSE issue at least. Still trying to successfully resolve a service name. |
If anyone is interested, here is the explanation why the MDNS port on the Pico is used by default but it is actually not advertising anything: |
@captncraig i just started my own project (my first), on the raspberry pi pico wh, i am facing the same issue. But i lack the knowlegde how i can overwrite this, like you said. Can you help me out how to get this working? |
|
With the tip from @captncraig i can successfully get a txtService. Thank man :) |
also why is this issue closed ? @cbrand |
@arag0re Hey :) Sorry but this is a bit out of scope of the library. As this is a build issue for one specific device it makes more sense to me to track it outside of the actual library, as the library in itself is functional. So keeping the issue open makes the management of this very hard, as I do not have any affiliation with the actual MicroPython project which seems to be the main issue facing here. There is a caveats section in the README outlining that this is something which might be required for the individual ports for differnt boards to be done (Disabling MDNS functionality): https://github.com/cbrand/micropython-mdns?tab=readme-ov-file#caveats I think with the information you all provided though I can also release a new version which does not only provide builds for the ESP32 but also for the RPi Pico in the next release and link this issue to make it easier findable in the future so that hopefully more people can benefit from the research done in this ticket. |
Hi guys, after implementing @arag0re fix and installing mDNS from @cbrand I was able to use cbrands example for mDNS responder and was able to ping my pico at hostname.local Can anyone provide any direction on how to integrate this into a web server? I'm fairly new to this and there is little documentation on how to implement this mDNS package into a webserver using micropython. I'm just wanting to be able to access my pico's web page using hostname.local |
I am trying to run the service_responder.py example program on a RPi Pico with Ethernet port and get this error:
OSError: [Errno 98] EADDRINUSE
Does this mean the mDNS service is already active in the MP firmware? If so, should I see the Pico advertising its host name in the local network? I tried with an mDNS browser but could not find the Pico.
MP version is this:
MicroPython v1.19.1-910-g4937174b4 on 2023-03-01; W5500-EVB-Pico with RP2040
Thanks.
The text was updated successfully, but these errors were encountered: