Left for archival purposes.

User avatar
By AdrianM
#39183
LEDAero wrote:"Bonjour protocol" is mDNS

Search for "mDNS ESP8266" - it's already available.


Not in LUA nodeMCU unless I've been barking up the wrong tree all weekend. I was about to post this as a feature request myself but searched the subforum first and found this earlier post.

Implementation of an embedded webserver is all very good (it's absolutely amazing really!) but without a discovery method it has very restricted utility. To access any webpage(s) being served by the LUA nodeMCU in Station mode means either using a 3rd party APP (like Fing on Android) to report all IP addresses on the local network and then identify the chip ID, or have some sort of display from which to read the IP address (which sort of defeats the purpose of having webpages) .

Quoting fom Andreas Reischle's blog
With NodeMCU things are a bit different from the Arduino IDE. mDNS can IMHO not be implemented in LUA at the user interface. It would have to be added to NodeMCU's source code. And you need a build environment for that. This tool is a great help: https://github.com/pfalcon/esp-open-sdk
I used that to build my custom NodeMCU firmware, but never took it as far as adding totally new functions at that level.
As said, the TCP/IP is done by LWIP and someone has already made a mDNS responder for LWIP here:
https://developer.mbed.org/users/dirkx/ ... esponder.h
User avatar
By AdrianM
#39641 Andreas Reischle kindly gave me a heads-up to the following article:
Name resolving demo / mDNS reponder
This provides some custom built binaries that add a bonjour module providing request parser and response calls.

I've got the demo running to the extent that typing esp-8266.local/ into the address bar on a desktop PC accesses the demo server listening on 80. It all seems to work just fine. For Windows you have download Bonjour Print Services (or Itunes I'm told). Unfortunately it doesn't work from browsers running on Android devices on account of Android not supporting Bonjour. I can't seem to find anything in the Play store that would help either.