Skip to main content
Fix formatting and wording to make the answer easier to understand
Source Link

In my case when I try to connect to my router appears, I get the following output:

AT+CWJAP="myssid","mypassword"
WIFI CONNECTED
+CWJAP:1

FAIL
WIFI DISCONNECT
Just ESP8266 arrive home with DHCP disabled, it needs to be enabled

just try:

The reason is that the ESP8266 I have is setup with DHCP disabled by default. To enable it you can try the following:

AT+CWDHCP=1,1

In order to enable DHCP for STAIf that works, it returnsyou will get this message:

OK
WIFI GOT IP

In my case when try to connect to my router appears:

AT+CWJAP="myssid","mypassword"
WIFI CONNECTED
+CWJAP:1

FAIL
WIFI DISCONNECT
Just ESP8266 arrive home with DHCP disabled, it needs to be enabled

just try:
AT+CWDHCP=1,1

In order to enable DHCP for STA, it returns:

OK
WIFI GOT IP

In my case when I try to connect to my router, I get the following output:

AT+CWJAP="myssid","mypassword"
WIFI CONNECTED
+CWJAP:1

FAIL
WIFI DISCONNECT

The reason is that the ESP8266 I have is setup with DHCP disabled by default. To enable it you can try the following:

AT+CWDHCP=1,1

If that works, you will get this message:

OK
WIFI GOT IP

In my case when try to connect to my router appears: AT+CWJAP="myssid","mypassword" WIFI CONNECTED +CWJAP:1

FAIL WIFI DISCONNECT Just ESP8266 arrive home with DHCP disabled, it needs to be enabled

just try: AT+CWDHCP=1,1

AT+CWJAP="myssid","mypassword"
WIFI CONNECTED
+CWJAP:1

FAIL
WIFI DISCONNECT
Just ESP8266 arrive home with DHCP disabled, it needs to be enabled

just try:
AT+CWDHCP=1,1

inIn order to enable DHCP for STA it, it returns OK WIFI GOT IP:

bye

OK
WIFI GOT IP

In my case when try to connect to my router appears: AT+CWJAP="myssid","mypassword" WIFI CONNECTED +CWJAP:1

FAIL WIFI DISCONNECT Just ESP8266 arrive home with DHCP disabled, it needs to be enabled

just try: AT+CWDHCP=1,1

in order to enable DHCP for STA it returns OK WIFI GOT IP

bye

In my case when try to connect to my router appears:

AT+CWJAP="myssid","mypassword"
WIFI CONNECTED
+CWJAP:1

FAIL
WIFI DISCONNECT
Just ESP8266 arrive home with DHCP disabled, it needs to be enabled

just try:
AT+CWDHCP=1,1

In order to enable DHCP for STA, it returns:

OK
WIFI GOT IP
Source Link

In my case when try to connect to my router appears: AT+CWJAP="myssid","mypassword" WIFI CONNECTED +CWJAP:1

FAIL WIFI DISCONNECT Just ESP8266 arrive home with DHCP disabled, it needs to be enabled

just try: AT+CWDHCP=1,1

in order to enable DHCP for STA it returns OK WIFI GOT IP

bye