Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setHostname not working with beginAP #245

Open
Sitebulb opened this issue May 3, 2023 · 3 comments
Open

setHostname not working with beginAP #245

Sitebulb opened this issue May 3, 2023 · 3 comments
Labels
type: imperfection Perceived defect in any part of project

Comments

@Sitebulb
Copy link

Sitebulb commented May 3, 2023

setHostname works fine when connecting to an existing access point, but it's not working when creating one.

Working

WiFi.setHostname(hostname);
...
while (status != WL_CONNECTED) {
        status = WiFi.begin(ssid, pass);
        delay(10000);
}

Not working

WiFi.setHostname(hostname);
WiFi.config(APIP, APIP, APIP, IPAddress(255, 255, 255, 0));
status = WiFi.beginAP(ssid, pass, apChannel);`

Is this by design, or not possible?

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label May 3, 2023
@JAndrassy
Copy link

where do you expect to see/use the hostname?

@arduino-libraries arduino-libraries deleted a comment from Sitebulb May 3, 2023
@garethbrown
Copy link

@JAndrassy want my nano rp2040 connect to be the access point and view a HTML page via the hostname, with having to know the IP address. The device is going to be used in an environment where there is no Wifi router.

@JAndrassy
Copy link

JAndrassy commented May 4, 2023

so I am not an expert on this, but in my understanding, hostname is sent with the DHCP request and then may be used by the router/AP with mDNS.
if you want hostname resolution on SoftAP of the MKR, you will have to start a DNS or mDNS server. I don't know if there is a library for mDNS or DNS on top of an Arduino WiFi library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants