Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By aphawk
#54987 Today I have programmed my Nodemcu, that was used in my home, in my WIFI network, with the address changed to 192.168.0.99 .
Then I leave it to my office, that has a different WIFI name, and, as expected, my Nodemcu can't login, and shows the famous ESP network.
But I can't enter inside it !
My test program shows that my Nodemcu are using the address 192.168.0.99 , but I can't access any internal page.

My request is that when ESP8266 can't login in WIFI, he can be accessed in the IP that it have, or maybe the IP Address can be changed automatically to the default 192.168.4.1 in this case.

Paulo
User avatar
By Oldbod
#55201 Thinking about it, I'm not really clear what the problem you're trying to solve here is.

If you want to use a different ip address (either dhcp or static) in a different environment then you can check if the esp wifi.connect worked by testing when you issue the wifi.connect() - a successful connection will return a 1.

I don't know how you're connecting to the esp to find out what its ip address is, but if the esp is broadcasting its default network ap ssid then its ip address will be 192.168.4.1 unless it has been overridden.

The question I'd be asking myself is, "Can the device I'm using to try to connect to the esp actually connect to that address range? " .
User avatar
By aphawk
#55258 Oldbot,

Please try yourself :

1 -Change hte IP address to other , like 192.168.0.10
2 -Then, put the wrong name in the WIFI network name. By example, if your home network has the name "123ABC" , try put "ABC123" , and SAVE.

Now, when you make a reboot , your ESP8266 will have the famous ESPxxxxmacxxxxx name, because the module can't login in your network because the wrong name !.

Now, please try to access SETTINGS page to correct the network name......

You will note that this can't be made.

Only erasing all the flash, and rewrite the ESP8266Basic firmware you will have access again.

Paulo
User avatar
By Electroguard
#55264 There is a fallback mechanism to cater for people who change the lock on their front door then leave forgetting their new key... use the old key.

If you fail to connect to your ESP in whatever Station mode settings you've done, you should still be able to reconnect back to the original AP mode device name with the original 192.168.4.1 address - allowing you to edit your settings again.