Closed JJGO closed 1 year ago
I think that the problem is that you don't need slimDNS on the ESP32 Micropython any more, since it is built in these days, and the built-in version is has already bound to the relevant address and port.
To use the built-in support on the ESP32 it should be sufficient to set the host name using something like wlan.config(dhcp_hostname="device_name")
before you call wlan.connect()
and then your device will be discoverable and calls to socket.getaddrinfo()
will work for .local
domain names.
Yes, I forgot to follow up on this but you are completely right, the EADDRINSUE is linked to the native ESP32 mDNS support. Using the dhcp_hostname
param in config
was enough to configure it and slimDNS is then not needed in the ESP32.
Maybe it's worth adding a disclaimer/note in the README to prevent future issues about this being reported.
I'm using the first snippet in the docs on a ESP32 board and it immediately fails with the following error:
I managed to run the same code on a ESP8266 successfully, so not sure what is going on here.
I can confirm that I am NOT initializing the web repl and the boot code is just connecting to my Wi-Fi network.