Comments (6)
Absolutely @gilmaimon, I have done a similar thing on https://github.com/reivaxy/iotinator.
After the master ESP8266 connects to my home SSID using DHCP, it POSTs its IP address to www.iotinator.com where I have set up a mySql database and some php scripts (from the same repo) to record it.
Then, querying HTTP GET my.iotinator.com will return the IP of all the modules connected to the same network as the gateway used by the querying client. If there is only one, the response is a redirect to that IP.
So I no longer need to know the IP of my ESP.
from espwebserver.
Hi,
Would printing the IP to the serial port do ?
Here is what you could do:
wifiSTAGotIpHandler = WiFi.onStationModeGotIP(onSTAGotIP);
void onSTAGotIP (WiFiEventStationModeGotIP ipInfo) {
ipOnHomeSsid = ipInfo.ip.toString();
Serial.printf("Got IP on %s: %s\n", config->getHomeSsid(), ipOnHomeSsid.c_str());
}
Otherwise if the ESP is both STA and AP, you could have the AP provide a small webpage on its IP (since you said you know it) and serve it to display the STA ip.
You could also attach a screen and display the IP address on it :)
from espwebserver.
from espwebserver.
Well, you could do an ip scan :(
Do you know its Mac address ?
from espwebserver.
@reivaxy : Every time scanning the IP will be the option i can consider, but still looking for more suitable way to make it work.
is the mac address of the esp fix ? does it change ever? so that i will try to find the solution to get the ipaddress from mac address.
Can we find it in a desktop app developed in c# ?
from espwebserver.
You could have a third endpoint (like an AWS server) with a fixed ip. So that when the esp wakes up it will "register" it's local ip on that server (with some unique id you will hardcode, in case that you have multiple devices).
EDIT: also, for me mDNS works fine on STA mode.. Maybe you are accessing it the wrong way? maybe from a client that does not support it?
from espwebserver.
Related Issues (15)
- This doesn't work with esp32 HOT 2
- WebServer and DeepSleep
- ESP8266 webserver allows only 5 clients . how to increase the number of client (upto 20 clients)? (HTTP error : Connection Refused )
- does this webserver support resume in downloads?
- FS.h?
- how increase file transfer speed?
- Internet access required
- url decoding is performed early on x-www-form-urlencoded buffer HOT 1
- Incorporating bbx10's work?
- How to remove the handlers to reuse the server
- how to build interactive (Ajax) server in lua
- ESP8266 Web Server stops responding after a random period of time.
- Ethernet enc28j60 Bind Support
- How to hide the System Volume Information folder and the index.htm file.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espwebserver.