ESP8266 Now Working/Updated

tmp4A50Getting this pesky ESP8266 working has been one of the most frustrating things I’ve done in recent months. Thanks to a combination of newness, just plain WRONG information out there and documentation slowly and sometimes inaccurately being translated from Chinese – not to mention software bugs, I’ve spent several evenings getting myself annoyed at this new and interesting WIFI product from China, until last night when it finally all worked.

For anyone looking in here who is wondering what this is about – I’ll explain – for those looking to fix something – skip to Cheap WIFI. For instant results (like maybe you don’t think the board works as I didn’t – check out my short video but do come back here.. http://youtu.be/08RlcuyeKSI )

The ESP8266 is a VERY low-cost tiny WIFI module for embedded systems. Anyone familiar with, for example Arduino will know that just to open a remote web page via the Internet will cost you most of your code space and almost all of your RAM memory.

I will refer to Arduino here as that’s one of the cheapest and most popular ways to do embedded processing – in fact I use a chip called the ATMEGA1284 and build my own supporting hardware as this chip has more memory and more IO than the standard ATMEGA328 – but I’ll argue here from the perspective of the standard product.

Ethernet Card: A typical Arduino installation of Arduino processor and standard Ethernet card will see at least half of your available FLASH memory used up to simply open a web page. The Ethernet card will cost you between £10 and £30 depending where you buy it from.

EN28J60 Board: These are the cheap end of the Arduino Ethernet spectrum coming in as cheap as £4 but with another price – the chip is fairly primitive meaning you need a lot more software in the Arduino to make it all work. There are a couple of libraries, i.e. Ethercard which is frankly awful and Arduino-UIP which emulates the standard Ethernet library but who’s client software is unreliable and either way you lose most of your RAM memory and again end up with less than half of your program space left. This board needs 3v3 to operate.

WIFI Solutions: The above boards assume you can hook up a wired Ethernet connection. There are also WIFI solutions varying from solutions as above with WIFI added to the rather novel idea of having an intelligent board you talk to serially using AT modem commands. The latter have the advantage of dramatically reducing the amount of FLASH and RAM memory needed – but the downside has always been the cost. By the time you’ve finished you end up with a product that is just too damned expensive and you may as well have cannibalised an Android tablet.

Cheap WIFI: Along comes the ESP8266 – a board from China, using a 32-bit processor with on-board aerial, requiring a few simple commands to get a WIFI connection and a cost as low as £3 – this is potentially THE BUSINESS.  Out there very many people have ordered, very few have results – and is it surprising? Most of the examples of code are based on one or two originals and are just plain wrong.

Typically you will see code that shows a connection to your router – and time and time again when the response “OK” comes back  the articles will suggest you have a connection.. NO, NO, NO. Not in the early versions of the board’s software.  The board features the ability to look at the IP address it has been assigned – and if that does not respond with a valid address, you are not connected.  When actually setting up the AP and password the board will come back and say OK to any old rubbish provided it is formatted properly. You NEED to ensure you have a valid IP address. Up to now I can’t see how to set this manually – that in itself is an issue but one thing at a time.

It LOOKS like (still testing) the latest version of the software (which will likely NOT be included in the ones you get from the factory) now comes back with a useful indication of success or otherwise when you actually try to connect. By latest version I mean..

AT+GMR  returns this….    0018000902

See lower down as there is more than one set of software bearing this version number.

I’ve spent nearly 2 weeks using a version that simply doesn’t work properly – and only now have I found an article that actually tells you firstly how to get the software up to date but also potentially how to keep it up to date (that bit doesn’t work for me yet ) and even then, some of the responses from the unit are distinctly poor English… like this one.. when sending data to a website for which you don’t yet have a connection, the board replies “link is not”.  I think we’re a long way before this can be described as “the finished product”.

Some time ago I made myself a little PHP page to return the time along with lighting up times for my area – this is for a home control project.  I  did this because NTP time servers are notoriously busy and just not something you can count on and then if you want lighting up time – you have to write some code to work this out.. Would it not be great, I reasoned if I could offload this work to my own website and those of a few others (preferably using other providers) for backup.

The web page returns the usual header stuff and this simple statement…

{time=1412468381;timestr=01:19:41 05-10-2014;dawn=06:42;dusk=19:09}

In there you see the time in a format suitable for Arduino real time clock software, you see readable time and you see dawn and dusk. By adding parameters to the page call I can make it work for any area in the world. LOVELY but for many projects, like my wife’s SAD TIMER, adding an Ethernet card and an Ethernet cable to the project is a no-go.. hence my excitement at seeing the EAP8266 board. for a nominal sum I could add time facility and do away with all that display and keyboard nonsense necessary just to set the time!! I could even develop a nice web interface to the page for setting different days etc. and return that in the string above…. the sky’s the limit.

But no, try as I might, I spent over a week trying to get this little board to talk to this simple web page.

Last night (or technically this morning) that all changed and it works. I’m documenting this to save others a LOT of wasted time.

So, you have your little WIFI board and I’m hoping you have an FTDI board, if not, get one – in other words a USB serial convertor used for programming some types of Arduino and talking to devices over serial from your PC. They cost a few pounds only.

Read THIS article and it will show you how to talk to your new ESP8266 board AND how to update it from a file (link is in the article) and potentially from that point how to update it automatically via the web. THIS article was the turning point as it correctly describes (for my board and note not all boards are identical) the use of the control wires often ignored elsewhere.

http://blog.electrodragon.com/cloud-updating-your-wi07c-esp8266-now/

This article http://hackaday.io/project/3072/instructions shows a diagram of the board itself and was particularly helpful – I do indeed use the CH_PD wire, the example suggests a 10K resistor holding it to 3v3 but I just shorted it to 3v3.  For boards like mine – NOTHING works unless you do this. You can’t send or receive AT type commands to the board if you do not connect up this wire.

So we’re talking 5 wires for normal use… 3v3 and ground, signal in and out – and the CH_PD wire held to 3v3. IN ADDITION if you want to program the board itself, using the software in the first link, you’ll need to hold GPIO0 to ground and release when done.

With those wires and nothing else connected, I’ve managed to upgrade the board almost to the version mentioned in the first link – but more importantly, it now works. Once you have selected your access point (AP) and settings and successfully achieved an IP address, you can turn the board OFF – back on and it needs NO code to get hooked up and get that IP address again as the details are stored in EEPROM.  Sadly you cannot easily test all of this with just a serial connection to the PC unless you have a fairly advanced piece of modem software (unlike the Arduino IDE serial monitor) because by the time you’ve connected to a page and then started typing commands to it, the thing has timed out (see later-  you can now control the timeout).

So a combination of setup and testing with your PC and then some simple Arduino code and you should be up and running in no time.

Oh, wiring before I forget – I’ll assume you have a 5v Arduino and this thing needs 3v3. Note that you really do want a decent amount of power at 3v3, maybe 300 ma or more – check elsewhere as I’m not sure the actual requirement but I suggest for experimenting you ensure plenty of power is available. In my case my own 1284-based boards have a 1amp 3v3 regulator on-board so power is not an issue.

Things to remember… this little board can talk to web pages – and you may find yourself taking in more than 64 characters at once – why is that important? Well most of the writers out there seem to have missed this – the Arduino can only take in 64 characters into it’s internal buffer before throwing the excess away!! The existing Serial.wait() function call that some writers out there advise using – falls fowl of this limit – so I wrote my own. The limit incidentally is set in software in the Arduino and you can go poking a file and fix it – I’ve written about that elsewhere – but of course in the standard Arduino you only have 2K of RAM so you don’t want to get too ambitious – but my preference is for a 256 byte buffer.

Ideally you want to wait X amount of time for incoming characters until you see a string – like “OK” – and THEN wait another Y amount of time in the loop just to get rid of any rubbish that might come in after that, returning a result and a nice empty buffer. That’s a fairly easy thing to write and you can test it with the PC serial port and a standard Arduino. So for modem use you might say  mySerialWait(“OK”,5000,200);  or wait for up to 5 seconds for incoming data – if you get nothing, return after that time with a FALSE response, if you see “OK” in there, scrap the original delay and  hang around for another 200ms and come back with a TRUE response.. Well, that works for me. I’ve since added parameters to optionally store useful info in an array and have a working “light on, light off” demo as per the video referenced elsewhere. That will soon turn into a fully blown SAD light controller.

I am experimenting with code that returns the information from my web page and as yet does not do anything with it – the TOTAL code (no libraries) is just over 3K – compare that to ANY other Arduino Ethernet solution.  Something in the back of my mind says this serial approach is going to have some severe limits – but already it is the solution to my wife’s SAD light for very little code!  I can make a really sophisticated web page, store all the settings from, say a mobile phone into a web page (SQL database) and every now and then the little SAD light can poll the page to get all the updated info, ready processed for use. Lovely. Well, that’s the plan.

Today I discovered THIS link http://www.electrodragon.com/w/Wi07c

This has commands not featured in other lists – including CIPSERVER. I need this to serve up a TCP socket!!

So how do you do this? I set up a little socket communicator on my phone as a socket talker – with 2 buttons.

On the WIFI board I set CIPMUX=1 – you have to do this on power up unlike the rest of the stuff – if I was to set up a client to a web page I’d set that to 0 but this CIPSERVER command will fail if you do that.

Bear with me. I set up AT+CIPMUX=1 then AT+CIPSERVER=1,4000   that means start a socket listen – on port 4000. It says ok and sits there.

I press a button on my NETIO setup – which is pointing to the WIFI address of the board – and set up to send to port 4000.  Magically – the board responds…

+IPD,1,4:YES

and the button on NETIO remains sunk it. That first figure is 1 is the ID of the command….

I send AT+CIPSEND=1,4   – which say I’m going to send 4 characters back – to ID 1 on this socket.   I get a little > in the response window..  I type nothing more than OK in the terminal window and hit ENTER

> OK

SEND OK

As if by magic, the little button on my NETIO Phone app lifts up – all is well.

But after a while I get “unlink” – that’s my phone timing out – bring the phone back to life and I can talk to the WIFI unit again with no further action needed on the WIFI link… AT+CIPSTO? says 180 seconds timeout but it’s kept on working WAY beyond that…

Not sure yet what I need to look out for in terms of the thing timing out… but right now – I’m THAT far off having a working controller APP on WIFI!!

I do with they’d fix the error message “no this fun”

Update: the software version you should be looking for is this…

0018000902

HOWEVER if you got that from the CLOUD update – it is NOT the same as the later 922 version which still sadly calls itself 902 and reports the same but in fact NOW defaults to 9600 baud… and will let you use stupid high baud rates as well as new commands. See these docs – the first is how to update – and the second at the bottom has the actual latest update, the third has the pins!

http://blog.electrodragon.com/cloud-updating-your-wi07c-esp8266-now/

http://www.electrodragon.com/w/Wi07c

http://hackaday.io/project/3072-ESP8266RetroBrowser

If you want to read all about what started this off – ie my home control stuff – check out www.scargill.net

Update: Two more things – I now have the board running as a socket listener – which is ideal for, say pressing a few buttons on your mobile phone to turn things on and off.  I’ve discovered how that works – and how it doesn’t.

I’ve been doing some further work with the ESP8266 – as I want it to act as a Socket listener.  Check my posts to ensure you have the latest firmware because without that you won’t be able to use the command AT_CIPSERVER.
Armed with that update, in order to use this mode, you must first set CIPMUX=1
i.e. AT+CIPMUX=1
Then to activate the listening mode for, say port 4000, you should use this.. AT+CIPSERVER=1,4000
The “1” is for start.. 0 for stop is supposed to work but I found that needs a reset…  once in that mode the ESP8266 will reliably STAY in that mode..  I wrote a little code to work with NETIO software on my mobile phone so I could press buttons and have the Arduino talk to me – when reading this code bear in mind I have 2 serial ports on the 1284 chip…

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

void loop() 

{ 

Serial.println(F("Changing mode")); 

Serial1.println(F("AT+CIPMUX=1")); 

SerialFinder(Serial1,"OK",4000,200); 

char PROGMEM cmd[]="AT+CIPSERVER=1,4000"; 

Serial.print(F("Sending ")); Serial.println(cmd); 

Serial1.println(cmd); 

SerialFinder(Serial1,"OK",3000,200); 

while (1) 

{ 

   if (SerialFinder(Serial1,"+IPD,0",1000,20)) 

        { 

         char PROGMEM cmd2[] = "OK\r\n"; 

         Serial.print(F("Sending AT+CIPSEND=0,")); Serial.println(strlen(cmd2)); 

         Serial1.print(F("AT+CIPSEND=0,")); Serial1.println(strlen(cmd2)); 

         Serial1.print(cmd2); 

        }  

} 

}

SerialFinder (I wrote myself, trivial, waits for the string and returns true or false after a further delay – that simple).
So – it all works a TREAT… it’s waiting for “+IPD,0” which just so happens to be what comes back in this case, might be different in yours, followed by some info on whatever key you press on the phone – I’m not ready to start parsing info yet, just testing reliability, so no matter what it sends, I send back “OK”.
Now all of this works REALLY reliably. However, if I press buttons on the phone too quickly – the board at some point returns “busy” or otherwise locks up. It’s pretty hard to replicate and happens only occasionally but trust me it DOES happen and resetting the processor does you no good most of the time.
You need to reset the ESP8266.. and there is a reset line for that. It will re-establish the connection to your router etc and will simply need you to re-send that CIPMUX command and put it back into server mode.
So now our simple serial chip is not quite so simple – needing RESET and CH_PD pins (CH_PD is on my setup permanently hooked to 3v3) and GPIO_0 if you want to go flashing the board – which is easy – see my blog).  So if you want to reset the board from your 5V Arduino you will need a resistor divider pair just as you did for CH_PD. Actually as reset is hardly a high speed effort – you could use a 4148 diode pointing to ground… I’ve tested that and at least on a rig it works well.
As far as I can tell, no matter what goes wrong, the ESP8266 recovers if you use that reset pin. More as I learn more. It would appear that NURDSPACE site now has now been updated to include the CIPSERVER command but still claims the unit runs at 57k baud. Last but one version actually ran at 115k baud and latest defaults to 9600 baud and you can then set whatever speed you like, right up to 512k baud.

