我到目前为止所做的是
我在我的 nodemcu 中创建了 mdns 服务
... // code used to create the mdns service
if (mdns.begin("esp", WiFi.localIP()))
Serial.println("MDNS responder started");
server.begin();
Serial.println("HTTP REST Server Started");
MDNS.addService("http", "tcp", 80);
...
然后我在我的 windows 中安装了 Bonjour。之后,我可以
ping esp.local
从我的 windows power shell 中使用 mdns 名称从浏览器与 iot 设备进行通信esp.local
。
我现在正在努力解决的问题。
在搜索 mdns 服务时,我无法发现此设备。我dns-sd
在 windows powershell 中使用来浏览我的服务,但它没有发现这个设备。
命令是dns-sd.exe -B <Type> <Domain> (Browse for services instances)
所以我尝试了
dns-sd -B _http._tcp local. //have doubt about this one .
它只是显示
Browsing for _http._tcp.local.
如果有人可以帮助我,那就太好了。谢谢。