B4R Question How to change default ip of ESP8266...

rbghongade

Active Member
Licensed User
Longtime User
Dear friends,
Can we change the default ip address"192.168.4.1" to some other address for ESP8266 in AP mode? Is there any method to do it?
 

rbghongade

Active Member
Licensed User
Longtime User
Dear Erel,
I want to make a sensor array with each sensor having its own ip and wifi where a wifi router is not available. Somewhere I got hold of a webpage which describes the process of changing default ip in AP mode but unfortunately I lost the link to that webpage . Shall try to find it again and post the c++ code here.
 
Upvote 0

candide

Active Member
Licensed User
with in line C it is possibe:

WiFi.mode(WIFI_AP);
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
WiFi.softAP(ssid, password);

full configuration is :
WiFi.softAP(const char* ssid, const char* password, int channel, int ssid_hidden, int max_connection)
 
Upvote 0
You don't need to change the ip address for this configuration. You just need to make sure that the ssid of each ad hoc network is unique.

Sounds to me that it will be more useful to connect all the sensors to a single ad hoc network.

Thanks to all for directions to change the Default IP 192.168.4.1 to any desired IP in Access Point mode. I have succeeded.

BUT the idea needs to elaborate in detail which Erel told in the above quoted post #4.

I have some sensors/switches connected to ESP8266 and want to get data from them to single app or single ESP8266. It seems that Erel's idea is good but how it will implemented, needs a detail. Thanks.
 
Upvote 0
Top