Menu

Multicast DNS

2025-06-18
2025-06-18
  • Bjørn Røgeberg

    Hi!

    Can multicast DNS (mDNS) be added to the software?

    It's pretty trivial to add. The code must run after WiFi has been set up. For permanent enablement, it only require two additional lines:

      #include <ESPmDNS.h>
    
      MDNS.begin(ControllerData->get_devicename());
    

    This will make it possible to DNS resolve the name of the controller based on the device name.
    If you set the device name to myAutoFocuser, then you can resolve myautofocuser.local.
    The URL http://myautofocuser.local:6060/ will then work.

    This make it really simple to contact a newly set up device, without knowing its IP address, and removes the need for a permanent IP address in most cases.

    mDNS only work within the same network, so not suitable for remote access to the focuser.

    The device name must be a valid DNS sub-domain name.

    Best regards,
    Bjørn Røgeberg

     
  • brownrb

    brownrb - 2025-06-18

    That support is already there. In fact it is probably several times better and a lot more flexible,

    This was part of the original version way time ago. It got reintroduced into the esp8266 version in Jan this year.

    I have attached some info from the next version - you will be able to see what I mean.

    Regards
    Robert

     
  • Bjørn Røgeberg

    This looks very nice! Eagerly waiting for the next version. I've done some major changes to the display_lilygo.cpp file, to use the u8g2 library and adopting it for a larger display (the one that comes with the LilyGO T-Motor controller is too small to be useful). But my changes are probably only useful for me. I've limited it to what I need.

    One can tweak these displays indefinitely...

    BjørnR

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.