-->
Page 1 of 1

Keep getting IP of 0.0.0.0 on AT+CIFSR command.

PostPosted: Thu Aug 25, 2016 2:46 pm
by tgcoder
I'm trying to connect to an ESP8266 ESP-12 using an AT+CIFSR command to get the IP address. Here is my sequence of commands.

AT+RST
AT+CWMODE=1
AT+CWDHCP=1,1
AT+CIFSR

Returns:
+CIFSR:STAIP,"0.0.0.0"
+CIFSR:STAMAC,"18:fe:34:f4:ce:c4"

On an AT+GMR command, I get:
AT version:0.21.0.0
SDK version:0.9.5

Am I missing a step or something here?
Terry

Re: Keep getting IP of 0.0.0.0 on AT+CIFSR command.

PostPosted: Sat Aug 27, 2016 8:28 am
by tgcoder
What I finally figured out is that I needed to quit the AP with an AT+CWQAP and then rejoin with an AT+CWJAP. After doing that doing an AT+CIFSR gave me a valid IP address. Therefore:

AT+CWQAP ==> quit the AP
AT+CWJAP ==> join the AP
AT+CIFSR ==> valid IP address now.