8 years, 9 months ago.

Error recovery and lock up

Guys, how are you finding this device?

I spent a lot of time trying to get it stable in error conditions and came to the conclusion that the firmware was struggling to handle this. In most cases I found that a reset and re-connect was the best option after a time out. However it meant a break in the connection for around five seconds but this was better than total lock out that does happen quite often with the Wi-Fly library for the RN-171-XV.

Most of the errors occurred if a second connection arrived whilst servicing the first. I did find that the device would also effectively fall asleep and would take around five seconds to respond to an incoming connection. I couldn't identify a pattern but if a second connection request came during this in it would cause a lock out.

I did try enabling the watchdog, but that proved chaotic leaving the MCU not knowing the ESP had reset itself and required reconnecting.

I have had it working reliably at 230400 baud using a K22F MCU that made it quite snappy serving large web pages @ 2k sequentially, but I set it back to 115200 to be more compatible with slower targets.

I think the limitations are due to the small (2k) flash buffer, however if the firmware could enable a GPIO pin to indicate an error condition, the MCU could respond with a reset and reconnection faster.

Ultimately a Mbed version firmware may be necessary to get this thing usable.

Feedback would be good :)

Question relating to:

ESP8266 Socket Library. AT Thinker firmware. AT command, esp socket, ESP8266, espressif, socket, wifi

2 Answers

8 years, 7 months ago.

I had to add a (330uf?) decoupling capacitor on the mbed LPC1768's 3.3V supply - or the ESP8266 would reboot often. Might even need it's own 3.3V supply on some platforms or if anything else is hooked up. Current draw on the ESP8266 is close to the limit on the LPC1768, but looks like it should be OK per data sheet. ESP8266 Data sheet power consumption numbers might be a bit low in some cases! - Other posts said assume 250 or 300MA vs 200MA for it.
I was using the ESP8266 module that Sparkfun sells now. The firmware installed on it seems to have changed a few of the AT command text responses from the older ESP8266/mbed code examples I found. It sounds like some now have a larger external flash chip on the module (512k vs 1M). Seems very hard to figure out which one you have or will get when you order one just based on the web site info you can find on the vendor sites. Adafruit also sells them now and has more info than most.

Hi Jim, thanks for the feedback. I did run this device with its own 2 amp regulator, it seemed to fall over on high internet traffic. Perhaps the limited external flash is the problem hence they have increased it. I'll have to get some with the larger external flash and try again.

I was interested to hear other users experiences particularly that Mbed are attempting a proper library for it.

posted by Paul Staron 31 Aug 2015
8 years, 7 months ago.

I also used the ESP wifi board and had problems with power on the mbed. I ended up drawing upwards of 250 at times and would get the device in a locked state. I ended up implementing a reset/reboot. I am overly aggressive and reboot when I see slow or no responses for a handful of exchanges. I found the device would sometimes catch back up and start responding and others it would not so I played it safe and just set a count on the failures and force reboot. It works reliably for now but not pushing much data through it.

For the price it's a gem, but when it chokes, its frustrating.