Welcome, Guest
Username: Password: Remember me
General topics about hardware.
  • Page:
  • 1
  • 2

TOPIC: static ip for esp8266?

static ip for esp8266? 1 year 11 months ago #1431

  • leolopezglez
  • leolopezglez's Avatar
  • Offline
  • New Member
  • Posts: 9
  • Thank you received: 2
  • Karma: 0
Hello , I have the problem that every time you restart the ESP8266 modules by power cycling the power supply the IP address changes , and I can set up a static ip each module to never change ?
The administrator has disabled public write access.

static ip for esp8266? 1 year 11 months ago #1436

  • ArneiO
  • ArneiO's Avatar
  • Offline
  • Senior Member
  • Posts: 65
  • Thank you received: 13
  • Karma: 0
One way to do this is in your Wifi router. I have a D-Link router, and in the setup I go to Setup / Network settings / DHCP reservation. I can then ask the router to give a given MAC address a fixed IP address.

Alternatively, the ESP can request a certain IP address from the router. The command will depend on which firmware you're running.

In NodeMCU/Lua:
SSID = "YOUR SSID"
PW = "YOUR SSID PASSWORD"
IPADR = "192.168.0.126" //Requested static IP address for the ESP
IPROUTER = "192.168.0.1" // IP address for the Wifi router
wifi.setmode(wifi.STATION)
wifi.sta.setip({ip=IPADR,netmask="255.255.255.0",gateway=IPROUTER})
wifi.sta.config(SSID,PW)
Last Edit: 1 year 11 months ago by ArneiO.
The administrator has disabled public write access.

static ip for esp8266? 1 year 10 months ago #1760

hi ArneiO!

i'm new bie, i use arduino to connect with ESP8266, config ESP.
so with Arduino's code. What can i do to set static ip for ESP8266.
Thank you
The administrator has disabled public write access.

static ip for esp8266? 1 year 10 months ago #1769

  • EasyIoT
  • EasyIoT's Avatar
  • Offline
  • Administrator
  • Posts: 809
  • Thank you received: 252
  • Karma: 23
thesun93pp wrote:
hi ArneiO!

i'm new bie, i use arduino to connect with ESP8266, config ESP.
so with Arduino's code. What can i do to set static ip for ESP8266.
Thank you

you can set static ip for esp in router settings.
The administrator has disabled public write access.

static ip for esp8266? 1 year 10 months ago #1772

:) thank you very much! I will try!
The administrator has disabled public write access.

static ip for esp8266? 1 year 6 months ago #2403

  • leaosir
  • leaosir's Avatar
  • Offline
  • New Member
  • Posts: 1
  • Thank you received: 1
  • Karma: 0
Hi leolopezglez, I hope my answer not too late.

But if you want to put a static ip you have to write this command

AT+CIPSTA="192.168.1.100"
The administrator has disabled public write access.
The following user(s) said Thank You: godfish
  • Page:
  • 1
  • 2
Time to create page: 0.139 seconds
Powered by Kunena Forum