ESP8266 AT+CIPSTART doesn't work before resetting.

I'm sending SSID and PW information from Android phone, and ESP8266 receives it and starts connection immediately. Problem is even though it connects WIFI and gets IP address etc, it can not start AT+CIPSTART="TCP","192.168.43.164",3000. Returns ERROR.

However, when I reset Arduino via reset button, it reloads SSID, PW from EEPROM, again successfully connects WIFI and gets IP address etc, BUT this time AT+CIPSTART="TCP","192.168.43.164",3000 works!

Any thoughts?

Iā€™m sending SSID and PW information from Android phone

how are you sending that?

J-M-L:
how are you sending that?

Simply creating an access point via esp8266 and waiting for a http get method sent from android. And read.

ESP8266 WIFI module has 3 modes of operation:

ST ā€“ Station mode in which ESP acts as a device & connects to an existing Access point.
AP ā€“ Access Point mode where the ESP itself acts as AP & other devices like Mobile can connect to it.
Both ā€“ ST & AP both mode is allowed in ESP.The mode of operation is set by the AT command

AT+CWMODE = 1 for ST mode , 2 for AP mode & 3 for both.

Are you using mode 2 or 3?

I'm using mode 2 for getting SSID and PW, after getting those, I switch the mode to 1, as it should connect to WIFI.

Connecting WIFI is not an issue. Just can't start a TCP connection.

would be good to see all the commands you run.

what's your CIPMUX?

I solved the problem by adding a AT+RST command before joining AP.

This is a good practice indeed