[GH-ISSUE #778] Accessing information of the connected wifi from the main sketch in the IDE #649

Closed
opened 2026-02-28 01:26:24 +03:00 by kerem · 8 comments
Owner

Originally created by @Bjack795 on GitHub (Nov 30, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/778

PLEASE TRY DEVELOPMENT BRANCH before submitting bugs on release or master, in case they were already fixed.

POST SERIAL OUTPUT !

Issues without basic info will be ignored or closed!

Please fill the info fields, it helps to get you faster support ;)

if you have a stack dump decode it:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.rst

for better debug messages:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.rst

----------------------------- Remove above -----------------------------

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)
  • Other (Wemos D32 pro)

Description

Hi!
I'm using an ESP32 based board.
I need local_IP, gateway, subnet, dns, ssid and password of the connected wifi.
Could you please tell me how to access these information from the Arduino IDE or where to find them in the library files (to add some code to pass them to the Arduino IDE)?

Originally created by @Bjack795 on GitHub (Nov 30, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/778 ## PLEASE TRY DEVELOPMENT BRANCH before submitting bugs on release or master, in case they were already fixed. ## ## POST SERIAL OUTPUT ! Issues without basic info will be ignored or closed! Please fill the info fields, it helps to get you faster support ;) if you have a stack dump decode it: https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.rst for better debug messages: https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.rst ----------------------------- Remove above ----------------------------- ### Basic Infos #### Hardware **WiFimanager Branch/Release:** - [ ] Master - [X] Development **Esp8266/Esp32:** - [ ] ESP8266 - [X] ESP32 **Hardware: ESP-12e, esp01, esp25** - [ ] ESP01 - [ ] ESP12 E/F/S (nodemcu, wemos, feather) - [X] Other (Wemos D32 pro) ### Description Hi! I'm using an ESP32 based board. I need local_IP, gateway, subnet, dns, ssid and password of the connected wifi. Could you please tell me how to access these information from the Arduino IDE or where to find them in the library files (to add some code to pass them to the Arduino IDE)?
kerem closed this issue 2026-02-28 01:26:24 +03:00
Author
Owner

@tablatronix commented on GitHub (Nov 30, 2018):

These are all standard functions for esp, has nothing to do with wm, note that on esp32 you cannot get these settings until wifi is connected.

Look in the esp docs

<!-- gh-comment-id:443354817 --> @tablatronix commented on GitHub (Nov 30, 2018): These are all standard functions for esp, has nothing to do with wm, note that on esp32 you cannot get these settings until wifi is connected. Look in the esp docs
Author
Owner

@Bjack795 commented on GitHub (Nov 30, 2018):

When the library scans and connects to a wifi collects those info to establish the connections isn't it?

<!-- gh-comment-id:443359742 --> @Bjack795 commented on GitHub (Nov 30, 2018): When the library scans and connects to a wifi collects those info to establish the connections isn't it?
Author
Owner

@tablatronix commented on GitHub (Nov 30, 2018):

no the wifi just does not get initialized in esp32 like it does in esp8266 so the config is not loaded until after wifi turns on, then you can read the network info

<!-- gh-comment-id:443366178 --> @tablatronix commented on GitHub (Nov 30, 2018): no the wifi just does not get initialized in esp32 like it does in esp8266 so the config is not loaded until after wifi turns on, then you can read the network info
Author
Owner

@Bjack795 commented on GitHub (Nov 30, 2018):

Ok so I must refer to the Wifi.h functions to get those info

<!-- gh-comment-id:443366793 --> @Bjack795 commented on GitHub (Nov 30, 2018): Ok so I must refer to the Wifi.h functions to get those info
Author
Owner

@tablatronix commented on GitHub (Nov 30, 2018):

They should all be in the docs already
but they are in wifigeneric and wifista wifiap

<!-- gh-comment-id:443367390 --> @tablatronix commented on GitHub (Nov 30, 2018): They should all be in the docs already but they are in wifigeneric and wifista wifiap
Author
Owner

@tablatronix commented on GitHub (Nov 30, 2018):

you can look the wm source code for the info page if you want

<!-- gh-comment-id:443367575 --> @tablatronix commented on GitHub (Nov 30, 2018): you can look the wm source code for the info page if you want
Author
Owner

@Bjack795 commented on GitHub (Nov 30, 2018):

Ok I found all the data I needed thank you.
Offtopic: This library is saving last wifi credentials on the EEPROM memory?

<!-- gh-comment-id:443372963 --> @Bjack795 commented on GitHub (Nov 30, 2018): Ok I found all the data I needed thank you. Offtopic: This library is saving last wifi credentials on the EEPROM memory?
Author
Owner

@tablatronix commented on GitHub (Dec 1, 2018):

no esp does the saving

<!-- gh-comment-id:443399976 --> @tablatronix commented on GitHub (Dec 1, 2018): no esp does the saving
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#649
No description provided.