The Current State Of ESP8266 Development

A few weeks ago we caught wind of a very cool new chip. It’s called the ESP8266, and it’s a WiFi module that allows you to connect just about any project to an 802.11 b/g/n network. It also costs $5. Yes, there was much rejoicing when this chip was announced.

Since we learned of the ESP8266, there has been a lot of work done to translate the datasheets from Chinese, figure out how the SOC can be programmed, and a few preliminary attempts at getting this module working with an Arduino. Keep in mind, very few people have one of these modules in hand right now, so all this information is completely untested. Here’s what we have so far:

Over on Hackaday Projects, [bafeigum] has been working to research the capabilities of this module. Most of the comments deal with the AT Command set for the module and figuring out what is actually returned when certain commands are called.

The ESP8266 community forum is about a week old, but already there’s a wealth of information. Most of the efforts seem to be centered on getting GCC to program this chip, something that would make the ESP8266 a single-solution chip for anything that needs WiFi and a bit of processing power. Everyone (including the great [Sprite_TM]) has currently hit a roadblock, so if you have a ton of experience with GCC and the Xtensa microcontroller, check out that thread. Failing that, we’ll have to wait until someone from Tensilica, the company behind the guts of this chip, to chime in and help everyone figure out how this thing actually works.

The Arduino-heads out there will have a much easier time. There’s already a tutorial for using the ESP8266 as a serial WiFi module. Note the ESP operates on 3.3 Volts, so connecting this module to the 5V pin means you’ll be out $5 and several weeks of shipping time.

This is an incredible amount of development in a very short amount of time, made even more remarkable by the fact that no one has one of these WiFi modules yet. When these modules do arrive to workbenches around the world, we’ll expect the Hackaday tip line to be flooded with very small and somewhat battery friendly WiFi builds.

