Questions with regards to ESP8266 Basic and hardware interfacing and control via Basic commands

Moderator: Mmiscool

User avatar
By DG4EK
#66108 Hello,
I just spent the night with trying to change the IP adress using SETTINGS, but it didnt work,
the ESP allways came up with 192.168.4.1 regardless what I put into the field called IP.
The result is that it cannot connect to my router because it uses the fixed subnet mask FF:FF:FF:00
which I cannot change (I tried to give the ESP the IP 192.168.0.81).

Can anybody help please? What can I do?

Thanks a lot, regards
Peter
User avatar
By nedudgi
#67372
DG4EK wrote:Hello,
I just spent the night with trying to change the IP adress using SETTINGS, but it didnt work,
the ESP allways came up with 192.168.4.1 regardless what I put into the field called IP.
...

We don't see, what You did in SETTINGS. Try to start with DHCP, leave the IP address field empty.
User avatar
By Electroguard
#67394 Go to SETTINGS, Station Mode (Connect to router):
In Name: enter the SSID of your router
In Pass: enter the routers password

Assuming your wifi router is configered to issue DHCP addresses to connecting clients the ESP will be assigned an IP address by the router.
If not, you will need to manually assign IP parameters... but don't go there unless you have to.

So if you have previously entered any address or subnet mask info anywhere - and you are not 100% sure of what you are doing - then clear it all out.

Click the Save button at the bottom
Click the Reboot button at the bottom

Assuming your wifi router authenticates the details you have given, the ESP device should restart and automatically connect to the router.

The allocated DHCP address will be the one you need to enter in the browser address bar to access the devices EDIT page etc (as you do with the default AP of 192.168.4.1).

The easiest and surest way of knowing what address has been assigned to the device is to have a serial port monitor connected during device bootup, which will show the allocated IP address (or else show the failed connection).

Don't forget to disconnect wifi from the old 192.168.4.1 AP and connect to your wifi router which your device is now connected to.
Now you can access that device IP address from the browser as normal.

If the device fails to authenticate and connect to the router, rather than leaving you adrift in a boat without a paddle it should help you safely back to shore by giving you the default 192.168.4.1 AP - so the default AP address is acting more like a lifeguard when you get yourself in trouble than a big bully that's preventing you doing anything.