我正在阅读enduser setup Module
上的NodeMCU文档,现在我对以下声明感到有些困惑:
Connect to that SSID and then navigate to the root of any website (e.g., http://example.com/...
A web page will load, allowing the end user to provide their Wi-Fi information.
使用默认配置,NodeMCU接入点具有IP地址:192.168.4.1.
我的问题是,www.example.com
如何解决,以便它指向模块的接入点IP地址(192.168.4.1)
?模块是否有默认的DNS配置?
完整文档可用here。
答案 0 :(得分:1)
它总是为每个DNS查询返回ESP的IP You can see that in line 1491 of the source code. (enduser_setup.c)
enduser_setup_dns_recv_callback将始终通过调用wifi_get_ip_info
返回正在检索的IP。
wifi_get_ip_info(if_index , &ip_info)
c_memcpy(&(dns_reply[insert_byte]), &(ip_info.ip), 4);