micropython-mdns: MDNS with Service Discovery

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
cbrand
Posts: 7
Joined: Fri Jan 01, 2021 5:49 pm

micropython-mdns: MDNS with Service Discovery

Post by cbrand » Tue Jan 05, 2021 11:37 pm

For the next step of my IR remote project, I required MDNS functionality with Service Discovery.

Unfortunately, the ESP32 MicroPython implementation of MDNS only allows querying of A records and exposing its' own IP via MDNS. Also the only running library which I could find was SlimDNS which doesn't support the features I require either.

Due to this, I developed an MDNS library in pure Python which runs via uasyncio and supports querying for records, Service Discovery and full fledged Service Announcement with TXT metadata records. It runs fine on my test system of an ESP32 without the need for SPIRAM. It is ,depending on the operation mode, relatively memory intensive (somewhere around 60kb when running service discovery mode).

I hope it is of use for somebody else too.

Links:

cbrand
Posts: 7
Joined: Fri Jan 01, 2021 5:49 pm

Re: micropython-mdns: MDNS with Service Discovery

Post by cbrand » Wed Jan 06, 2021 3:36 pm

As an addition: I only have an ESP32 for testing, but would be very much interested if somebody who has other MicroPython capable boards to also test the functionality. Ideally, I want this not to only be tested on the ESP32.

Post Reply