Page 1 of 1

STA Got Same IP:192.168.0.108

Posted: Sun Aug 13, 2023 6:57 am
by vikdasbros
Connecting to wifi using this code :

Code: Select all

WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Debug Message :

09:33:26.375 -> [ 9901][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: VIKDAS BRO'S, BSSID: 18:a6:f7:d8:3d:30, Reason: 2
09:33:26.375 -> [ 9901][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
09:33:26.407 -> [ 9909][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 2 - AUTH_EXPIRE
09:33:26.407 -> [ 9916][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
09:33:26.407 -> [ 9942][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0

/*****************************************/

There after, I used :

Code: Select all

void WiFiStationDisconnected(WiFiEvent_t event, WiFiEventInfo_t info) {
   WiFi.disconnect(true);
   WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
}
Debug Message :

[615210][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got Same IP:192.168.0.108

/*****************************************/

There after, I used :

Code: Select all

IPAddress staticIP(192, 168, 0, 108); // Choose a suitable static IP address
IPAddress gateway(192, 168, 0, 1);
IPAddress subnet(255, 255, 255, 0); WiFi.config(staticIP, gateway, subnet);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Debug Message :

[795211][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got Same IP:192.168.0.108

Action Taken :
* Router Reset
* Esp32 replacement
* Erase flash

What Should I do now?