{"id":13801911,"url":"https://github.com/cbrand/micropython-mdns","last_synced_at":"2026-01-30T23:28:44.246Z","repository":{"id":44468302,"uuid":"326569993","full_name":"cbrand/micropython-mdns","owner":"cbrand","description":"MDNS implementation for MicroPython with Service Discovery","archived":false,"fork":false,"pushed_at":"2025-12-29T15:38:39.000Z","size":236,"stargazers_count":82,"open_issues_count":0,"forks_count":17,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T19:48:31.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbrand.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-04T04:34:30.000Z","updated_at":"2025-12-29T15:38:42.000Z","dependencies_parsed_at":"2024-07-10T10:49:02.562Z","dependency_job_id":"a2409a3b-1a6e-4911-8e0c-581145bfa2c2","html_url":"https://github.com/cbrand/micropython-mdns","commit_stats":{"total_commits":51,"total_committers":6,"mean_commits":8.5,"dds":0.3137254901960784,"last_synced_commit":"bafe17626411ed934b10ba4dd7867d7c7187364c"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/cbrand/micropython-mdns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrand%2Fmicropython-mdns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrand%2Fmicropython-mdns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrand%2Fmicropython-mdns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrand%2Fmicropython-mdns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbrand","download_url":"https://codeload.github.com/cbrand/micropython-mdns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbrand%2Fmicropython-mdns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28923062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"ssl_error","status_checked_at":"2026-01-30T22:32:31.927Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:01:30.074Z","updated_at":"2026-01-30T23:28:44.231Z","avatar_url":"https://github.com/cbrand.png","language":"Python","readme":"# Micropython MDNS\n\n[![PyPi](https://img.shields.io/pypi/v/micropython-mdns) ![MIT licensed](https://img.shields.io/pypi/l/micropython-mdns)](https://pypi.org/project/micropython-mdns/)\n\n![Image showing service discovery](https://raw.githubusercontent.com/cbrand/micropython-mdns/main/images/service-discovery.gif)\n\nA pure Python implementation of [MDNS](https://tools.ietf.org/html/rfc6762) and the [Service Discovery](https://tools.ietf.org/html/rfc6763) protocol over MDNS\nfor [MicroPython](https://micropython.org/).\n\n## Intended Audience\n\nYou should not use this library if you \"just\" require MDNS A record lookup and Host annoucement if there is already baked in support in your MicroPython distribution.\nThis is for example the case with the default ESP32 MicroPython distribution since v1.12. This will be in all cases more resource efficient.\n\nIf you, however, require additional functionality like Service Discovery and Annoucement, you should use this library. It supports all functionality of existing\nbasic MDNS implementations plus these features. You will not loose any functionality.\n\n## Installation\n\nYou can use the new [`mip`](https://docs.micropython.org/en/latest/reference/packages.html#installing-packages-with-mip) package manager:\n\n```python\nimport mip\nmip.install(\"github:cbrand/micropython-mdns\")\n```\n\nFor using this library, native C type implementations of MDNS which use the MDNS service port need to be disabled. For example, this project has been developed\non the ESP32 which MicroPython implementation per default has a basic MDNS implementation available. This does only support local A record lookups and A record\nresponding of its own host address.\n\nThe [releases page](https://github.com/cbrand/micropython-mdns/releases) on this project publishes a firmware.mp.1.24.esp32.bin for MicroPython 1.24 with MDNS disabled and the mdns python module included in each release for easy usage. Other Micropython versions are also supported. Other boards are supported and you are welcome to add additional Dockerfiles in a PR which build the module compatible for other boards.\nAll versions can also be built when having docker locally installed by running in the console the build command:\n\n```bash\nmake build\n```\n\nIndividually it is also possible to build the desired version via:\n\n```bash\nmake compile-micropython-1-24\n```\n\n### ESP32\n\nRefer to the [`config`](https://github.com/cbrand/micropython-mdns/tree/main/config/boards) directory to see the configuration files when baking this into your own MicroPython ESP32 build.\n\nAlternatively you can also build it with docker by calling:\n\n```bash\ndocker build -t micropython -f Dockerfile.micropython.1.24.esp32\ndocker run -v ./:/tmp/mdns-build -t micropython\n```\n\nThis will put the ESP32 firmware in the current working directory.\n\n### Raspberry Pi Pico\n\nFor Raspberry Pi Pico support see the corresponding Dockerfile on how to compile it in linux [`Dockerfile.micropython.1.24.rp2`](https://github.com/cbrand/micropython-mdns/tree/main/Dockerfile.micropython.1.24.rp2).\n\nYou can also run a build with docker by calling:\n\n```bash\ndocker build -t micropython -f Dockerfile.micropython.1.24.rp2\ndocker run -v ./:/tmp/mdns-build -t micropython\n```\n\nThis will put the RP2 firmware in the current working directory.\n\n### Other\n\nOther MicroPython implementations might not require any changes inside of the firmware.\n\n## Usage\n\nThe library requires [`uasyncio`](https://docs.micropython.org/en/latest/library/uasyncio.html) to function. All handling is done asynchronously.\n\nExamples on how to utilize the libraries can be found in the [`examples`](https://github.com/cbrand/micropython-mdns/tree/main/examples) folder.\n\n## Reference\n\nA basic API reference for the public API is inside of the [REFERENCE.md](https://github.com/cbrand/micropython-mdns/blob/main/REFERENCE.md).\n\n## Caveats\n\n- Depending on your MicroPython implementation, you must disable MDNS in the firmware.\n  - For ESP32 use the Dockerfile for the specific Micropython version in the root directory.\n  - For RPI Pico Micropython beginning with version 1.32 is supported since version 1.5.0 where you can see how to do it in the Dockerfile in the root directory.\n- Currently no support for IPv6 is implemented.\n- Depending how chatty the network is, service responders and discovery might require a lot of memory. If the memory is filled by the buffer of the underlying socket, [the socket is closed and reopened](https://github.com/cbrand/micropython-mdns/blob/d3dd54f809629ca41c525f5dec86963a6d75e903/src/mdns_client/client.py#L100) which looses data. It, however, seems to work fine enough in tests on an ESP32 without external memory. Depending on the project size, a module with external RAM might be advisable.\n\n## License\n\nThe library is published under the [MIT](https://github.com/cbrand/micropython-mdns/blob/main/LICENSE) license.\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbrand%2Fmicropython-mdns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbrand%2Fmicropython-mdns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbrand%2Fmicropython-mdns/lists"}