mDNS support: migrate to a micropython standard library #11623
Replies: 3 comments
-
@dpgeorge, @jimmo pls what do you think about my proposal? Isn't it a burden having to write mDNS in C, depending on the low-level features of each micro? Or am I wrong, on all the micros there is lwip as a tcp/ip stack so the routine is the same for all the micros / boards? |
Beta Was this translation helpful? Give feedback.
-
Sorry @massimosala I don't follow what you're saying here. Here's the summary:
That said, it's also useful to provide this in Python. But for our LWIP-supported boards, the work that needs to be done is a common API across all ports for configuring mDNS in LWIP. |
Beta Was this translation helpful? Give feedback.
-
@massimosala Anyway, I would like to have your implementations available:
If wanting, please share your work. Some people will appreciate :) |
Beta Was this translation helpful? Give feedback.
-
I discovered on esp8266 the builtin mDNS isnt' working.
Reading through previous issues and threads, it seems to me that other users are having issues with mDNS on various micros.
From what I understand, supporting this feature is a waste of time for developers, because they have to reason with lwip's idiosyncrasies and specific hardware interfaces.
There is this package
https://pypi.org/project/micropython-mdns/
It's wonderful, but on small micros it's not usable.
I wrote two modules for ony this function: advertise the micro on the local subnet.
The announcer module sends messages to the entire subnet, asynchronously, when called.
The responder module is slightly more complex. It is synchronous, sending messages only in response to mDNS queries.
Advantages:
I tried from a PC with different browsers: even just using the announcer module, after a few seconds (if a webserver is running on the micro) I can connect to the micro using http://chosen_hostname.local
What do you think?
If you agree with my vision, I'd like them to be included in the standard micropython libraries.
If anyone is interested, you can be a tester.
So I improve the code and/or documentation, before releasing it into the public domain.
Write at massimo DOT sala DOT 71 AT gmail DOT com
Beta Was this translation helpful? Give feedback.
All reactions