This is turning into a diary – my life with the ESP8266 – sounds like a serious disease.
Last night I tried increasing the speed at which my Arduino-like board talks to the ESP8266. I’ve been using 115,200 baud and it was suggested that the problem might not exist at HIGHER speeds. Sadly the Arduino-type boards just will not talk at much higher speeds – either because of inaccuracies or because of the resistive divider I use to talk to the ESP-01. As the results were SO bad at high speed, I thought I’d try a LOWER speed just in case, in fact it was my serial that was causing the “busy…s” problem – turns out it wasn’t.
So this morning I received a reply from one chap who has tried the LUA version of the ESP8266 software only to find it crashes for him when stressed. His example code is as follows:
i = 0 repeat print (i) i=i+1 until (i == 800)
Well there’s a surprise and another hope dashed for now. Meanwhile the latest Frankenstein code (all of this is referred to in previous blogs) failed last night – latest BINARY files go into a loop on powerup. Hopefully we’ll see another release of that tonight as the author is now aware of the issue.
For my own part, I received an email from ESPRESSIF to ask me to test an archive file they sent me – an experimental version of the software to see if the “busy…s” problem would go away. That was nice of them and it’s good to know that someone at least understands there is an issue. I’m including the contents of my reply and their email so you can see the problem and how it occurs.
Here it is in total….my response to Espressif followed by their original email trail – you’ll see they acknowledge the issue, were originally too busy but it’s nice to see them now trying to help. This is running at 115,200 on an Arduino-type board with 2 UARTS – one for the ESP-01, one for the Serial debug.
Thank you for the test code… but the problem still exists with the new code. Here is an example.
DOING A FULL RESET
So.. here is what I do..
I use an Android program called NETIO (http://netio.davideickhoff.de/en/)
My Arduino (Mega) uses TWO Serial ports at 115200 – one to talk to the debug serial you see above – and one to talk to the ESP-01 board… hence there are responses above from the ESP-01 AND messages from the board. You can see at the end I am doing a reset to make the board recover but this is not the solution.
Here is what happens…
On power-up my program looks for a valid IP address and if it does not find one it sets up the board. It sends one instruction at a time, waiting for the relevant response – or a timeout.
It sets up the connection to my router then sets up a TCP/IP listener on port 4000. From there, when the APP is running on my phone that sends requests for button status to the ESP-01 – and my board picks that up and sends responses… to say a LED is on or off…
The board then receives messages from the Android APP
The instruction is requesting the state of LED1
Arduino sends back a reply…
i.e. It is sending 3 characters = “0” followed by CR/LF.
So typically we see checks for 4 LEDS as such.
The above shows 4 requests for status – for lamps 1-4 and the Arduino sends back “0” in each case for lamp OFF (or “1” for lamp ON).
This happens continuously.
This works perfectly.. BUT… at any time I might turn the phone off [or swap apps] – or go out of range. Much of the time the data simply stops – and recovers when I start again – but SOMETIMES as in the example above – the BUSY_S occurs and that is the end of it, a reset is required…
Can you help eliminate this bug. I have no control over the NETIO APP – which works utterly perfectly with wired Ethernet.
Please test bins as the attachment， if it still has “busy s”problem or not
boot_v1.1.bin downloads to flash 0x00000
user1.bin downloads to flash 0x01000
esp_init_data_default.bin downloads to flash 0x7C000
blank.bin downloads to flash 0x7E000
If it still has“busy s”problem, please tell us your test steps, list of AT commands that you sent.
Thanks for your interest in ESP8266.
From: Peter Scargill
Date: 2014-10-30 17:39
Subject: RE: Esp 01
Thanks but many of us merely want to USE the module, not develop it – I have no experience of using GCC and the Linux environment, I simply want a WIFI module that works. Please fix the firmware so that the “busy s” problem goes away..
Sorry, our schedule is so full that we will put this till later,
but our code is open source now, on BBS http://bbs.espressif.com/
You can get full source code and do your own development
From: Peter Scargill
Date: 2014-10-30 15:57
Subject: Esp 01
Esp01 esp8266… When will we see a fix for the “busy s…” Problem?? We
are unable to make serious use of these boards until this is fixed.
Currently using 0922 version software.