Im trying to setup An arduino Access Point to work with on the go, but instead of connecting to it through an IP address, i want to connect to it like with a normal URL, something like "myproject.local" or myproject.com". Therefore i went to take a look at the WiFiNINA documentation, and i found the setHostname() method
but no matter where i placed the
on the sketch (either before of after the WiFi.begin()) i couldnt connect via that URL(myarduino.local).
does anybody know the correct way to implement setHostname()? Or any other library or way that would allow me to use a custom domain?
This all depends on how the device that’s doing the connecting does its name resolution.
Name resolution resolves host name to IP address, which then allows connecting to the device.
There really is no connecting to a device without an IP address.
Yep.So the Arduino is providing its own AP, and not a client on other WiFi network?
So there won’t be a DNS server which would normally do the name to IP translation for your smartphone. Not unless the WiFiNINA provides one...
There are other name resolution services for machines on local networks, like Bonjour on Apple devices or NETBIOS on Windows. But I don’t know if WiFiNINA provides those either.
Anyway, these are the areas you need to be researching if you want to find out if this is possible.