-->
Page 1 of 4

STATIC IP FOR ESP CWMODE=3

PostPosted: Sun Mar 19, 2017 7:46 am
by joem
what at commands is used for changing ip address of esp8266 (cwmode=3) so that every time the esp connects to the router the router will give static ip for the esp? like having a constant ip for the esp given by the router? Big thanks! I already tried AT+CIPSTA="192.168.1.8" but returned ERROR. Here's my AT COMMANDS set-up.

AT+CWMODE=3
AT+CIPMUX=1
AT+CWJAP="SSID","ENC"
AT+CIPSERVER=1,1234
AT+CIPSTO=28800

Re: STATIC IP FOR ESP CWMODE=3

PostPosted: Sun Mar 19, 2017 10:33 am
by jeffas
Rather than change it at the ESP, it might be better to assign the address that you want at the router, and leave the ESP to get the address via DHCP. Then, it will still work if you move to another WiFi access point.

Re: STATIC IP FOR ESP CWMODE=3

PostPosted: Sun Mar 19, 2017 3:29 pm
by joem
can i ask for help sir how will i configure the router so that every time the esp connects the router it will have static ip? big thanks sir!

Re: STATIC IP FOR ESP CWMODE=3

PostPosted: Sun Mar 19, 2017 4:42 pm
by jeffas
I can't tell you exactly how you would do that with your router, as they all have their own interfaces. But it will be under "DHCP" somewhere. There should be a list of connected devices, giving each one's MAC address and the IP address that has been assigned to it. One way that this can sometimes be configured is to click on the device to edit it. There may be a checkbox labelled something like "always use this address for this device".
If you can't find it, say here what model of router you have. I may be able to find information on it.
(The ESP's MAC address is hard-wired to a unique value and will never change.)