[GH-ISSUE #1068] hostname example #911

Closed
opened 2026-02-28 01:27:38 +03:00 by kerem · 5 comments
Owner

Originally created by @sanchosk on GitHub (May 27, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1068

Basic Infos

Hardware

WiFimanager Branch/Release:

  • Master
  • Development

Esp8266/Esp32:

  • ESP8266
  • ESP32

Hardware: ESP-12e, esp01, esp25

  • ESP01
  • ESP12 E/F/S (nodemcu, wemos, feather)
  • [x Other

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • staging (master/dev)

Description

Missing example for setting hostname.
I've found within your issue list a suggestion where you refer to wm.hostname(), but this seem not to work.
I'd like to have an example of portal with wifi ssid, password and hostname.
Is this feasible?

Btw, VERY nice wifi manager - I only found it recently, but I'll use it everywhere from now on.

Settings in IDE

Module: ESP32-Cam

Additional libraries: ESP32 camera

Originally created by @sanchosk on GitHub (May 27, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1068 ### Basic Infos #### Hardware **WiFimanager Branch/Release:** - [x] Master - [x] Development **Esp8266/Esp32:** - [x] ESP8266 - [x] ESP32 **Hardware: ESP-12e, esp01, esp25** - [x] ESP01 - [ ] ESP12 E/F/S (nodemcu, wemos, feather) - [x Other **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [x] 2.4.0 - [ ] staging (master/dev) ### Description Missing example for setting hostname. I've found within your issue list a suggestion where you refer to wm.hostname(), but this seem not to work. I'd like to have an example of portal with wifi ssid, password and hostname. Is this feasible? Btw, VERY nice wifi manager - I only found it recently, but I'll use it everywhere from now on. ### Settings in IDE Module: ESP32-Cam Additional libraries: ESP32 camera
kerem closed this issue 2026-02-28 01:27:38 +03:00
Author
Owner

@alfo commented on GitHub (May 28, 2020):

You can do this with WiFi.hostname() on ESP8266 and WiFi.setHostname() on ESP32

<!-- gh-comment-id:635187288 --> @alfo commented on GitHub (May 28, 2020): You can do this with WiFi.hostname() on ESP8266 and WiFi.setHostname() on ESP32
Author
Owner

@sanchosk commented on GitHub (May 28, 2020):

I know.
What I wanted to achieve was to use the parameters to also set the hostname.
However, my skills are insufficient, so I failed.
And when I use WiFi.setHostname() after wm, the whole sketch locks...

<!-- gh-comment-id:635188683 --> @sanchosk commented on GitHub (May 28, 2020): I know. What I wanted to achieve was to use the parameters to also set the hostname. However, my skills are insufficient, so I failed. And when I use WiFi.setHostname() after wm, the whole sketch locks...
Author
Owner

@alfo commented on GitHub (May 28, 2020):

I have this working. You load your parameters from JSON, then set WiFi.hostname(), then instantiate wm

<!-- gh-comment-id:635189765 --> @alfo commented on GitHub (May 28, 2020): I have this working. You load your parameters from JSON, then set WiFi.hostname(), then instantiate wm
Author
Owner

@sanchosk commented on GitHub (May 28, 2020):

Can you, perhaps, share the code?

<!-- gh-comment-id:635190222 --> @sanchosk commented on GitHub (May 28, 2020): Can you, perhaps, share the code?
Author
Owner

@alfo commented on GitHub (May 28, 2020):

https://github.com/alfo/IoTBaseFile/

<!-- gh-comment-id:635192278 --> @alfo commented on GitHub (May 28, 2020): https://github.com/alfo/IoTBaseFile/
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#911
No description provided.