28 thoughts on “ESP8266 Now Working/Updated

  1. Hi Peter, I wish you’d written this two weeks ago! I’ve been through almost exactly the same trial myself! I’m using a Teensy 3.1 to control the ESP8266 btw

    • To be honest, 2 weeks earlier I did not have the knowledge to make the patch which was then necessary to do the rest. I plan to return to this at the weekend, there is still the possibility of a “busy” signal – one guy reckons had has a patch, another is about to tell us how to compile our own version etc, OR I’ll put a resistor divider on the reset and handle busy signals with a reset, either way before I do serious work with this board (and I’m sure that applies to many others) it has to be bulletproof so it can be left in remote locations (in my case, Spain is one of them). I have a rig already to go and funny enough I have a Teensy 3.1 on the way to play with – feel free to tell me what if anything I have to do with the Arduino 1.05 environment (which already has the Teensy mod as it fixed that daft vertical menu problem) to use the Teensy. I think I’d like to see someone develop a default setup for the board so one can then use a web page to set it up – just like you do with a router. That would save recompiling code when changing locations.

      All exciting stuff providing the improvements and information keep flowing.

  2. Hi Peter,

    I stumbled across your blog. I didn’t have too much trouble getting my ESP to work. So that’s the good part. I’ve not be able to flash the thing (but now I read you need to connect yet another PIN, I’m just not sure I have the right equipment for it) but I’m in no hurry to Flash it as it pretty much just works for me.

    Only thing I’ve not been able to fix is resetting the module. I have it running as TCP socket server on my Arduino and as you mentioned that server times out after a few minutes of no comms. I have to complete power of the Arduino a reset wont do the trick, which is ennoying..

    Issuing a reset from code would be my final resort and you have pretty much explained how to do it (Thx!) but ideally I’d like to check if the server is still up and if not then issue the AT commands to set it in server mode again again.

    Have you found a way to do this? Maybe I could just check every 5 minutes if I can still send something to self (localhost?) and if I cannot I conclude the server is down? Just some thoughts..

  3. Hi Pete, make sure you have the latest Teensyduino & check the Teensy forum. The PJRC website is pants but the products & support are superb!
    I’ve done a little write up of my dabblings, primarily for my students. I’ve made it bomb proof! Hard reset the little bugger! 🙂 Hardly ideal if you’re using it as a server but it’s not a problem in my (client) application. It’s here: http://www.cse.dmu.ac.uk/~sexton/ESP8266/
    Incidentally, I’m from up north – I come from Newcastle. Spent many pleasant hours in the pub in Wark 🙂 30+ years ago…

    • Hi there Ian. Looks like you have spent as much of your life on this board as I have and thanks for the link will study later. . You are absolutely right that most people are blindly copying bad examples. Right see my latest item… I’m not totally convinced so called hard reset ia actually a real reset as tests tonight with socket server code (turns a led on and off using android phone…yes I will share when I crack the problem) will very rarely crash with the ESP8266 claiming BUSY and the hard reset is just like yours in code does NOT always bring it back and it does not show the power up information. My home made 1284 Arduino generates well over .5amps so power isn’t involved. Right now I don’t have a complete answer though sitting here having made my reset 1 second instead of a shorter one – I cannot right now get things to fail.. Hoping someone comes back with a firmware fix. Buy all means fire questions or suggestions

  4. Isn’t that funny – you did the same thing as me first time – except where you pulled out the date, I wrote a web page to get the time from the server (it never even occurred to me it would be in the header) – convert to local time and also give me light up and dawn time (by adding longitude and latitude – basic PHP stuff). So my first program – which works – gets that info.. I then decided to try server and tcp socket and that’s when I discovered the reset issue.. so now I can add the reset code into the first program – but really, we need to try to get a firmware upgrade. One guy has made one but he’s based it on too early a version of the firmware. I’ll be keeping an eye out for updates there and will post on my blog when I find something – meanwhile, though the reset code is a last ditch cluge – it does appear that we have a working WIFI solution! Just needs a nice gui now for setup.

  5. Hi Peter – great post, you got me unstuck. I was using some older/wrong/misinterpreted doco that had me expecting CH_PD to put the module in firmware update mode – not ‘make it work’ mode :). One other wrinkle was when using a pc based terminal program, ensuring it sends LF or CR+LF on enter – mine was just sending CR.
    Cheers

  6. Hi,
    Yes, without doubt, a very helpful write up, and thanks for publishing it. Spent a couple of frustrating hours sorting it, but without your help, this would have been days, and a loss of a lot of cognac!
    The unit I ended up with turned out to have a 115K communication. Using a Yun, with YunSerialTerminal worked well using ‘~1’ to set the speed. Even supplied the 3v3 fine. Not ideal but saves a bit of wiring. Just a 2K/3K dropper on the Xmt line.
    Turns out this is a 00160901 version, which has CIPSTO, so all was well.
    I used a UDP/TCP Server Free app on my android phone, which has 18 preset buttons, all configurable. Easy set up, and using UDP sent and displayed all the messages.

    I used it in its AP mode, which, after the initial frustration looks pretty solid and fast. Add a little processor like an ST8 etc, and it will become a very useful gadget .

    Thanks again for taking the time and sharing it.

    • I’m glad people are getting some benefit. For me now the only real issue is this “busy s” mode which I am sure is fixable in firmware… if you send lots of info back and forth eventually you will come across the message “busy s” – in the older firmware the only way out was a hard reset, but one fellow has added a new command that resets the unit – if you are for example being a webserver or whatever, you have to use the reset command then fire your commands back in to set the unit up as you had it… what I don’t understand is why this can’t all be done in firmware and why the unit would be busy anyway and why that busy isn’t cleared when it’s not busy any more. Surely the unit has a serial buffer for incoming commands – so there should be no circumstances whereby it STAYS busy. I have implemented a switch so that I can stop the Arduino doing anything when the busy command comes along and can switch to a terminal and I can confirm there’s no way out of it other than the newer reset command…. this needs sorting out in the firmware. If I put remote control on something like a light or heater or whatever… it’s no good one day on when I’m out of the house finding I can no longer talk to the unit… it has to be reliable to be of any use. Hardware Ethernet card versions of such controllers work for many months without a glitch.. I search the web daily to see if anyone has made progress or the designers have created a fix. SO many possibilities….

    • The AP mode – that in itself is reliable – but for example as an AP (access point) if you open up as a server.. and send stuff back and forth… it WILL eventually give you the dreaded “busy s”.

      Hopefully we’ll all resolve this sooner rather than later.

  7. Yup, not very nice at all that ‘busy s’ business. Great shame, hopefully as you say, will be sorted. Think I’ll go back to the TI cc3200 Launchpad, which is the best I’ve found so far. Still waiting for their module to come out though. For £20, it’s solid, serious and fast, and now has energia support for those that want it.

  8. To be fair it’s a new product and they have acknowledged it needs a fix. Shame the people selling the chip hadn’t bothered to test it before rushing out to get the sale. With a cluge to reset when I see “busy s” I do have a controller running night and day just controlling some LEDS but the problem is the busy does not come about until you try to use it so you get a delay sometimes when running your app to control stuff – which is very annoying.. I’ve been checking today, nothing yet.

  9. I’ve had quite a few stalls where it won’t come out of the busy s, but I’ve been experimenting with using fixed 4,8,16,32 etc bit send lengths, making sure all character spaces are used. Sure, a few busy waits for up to a second, but no lock out yet. This unit isn’t what I would call fast, but usable for certain situations if it doesn’t fall over. I’ll obviously have to run more tests, maybe it’s just in a good mood! (not like me:) )

  10. Yes, it must have been having a good hair day. I set it up for a repetitive send every couple of seconds, using a simple STM8 @ 230K. Fine for hours, then not so! I see the monitor led line echoes the commands, with something tagged on the end. ho hum. keep searching till beaten.

  11. Hmmm… something that hasn’t ‘busied’ at all or failed on a busy …. Trying your netIO. I set up couple of sliders, two buttons, and a plain button to receive sent data. STM8 again, in assembler, set up at 115K, no real delays anywhere.( only to allow for normal esp response time … no waiting or looking for ok’s etc.. so no safe guards)
    Set interval on button1 to 300mS, sending simple data to turn a pin on in the STM8. The code in the ST then cipsends back a 0 – 99999 up counter, in response to that command.
    Sliders control pwm in the ST, and second button switches off the first pin.
    Response is immediate and very fast, with never a hint of busy. The only time that I can get it to fall over, is to go silly with the sliders, holding down, and sending continuous data streams, and even then it’s not easy to do. Does a wdt reset cause:4. I can’t get button presses to cause any probs, regardless of how fast I action them.
    (Using esp as the access point). Time out is default 180.
    Cipstart remains as set. mux=1, server=1,port cipsend set for 0,9 (5 digits sent).
    Best working setup so far.
    button 1 sending 3 times a sec, pressing button 2 at four times a sec, for last minute ( old muso, no problem!) not one busy. Maybe something in this?

    • Hi

      Yes you can use it pretty much any way you want – and as fast as you like and only occasiona\lly will it fall over. Where it WILL fall over is when it gets a partially complete command – which in real life will happen all the time – you’re using it with NETIO and you swap apps, or close the app or get a phone call or go in and out of range on the phone – at that point it goes into busy mode. Of course you don’t notice it until the next time you try to use the APP and it returns busy – at which point a check in the serial routine can of course reset the unit – BUT you’re now inconvenienced for a few seconds while it resets… Great that someone else is giving this a hammering. So I’ve just come back from holidays and while away I asked the designers when they would fix this acknowledged issue – their response was somewhat disappointing – they’ve been too busy apparently and anyway they’ve made it open source – which is FINE if you have nothing else to do for several days, fully understand the compiler and don’t mind getting to grips with the code and the chip but most of us want to use this as a tool of course – and not re-invent the wheel. If any amateur (and I mean that only insofar as someone NOT getting paid to work on that chip full time) coming up with a solution is great – but what of support etc… I will have a look at the source code this weekend but I don’t hold out much hope of being able to grasp it all in a short time and fix the issue.

  12. Yup, if I bash it around, on/off, wiping slider output etc, I can get the busy loop. For me, it appears a hard reset is much faster than commands so I’m going to try a 50-100mS watchdog after a Cipsend, looking for a pulldown on the Rx line, into a separate port, with the esp wdg turned off.

    I have asked on the community forum if the updated AT command firmware that exists, actually deals with the busy s. I have a thick coat on, and am used to ducking! Probably not going to be fast enough though!

    • Well, the designers aren’t going to tackle it real soon – they already said that – they are too busy and seem content to let the “community” sort it out – which seems strange – you’d think they’d want their product to work properly. I’ve been searching every day for “esp8266 updates” – nothing yet.. and I’ve even downloaded the VMWARE environment, SDK and AT code – which is utterly un-Windows-user friendly – and can’t get that to compile. I get “Nothing to be done for “FORCE” no matter what I try – clearly there are people who’ve managed to compile this but if they are putting out fixed firmware I’m not seeing it – I suspect a lot of people are just sending commands, getting a response and that’s good enough. Ultimately in a real life program it will fail on them sadly, eventually, this could be so easily fixed by someone who can compile the code and has a general understanding.

  13. Yes, a little difficult to understand, they are probably waiting for someone to sort it for them. In the meantime they sell chips. Maybe a cutoff point somewhere has dictated that’s the way it goes for a while. I, like you, find it very strange that this is not a key issue, considering its prospective value.

    I have been testing the reset method, and for me, although just over a second or so, recovery is good. At the end of the routine sending the cipsend data, I wait about 2mS, then check for a max period of 50mS (or the actual possible repeat receive data from other keys) that there is pull downs on the receive line. [ In the busy..s state there appears to be an extra 2mS of data in the receive frame, so this could be misconstrued as valid data.].
    This is using an STM8 driving the esp.
    I want to send some a/d channels through to netIO, so I’ll be doing that next. The regex feature will be handy for that.

    So, until the simple solution of a sensible recovery, I’ll bang away with this. Like you, looking every day.

  14. Thnaks for all the information presented in your posts! I bought a pair of ESP8266 modules (ESP-01), I’m able to talk with them through the serial port, change their status and query their version:
    AT+GMR
    00160901
    What is not working is the firmware upgrade. Using the ESP8266 Flash Downloader tool or the esptool.py, I always get a “Failed to connect”:
    C:\Users\9132\esptool>python esptool.py –port COM3 write_flash 0x00000 nodemcu_512k.bin
    Entering bootloader…
    Connecting…
    Traceback (most recent call last):
    File “esptool.py”, line 364, in
    esp.connect()
    File “esptool.py”, line 149, in connect
    raise Exception(‘Failed to connect’)
    Exception: Failed to connect

    For firmware upgrade I’m using CH_PD at 3.3V and GPIO2 connected to GND, and when i power the node both leds (red and blue) stay on.

    So until now I’m locked with the firmware suplied with the modules. Any ideas?

    Best regards

    Fernando

  15. Mel – I must be using an out of date manual… I have the ESPRESSIF manual AT INSTRUCTION SET completed 28/11/2014 – and no sign of and AT+CHELLO or AT+CSYSWDTENABLE ? Where did you spot these?

  16. Hi Scargill,
    I wrote a webserver code. I have problem in sending the response back to the url using CIPSEND command.
    i am sending the pin nomber to on/off led on arduino uno. I am able to control the pin, but then I want to send some response back to the url but that does not work. The browser keep spinning and finally it says web page not available. In the debug I never see ‘>’ response from CIPSEND command. what could be wrong?
    Thanks

Leave a reply to Scargill Cancel reply