53 thoughts on “The Current State Of ESP8266 Development

      1. I ordered a pair of these from an aliexpress vendor on a Thursday. By the vendor’s own admission, it wasn’t shipped until Friday of the following week (8 calendar days after it was paid for). It may be that my vendor didn’t actually have the modules in hand when they sold them.

        1. No, that’s par for the course on aliexpress. You get stuff dirt cheap (You can get ESP8266 modules for less than 3 bucks now) , but keep in mind that they’re not joking about the estimated time for delivery being up to 60 days.

    1. Yea, I was confused by that as well, I’ve had half a dozen modules here for awhile now, they’re not exactly rare or anything… A co-worker had purchased a lot of 100 modules for just over $300 including shipping, and I bought the 6 I have from him for $20…

  1. Async serial wifi modules are slow, so I think the best potential for these modules is native code. And for ubiquitous wireless sensors $5 still adds up. I’ve made wireless sensors with a nrf24l01 module, an attiny88-au, and cr2032 coin cell. In qty 25, total cost per node is $1.50.
    I could see using esp8266 modules for a wired gateway to a bunch of low power wireless sensors, but not for battery-operated wireless sensors themselves.

    1. You are right. However, I would not like the communication with my garden sprinklers be unencrypted… Somebody with nRF will come close enough just once and… ;)
      For me, this is a huge advantage – until now I was using TP-Link TL-MR3020 for connection and its internal serial for arduino communication, however this would solve the same task for way less than $25 :)

      1. I would agree with both of you. $5 is a great improvement but still a hurdle for mass deployment of sensors.

        I see this device as lowering barriers of entry for prototyping though, which is a value in itself. The thing I’m not sure about is cluttering the spectrum. Can an average home router support a dozen dozen of these if the houses on either side also have such a network deployed?

        1. Spectrum is no more of an issue than it already is with wifi. Most routers do auto channel assigment, so if one neighbor is on channel 6 and another on channel 11, your router will likely pick channel 1. And all the wifi nodes on your network will be using that channel. If your router changes channels, the clients will switch with it once they see the SSID broadcast on a different channel.
          Re security, note I said I built *sensor* nodes with the nrf modules. So for the sprinkler example you could have a nrf sensor in your garden reporting soil moisture, temperature, etc.
          For remote home controls, I could see the desire for something more secure. In reality, most people aren’t too concerned about wireless security … at least until break-ins by hacking garage door openers become common.

  2. Forgive my lack of education on the subject, but in terms of functionality how do these new modules differ from the nRF24L01 modules that we’ve had access to for quite some time now?

    1. The main difference is the nRF’s don’t talk 802.11 or have a networking stack you have to do all of that, With these they have a TCP/IP stack built in. They’re closer to the wiznet cc’s than nRF’s

      And i just bought a bunch of wiznet/nRF’s to do a xmas light thing, tsk…

    2. If I’m correct nRF24 modules only connect with nRF24 modules. Same with bluetooth, zigbee etc. They all use the same wireless frequency but they all use a different protocol to communicate. (the difference is also in range, power, interface etc.)

      This cheap module is compatible with 802.11 b/g/n that is really awesome. Its possible to connect to your home network with these modules. And it doesn’t have to be an unprotected setup.

      I would use this module to connect my LEDs to the internet and the nRF24 for point to point wireless connections.

  3. There’s also wireless router module (HLK-RM04) available which offloads all WiFi overhead onto it’s own built in micro-controller (the RT5350F, 360MHz MIPS core with built-in WiFi support), it’s more expensive ($13) but looks like it’d be worth the added cost for more advanced projects, considering what its capable of…

    http://www.hlktech.net/product_detail.php?ProId=39

    I have a couple on order just to see what its capable of…

    1. Yes ! I’ve received my HLK-RM04 last week. It is working quite straight forward.
      There is also USR-WIFI232-G2 which can be both AP+STA at the same time, I didn’t received it yet. I will order some ESP8266 soon, since they are cheaper.

    2. Sadly the basic hlk-rm04 is a serial to wifi only, you can’t do data packets. From what I can see of these esp modules they will let you construct tcp or udp packets etc. This is FAR more powerful. You can flash the hlk-rm04 with openwrt though, so there is that.

  4. To be honest I think the TI CC3200 modules are going to be worth the extra money over this thing. The serial interfaces on these sorts of modules is usually very poor. And that goes for even “proper” vendors that supply wifi-uart style modules.
    You want a module that has the wifi interface, a fairly decent applications processor, a socket-like interface for doing TCP/IP and working implementations of stuff like DNS etc. The CC3200 has that. There are 3 other modules that have that stuff but they are under NDA and hard to obtain.

  5. Alternative:
    MTK7681 based modules.
    The chip seems to be similar, but as Mediatek is behing this, I’m hoping for better docs and support. There seems to be a SDK available, but I couldn’t find a download link so far.
    There’s and Indiegogo project using this chip, though: https://www.indiegogo.com/projects/xwifi-a-fingertip-sized-wifi-module-open-source
    And some modules available on alibaba:
    http://www.alibaba.com/product-detail/GWF-KM22-MT7681-150mbps-electronic-control_60035474664.html

    1. I want to do the same – I use NETIO normally and Android Basic to talk to a socket server – usually Ethernet board and Arduino – which send simple text back and forth. I want to do the same thing with the WIFI board – have it simply set there until someone connects with it – I cannot find any examples yet – did you get anywhere?

      1. Yes and no. According to the translated datasheet AT+ CIPSERVER should do the trick, as far as I understand. I plugged a test together yesterday, but couldn’t start the module. Might be a problem with the level shifter or I made a stupid wireing mistake, didn’t have much time. I don’t know when I will get to the next try. Let me know if you get anywhere with the AT command.

        1. You’re going to love me – you have to set CIPMUX=1 to get CIPSERVER to work – I was just about to cut my wrists having discovered the command and it went no-where. I set AT+CIPMUX to 1 – and the command CIPSERVER now works… so now I have a working open socket. I set my NETIO package to have 2 buttons on that port (I set AT+CIPSERVER=1,4000 so looking at port 4000) – I pressed a button on the phone and a little package +IPD,0,4:YES came through (the button was programmed to send YES on pressing… button remained depressed awaiting a response (CRLF). I sent AT+CIPSEND=0,4 indicating I wanted to send to ID 0 (see response above) 4 letters. The little “>” comes up – I send UK and hit enter and LO the button on my phone pops back to default state.

          In other words – it works! (every now and then I get an unlink text back followed by link – but it’s not stopping it working reliably – been sitting there for 10 minutes now with me occasionally sending button presses. I’m still doing this manually via a terminal but it won’t take long to get it into a program.

          1. So I’ve now just had the phone send a request for a message in a label – spotted it in the terminal and sent back HI – and it appeared on the phone – so the answer is – you’re in business. If you have any issues ensure you have the latest version of the software (last resort I’d say) as per my blog. I’m still updating here.. (got the address wrong elsewhere)… http://scargill.wordpress.com/2014/10/05/esp8266-working/

            As others will be reading this – may well have gotten this far themselves – or if not will now be able to make gadgets – expect a flurry of little WIFI toys this Christmas – HAH!

    1. Arduino compatible: In general, yes (there are already some examples).
      HOWEVER, the module is 3.3V:
      https://nurdspace.nl/ESP8266#Translated_datasheet states consider

      The current stated there are higher than the 50mA the 3.3V output pin of the Arduino is rated for. Also, the max input HIGH voltage is stated as 3.6V, so even if you can power it, according to the stats the logic level would be too high.

      So there are 3 possibilities:
      1. do it anyway. This put both your Arduino and the module at risk, but people did it and claim that it worked. The module is cheap, an Arduino can be cheap, so why not?
      2. Use a 3.3V Arduino, e.g. the Pro Mini.
      3. Use an additional 3.3V supply and a level shifter.

      Also note that the module will use the HWSerial pins. So if you don’t have 2 on your board, you cannot connect it to you computer at the same time. The Arduino Micro would be great for this purpose, but then you have the problems above, since it is 5V.

  6. For level shifting- I feed the output of the board straight into the Arduino – and the other way I simply reduce the Arduino serial voltage a little with a divider. 560r from Arduino to ESP8266 input, resistor 1.2k from ESP8266 input to ground. Works a treat, values chosen out of a limited range of available parts so I’m sure you could be more precise if you want to.

  7. Right, now I’m starting to MOVE on this. The ESP8266 can of course be used as as web server, or web client… or indeed a socket listener – but what might be useful for a car would be to use it as it’s own access point. Most of the docs out there miss off the important information. I now have it working – read here to get your own secure access point running.. so MANY possibilities.. bit.ly/esp8266

  8. Got mine 4 modules yesterday. Spent 5 hours trying to make them work- nothing…
    …until I touched the “CH_PD” pin with my finger and got some random data on serial.
    1 hour later I figured out that “CH_PD” in my version is connected to RST and that module runs serial at 115200 baud, so be aware.
    Even if it looks just like second version mentioned somewhere on forums.

    Works fine since then, so consider connecting “CH_PD” to 3v3 and trying 115200 baud serial if you have trouble connecting your module

  9. The latest software reverts at first to 9600 baud and you can then set your own speed – which survives power cycling. Yes, CH_D has to be tied to 3v3 and GPIO_O left floating unless you’re uploading new firmware in which case that needs grounding and the power cycling.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.