Chat freely about anything...

User avatar
By walt22
#4194 Hi,

I got my ESP running and it works well, but with one exeption:
AT+CIFSR delivers "ERROR" instead of the IP address.

As a host, I use a STM32, which communicates with the ESP at 115200 Baud. It initialize the ESP with the following sequence:
Hard reset
AT+RST => OK...ready
AT+CWMODE=3 => no change
AT+CIPMUX=1 => OK
AT+CWJAP=.... => OK
AT+CIFSR => ERROR
Afterwards I start a TCP-Server and send and receive messages from a PC client without errors.

In case, I perform the same sequence by hand via Teraterm, the IP address will given properly.
My chip is ESP8266EX, firmware is 0016.

Any idea what the reason for this is? New firmware?

Many thanks for your hints
Walter
Last edited by walt22 on Mon Dec 08, 2014 5:08 am, edited 1 time in total.
User avatar
By platforma
#4205 AT+CWJAP takes a few seconds to join your AP, if you're trying to get your IP too fast, it will indeed, return an error.
Does it work if you do it manually? Just try sending commands one by one, or put a few second delay in your code after connecting to the AP.
User avatar
By platforma
#4230 That's all good, glad to be of help!
The worst thing is you can't predict the amount of time it'll take to connect. But you can have some more clever stuff like timing out if IP is not received and trying to reconnect again...etc. etc.
Mark the thread as [solved] so others can find the solution quicker :)