New Chip Alert: The ESP8266 WiFi Module (It’s $5)

Every so often we run across something in the Hackaday tip line that sends us scurrying to Google, trying to source a component, part, or assembly. The ESP8266 WiFi module is the latest, made interesting because it pretty much doesn’t exist outside China.

Why is it cool? It’s a WiFi module with an SOC, making it somewhat similar to TI’s CC300 in conception (A.K.A. the thing that makes the Spark Core so appealing), in that a microcontroller on the module takes care of all the WiFi, TCP/IP stack, and the overhead found in an 802.11 network. It’s addressable over SPI and UART, making this an exceptionally easy choice for anyone wanting to build an Internet of Things thing; you can simply connect any microcontroller to this module and start pushing data up to the Internet. Oh, it’s also being sold for $5 in quantity one. Yes, for five dollars you can blink a LED from the Internet. That’s about half the price as the CC3000 itself, and a quarter of the price if you were to build a CC3000 breakout board.

There’s a catch, right, there’s always a catch. Yep. About two hours after this post is published it will be the number one English language Google result for “ESP8266.” As far as the English-speaking world is concerned, there is absolutely nothing to be found anywhere on the Internet on this module.

Seeed Studio recently sold a few of these modules for $7 and has some documentation, including a full datasheet and an AT command set. All the documentation is in Chinese. There’s also an “ESP8266 IoT SDK”, but from a quick glance at the code, this appears to be an SDK for the SOC on the module, not a simple way to connect the module to a microcontroller.

Anyone wanting to grab one of these modules can do so on Ali Express. Anyone wanting to do something with one of these modules will have a much more difficult time, most likely poking and prodding bits randomly with the help of Google translate. Should someone, or even a group of people, want to take up the task of creating a translation of the datasheet and possibly a library, we have a pretty collaborative project hosting site where you can do that. You may organize in the comments below; we’ll also be taking bets as to when a product using the ESP8266 will be found on Kickstarter. My guess is under a month.

EDIT: Here’s a translation of the datasheet and AT command set.

Edit two: [bafeigum] is writing a library go help him out.

Thanks [Liam] for the tip.

141 thoughts on “New Chip Alert: The ESP8266 WiFi Module (It’s $5)

  1. I would suspect with this sort of deal by the time you receive delivery someone will have translated the documentation :-D

  2. Ordered 2 from Ali Express for $10!
    Hopefully in the 20 days or so it takes to get here, there’ll be english documentation.

    1. It says that it is ten dollars for one… Am I missing something? I would tolly order immediately if I could get the price you guys are talking about

      1. sometimes Chinese suppliers can be fast to adjust prices when demand rises quickly… it happened to me when I the news came out about the TV tuner that could be used as a universal radio receiver using software defined radio software (not sure if that is the case here though)

        1. not this time. cause i know they make this product to take the market. But i can’t grantee they won’t raise the money by $1-$2

  3. Aaaaand aliexpress takes…. no payment method I’m comfortable with. There isn’t enough profanity for how much I’m NOT giving them my credit card.

    1. Why? Ali Express is a huge supplier and well respected. Further, you are not liable for fraudulent charges to your credit card. The worst case scenario is you end up making one phone call to your bank and get a new card in the mail a few days laters.

      On the other hand, Experian outright sold your data to scammers over a year ago and neglected to mention it to anyone.

      1. Hear hear! I use AliExpress and have no hesitation to use my credit card with them. They aren’t some Nocturnal Aviation (fly by night) outfit.

        I would also like to know what form of payment Nate B is comfortable.

        1. I had a problem with a supplier once. Aliexpress then takes very long to “study the case”. By the time I had enough, I contacted the creditcard company. My “time for complaints” had expired by a month. But then they said: Hmm. we may be able to exert some pressure still, send in the form. The next day Aliexpress informed me of their decision….

    2. With Bank of America, you can generate a credit card number on-demand and set a spending limit and the expiration date.

    3. I recommend skipping AliExpress and going straight to Alibaba. (Although searching for this module doesn’t bring up any hits yet. I’m sure that will change in a few days.)
      Alibaba is a whole different animal than AliExpress. You have to contact the sellers yourself and get them to give you a price quote. (Just disregard the prices listed on the site. Look for sellers with 90%+ response rate.) It can take a few days to get quotes, but you will end up with a *much* better deal. Plus you can find stuff on there that you won’t find on the “retail” sites like AliExpress and dx.com. I didn’t even go through the website itself, I paid with Paypal directly (although probably against their ToS), and it worked out great. (YMMV, though. Make sure to pay with something that has buyer protection.)
      My only regret was not waiting a few more days before I committed… I got several price quotes that were much cheaper!

      1. I guess I should mention that you will probably get a much better deal (and more seller interest) if you are buying more than just a couple modules.

      2. Make sure to pay with something that has buyer protection

        Like what?

        Paypal won’t give you any protection for what you paid there.
        A credit card will only cover fraudulent charges and not without all the hassle, and a prepaid credit card, won’t be of much help either.
        Escrow, if agreed, will raise the cost significantly for something like this.

        Lets hope that Seeedstudio get them in stock soon.

        1. “Paypal won’t give you any protection for what you paid there.”

          Why do you say that? Although I haven’t had to test it, I can’t see anything in the Paypal user agreement that would invalidate a dispute. Direct transfer is covered:
          (https://www.paypal.com/webapps/mpp/ua/useragreement-full?country.x=US&locale.x=en_US#13)

          I’ve been a Paypal member since before eBay bought it, and in every questionable situation I’ve found myself in, all I’ve had to do is threaten opening a dispute and the seller has either given me a refund or shipped me out a replacement.

          1. people (usually those who got jammed up paypal over accepting money for a cause against their ToS, or those who read said angry blog posts) like to hate on paypal.

            as a buyer, (and occasionally someone who uses it for casual ‘same as cash’ transfers between friends who arent luddites/angry blog post readers) its great.

          2. Opening a dispute with Paypal doesn’t mean that you are protected in any way, just that you are allowed to complain to the seller and this must answer to that complain through Paypal.

            When you buy through ebay, Paypal favors the buyer since the “13.2 Eligibility Requirements.” holds. With a random John Doe won’t.

            Lets say that I buy and pay for 5 from Joe Scammer and the seller sent me 1 (or 0 and provide some unnamed “tracking” number, real or not), a dispute open with Paypal favors a seller that claims that sent 5. End of the story, sadly. nothing that I could.

            Don’t assume that all your purchases are protected just paying with Paypal because are not. And most probably won’t in this specific case.

          3. S: while what you are saying is accurate with regard to paypal buyer protection (which is why a purchase is differenciated from sending money via ‘friends and family’), aliexpress basically acts like an escrow (in the event youve never used their services). the seller you buy from doesnt get your money until youve confirmed receipt, or if you do not file a dispute before a predefined grace period expires.

          4. As long as you aren’t stupid enough to use the ‘friends and family’ option when buying something, you are covered. Using the ‘pay for goods or services’ option is covered by buyer protection. It says so in the user agreement and on the first page when you click the button:
            “No fee for you. The seller pays the fee. Plus, you’re covered by PayPal Purchase Protection.”

  4. Seeed has a link to the chip manufacturer’s website which has plenty of info in English.

    Seeed also has a pdf of the specs which Google Translate seems to work just fine on.
    (Although I would find someone to double-check the translation before actually designing anything with it!)

  5. As is usually the case with Chinese wireless modules, I’m betting they don’t have FCC, CE, or any other certifications, which means that while it is ok to use them in your hobby projects, it’s illegal to sell them inside of an end product. I wouldn’t recommend using them in any product designs in the future. $5 for a little WiFi project though… I have a couple ideas for which this would be great.

      1. >An end product would need certifying as a whole
        >if you want to start going down that path…

        boo boo wrong answer. The whole point of using FCC qualified modules is that as long as it’s the only transmitter in the product you can use the FCC qualification from the module.

          1. It isn’t the case with FCC neither, AFAIK. Simply the fact that you connect a module to a power supply could cause it to fail EMC compliance testing due to noise being conducted over the wires.

            You always have to recertify the whole product, the pre-certified modules help only with design (you can be somewhat sure that it likely won’t do anything crazy).

            This is a common mistake people make about EMC compliance testing, unfortunately.

          2. I don’t think that’s correct. Otherwise what’s the point of modular certification? I think you’re thinking of unintentional emissions testing, which is a different process and one that is much easier and cheaper. From my understanding (and I have wireless products in retail), you can use a wireless module that has modular approval, and you put the FCC ID of that module on your product, both on the packaging and on the enclosure. You do not need to get new FCC testing done UNLESS you violate the terms of the modular approval. Examples of violation would be adding a second radio that may interfere, using a different antenna with a higher gain than tested on the module, or modifying the module to get higher power.

            The second part is unintentional emissions testing, which is done on the product as a whole to make sure that it is not emitting any radiation it shouldn’t be. This is a self-certifying process, and the documents are stored at the company and not necessarily filed with the FCC, so in theory one could skip this testing if they were confident they were within the limits, and if someone complains to the FCC the company could have it tested really quick and submit those documents.

            Getting modular approval is not cheap or easy, and many chinese companies have no incentive to get it. But as a company that wants to use the module, it is risky to spend money to get those modules approved unless you can control the manufacturing process and ensure that they don’t swap out components or make changes that invalidate the approval.

          3. you still have to get your product certified

            certifying the pieces makes it easier to get the whole thing certified

    1. FCC regulations set aside, the lack of ANY certification might actually prevent the goods from entering your country. I just had to have the customs return a pair of floodlights (http://www.aliexpress.com/snapshot/6131219552.html) because they lacked CE certificate. This is a new way of the German customs to prevent every Hans and Marie to buy their stuff in China. Oh, and getting the money back from the seller was no problem at all with AliExpress.
      I just ordered a pair of these modules for less than EUR 8 and I will see if I can lay my hands on them.
      BTW: Nobody in their right frame of mind will use these modules in a final product. The maker might decide tomorrow to stop making them and you would have to redo your design. It’s something to toy around with and nothing more.

      1. “Nobody in their right frame of mind will use these modules in a final product. ”

        Gosh I just looked at the name of this web site, it’s not “product a day”, it’s “hack a day”

      2. Preventing the average buyer, that has no way of knowing, from getting stuff that’ll potentially burn down house because it hasn’t been designed to meet CE requirements isn’t such a bad thing. If anything boards like these would probably just need a sticker that says “lab use only” to be ok

    2. this product is to open the market, speed up the development of IoT and build the reputation for their company. Perhaps we should only require this device work properly at this price.

    3. Illegal is a little strong – you could get the end product certified – or indeed self-certify if you have the skill and confidence. Right now I’d just be happy if my little WIFI module would work. Yes, it turned up, no I can’t get a peep out of it other than a red light.

    1. Do you? The CC3000 costs about $20 in quantity 1, which is still cheaper than the non dev board modules available on ack.me (nice pun BTW). Are you saying the CC3000 is somehow lesser than what ack.me is selling? I am going to bet not.

      And I wish people would stop saying “free” when they mean “bundled”. GoHack.me looks to be very cool, and quite useful for many uses; but not the ones I am interested in making. So instead of being free, it is really something I am being charged for but don’t need.

      You would have been more on-base by saying “It is a more complete solution”, or “here is an alternate solution”, or even “here is a more hobbyist friendly solution”; than implicitly maligning the subject of the post.

    2. Hmm why spend all my time learning your API doing things on your dev board when there’s a $5 board I can plug into my existing setup?
      (and please excuse my idiocy, but I did not see how to sign up for your cloud solution without having purchased a dev board…so I don’t understand how it’s free.)

    3. Also, I didn’t know HaD offered free advertising in the form of spam comments that add absolutely nothing to the subject matter. Your expertise certainly could have enlightened us as to you are name calling it a “damn thing”. Does it have bad range? Data integrity problems? Impress us!

    4. ‘gohack.me’ just sounds like you are asking for it (and itll probably happen eventually; meta.)!
      -you- can rely on ‘the cloud’, not for me, thanks.

    5. Right $5 for this vs $85 for your board? I’ll take my chances with this $5 module, I can buy a dozen of them for less than the cost of your board…

    1. Would be fairly easy to check, just monitor the network access of this with Wireshark say. There’s no other way your data is going anywhere. If everything Chinese has a backdoor then I think we have bigger problems that a WiFi module in an IoT application.

      1. Wireshark does not really help you. A backdoor does not require any special transmissions under normal circumstances. It could just be there and wait for a special knock sequence to grant access. Unless you know about this sequence or you capture someone transmitting it to your device, you will never know that it exists.

      1. probably not a bad policy. heck, I’m suspicious of anything made anywhere. I’ve got relatives that *insist* they were made in North Carolina… and I’m very suspicious of them.

        1. heh good one. Naah but seriously I am asking a valid question. You ppl seem to be afraid of Chinese stuff, but face the reality – we have done it before them we are doing it now. Our economy prospers because of this – not because our stuff is better/cheaper than their stuff, but because we cheat and have been using industrial espionage for decades.

    1. Don’t all RF transmitters do? Unless you are referring to frequency, yes it might. Printed antennas are generally a bad idea since touching the board, or not property grounding the board may result to frequency shifting (probably not that much, but you get my point).

      1. It may shift the resonance of the antenna if you touch it, but it will not shift the transmitter frequency, since the antenna is normally not used as part of the tuned circuit in the LO (only in really really cheap transmitters)

          1. I can confirm that the dns.o object file for the lwIP library delivered with the “SDK” is indeed empty, so they will quite likely have disabled that part. I’m not sure what is actually on those devices, though.

            Hard-coding a DNS resolver IP address in your application is not too bad though: lwIP does it this way anyhow (by default, according to the sources, it uses resolver1.opendns.com).

  6. They seem pretty coy about the “RISC cpu”.
    From the SDK it looks like it’s 80MHz, 32 bit, and using the xtensa xcc (a gcc derivative?), so maybe it’s using a cadence xtensa core?
    If the SDK can be made to work for free that’s should obviate the need for a separate microcontroller, and give apps high bandwidth direct network access rather than a pathetic serial link – a big step up.

    1. From the compiler strings in the libraries shipped with the “SDK” (which is more an example than a proper SDK) it follows that the CPU is a Tensilica Xtensa LX3. Apparently it is indeed clocked at 80MHz.

      Reverse engineering of any firmware (if required) may be hard: those CPUs have extensible instruction sets (by means of Tensilica Instruction Extensions) that allow the instruction set to be extended with non-standard complex instructions. While this allows for fast complex operations under limited clock speed or power consumption, it makes disassembly of program code non-straightforward.

  7. esp8266 is TOO new (as of Aug 27)..
    if u are interested to STUDY it (instead of USE it), that’s fine to get some now(27 Aug)

    very cheap..ok..let me use the words ‘low cost’..
    RMB 20 for a module, (NOT just the chip. It needs an external serial Flash to store the Application Firmware)

  8. it might also be worth mentioning that you can also get a few other similar modules for about the same price (like the MT7681 for ~$6)

    1. That looks good, have you used one or had any luck with it? Do you know if it sleeps well?

      Its $6 if you buy 5, or about $11 individually from aliexpress sellers that don’t appear too dodgy, so looks pretty comparable in price.

      I might order 5 and stick the other 4 on eBay.

  9. What would REALLY be nice is a complete WiFi solution in a DIP package..antenna and all… with FCC cert. An extra, low-end uC in the DIP like a cheap ARM that a developer could use would really make it sweet. The uC handling the WiFi chores would just be too busy for much of a user program. A 28 pin DIP would be about right.

    You could do an awful lot with such a two uC single DIP solution.

    1. If I’m reading the datasheet correctly, XBee Wi-Fi modules from Digi are FCC certified.

      Technically they are in a DIP package and they have 10 digital I/Os and 4 ADC inputs. Easy enough to interface them to a Teensy 3.1 or equivalent, they’re not $5 a piece though.

    1. But you will have to run USB master AND the TC-IP stack on the “micro”, not exactly trivial.
      The whole point of this thing is that you feed a FIFO with a simple bus (at a speed a >$1 micro can handle) and the module does the time-critical stuff which would force you to use a much beefier (not necessarily more expensive though :D) micro…

      1. An event more important point is that you can use the onboard cpu for application code, so you don’t even need a separate micro for simple apps.

  10. In terms of the pdf files, I can work out the software interface without needing to get a ingle word translated. The slight unknown for me at the moment is if the device acts like bluetooth devices and modems with respect to connections when data comes in, and my guess is that it does.

    I am still not clear in my mind if this works on 5 ghz too. If it does, then bonus.

    And the one thing that is probably missing is the over the air configuration. Without that, things are much harder. Not sure if you can set this up in infrastructure mode, and then build a http sever for configuration, or if the is another way to configure over the air.

    Darryl

  11. From the specification it seems to me that this module is 3.3V only both power and data PIN wise so for Arduino it needs a level shifter. Can somebody confirm this for me?

    1. I can’t confirm that, but I can point out that there are 3.3V versions of Arduino, so the problem would just go away.

      I am using one now, because I am driving an SD Card, which requires a 3.3V interface, and I didn’t want to use a level shifter.

    2. Not necessarily; you could use a pair of resistors to make a voltage divider on the TX and the RX will be OK with 3.3v. I’ve used this setup in the past.

  12. its not a datasheet, its a PR blurb with confidential watermarking. Chinese people are soooooo funny, they think this confidential watermark makes this look more professional.

    My guess is ARM core inside is not properly licensed from ARM?
    Most important part of the puzzle – SDK – is missing, making it a black box

    1. From the provided makefile it seems the core is the Tensilica Xtensa which is a MIPS derivative instead of ARM. xt-xcc is not freely available, but there is a gcc that can target this CPU architecture. The xcc is this gcc with additional options to allow saving the intermediate representation and a closed source program that does additional optimizations on this IR.

      Unfortunately only binary blob drivers are provided for the hardware in the SoC, which makes writing your own software more difficult, but as far as I can see everything is available (but documented in Chinese).

      Simply using it with another MCU seems trivial.

      1. AMBA is an open standard (afaik royalty free). You can buy a lot of IP with this interface. It is a trademark owned by ARM, but is used in a lot more devices.

      1. These translators are not so good with prose and poetry but for technical manuals I find that they work pretty well. But I do wonder why so many of these technical translations from Chinese contain the word “baby” in so many different contexts.

    1. Sure, WiFi is inherently short range, so the IPv4 devices will have connect to local routers anyway, using local IP addresses.

      1. take one step at a time, i’ve seen the light of wifi in IoT. as the cost problem is solved, high power consumption is next thing to solve, and ipv6 is not far.

      2. He he he let’s look at the track record of embedded devices and firmware upgrades, I gotta laugh if you think you are gonna get IPv6 upgrades for your devices. “One step at a time” is really “take one step and you’re stuck”

        It’s unclear how useful it is to have a sensor network behind a NAT, by the time you get done configuring your NAT and punching the right holes in it, you’ve got an unsecure unstable mess.

        IPv4 is completely inadequate for even configuring a large network. You need a DHCP server, There is no mechanism for autonomous address discovery.

        Look at all the problems in the data center with provisioning networks. Even with a hundred systems or so you get terrible issues with leases and congestion. Okay now imagine this issue in everybody’s house when they have thousands of sensors embedded in the furniture and the appliances and the building itself.

        Like I said, the “Internet of things” is dead in the water without IPv6.

        1. the industry evolves slowly, we need sth to open the market and can’t require it to be perfect. when enough people use wifi in iot, we will have device compatible with ipv4/ipv6. And when enough people have that, we can drop ipv4. I don’t expect i’ll get any upgrade in any device, i just saying that we should have patience.

  13. The translation… better to be careful on electronics literature. “不用的时候应该悬空” == “This pin is active low when not should be left unconnected”? Guess what that means?

  14. in china, this product is a ice breaker for IoT industry. RMB15=$2.3 without deliver fee. this product come at the perfect time when we are about to build smart stuff.

  15. Okay, thanks for the tip, just ordered a few. Looks like we have an SPI flash + a dumb MCU with a bunch-o-SRAM, no openwrt can be put into it unlike HLK-RM04….
    Looking at the SDK… We have lwip there as a binary blob, as well as some more binary blobs for wifi stuff. Paranoids won’t be happy/Stallman won’t approve.
    Compiles with gcc, weird architecture prefix: ‘xt-‘ Looks like getting hold of the proper gcc will be a separate quest. inside stuff dates back to 2010.
    Code is not total crap, but has a bad smell. I personally don’t like they closed-sources their lwip build. Why would they do so if lwip is opensource?
    Anyways, will have to wait till hw arrives.

    1. It’s an Xtensa architecture, which is supported by gcc. The firmware seems to use some BSD stuff: I see the BSD WLAN stack inthere, hostapd/wpa_supplicant, lwip as you already mentioned and some more. The driver for at least one other SDIO WiFi card these guys produce is findable with some effort (ESP8089 iirc). All in all, it may be feasible to develop an open-source replacement for this.

      Anyway, I ordered 5. Worst case, I can control them using AT commands. Better case: I can use the SDK to put the code in the device itself. Best case: we get an open-source SDK somehow.

    2. GCC with Xtensa support will do, AFAICS those CPUs are hugely backwards-compatible. You can find xtensa cross-compiler packages for Fedora, or download binaries that run on any x86/x86_64 Linux installation from kernel.org[1]. Getting your code working together with the binary blob, and actually running it on the device itself may well be a harder problem than compiling the code in the first place.

      Re lwIP: they have “forgotten” to include the necessary copyright notice in their “SDK” distribution. Apart from that, they are allowed to distribute a closed-source modified lwIP binary since lwIP is licensed under the BSD licence[2].
      Still, I agree with you that I would prefer to be able to read and modify the source they have used.

      [1] https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/x86_64-gcc-4.6.3-nolibc_xtensa-linux.tar.xz (obviously the x86_64 version)
      [2] http://lwip.wikia.com/wiki/License

  16. Does this module support listing MAC addresses of nearby WiFi access points? From the AT command list, it seems it only supports listing of SSIDs not MAC Adresses. Has anyone been successful in getting list of nearby WiFi Access Pointss?

  17. So just to start with a known working setup, did they compile under Windows or Linux x86/x64?

    Is there a trial or free version of the Tensilica Xtensa LX3 compiler that’ll work with the ESP8266 / ESP8089?

    Also, so does it link to the lwip lib, or are they using their own tcp/ip stack?

    BTW, what is an “AT Command”?

  18. I was going to buy a few of these but it doesn’t look like aliexpress supports HTTPS at all! I’ll have to wait until they show up on eBay I guess.

  19. Does this also have Bluetooth? if not, what is the I2S used for, or is this simply a feature of the embedded processor for use with custom firmware?

    1. @Steve C:
      Highly recommend this multimeter:

      http://www.electrodragon.com/product/full-function-multimeter/

      Got one in a former order, just wanted to have an extra MM [You can’t ever have enough of ‘em] and was amazed.
      Functions are good, but the display is the thing.
      It’s almost ridiculous how big it is – good to read even at greater distances.
      Didn’t ever regret the purchase.

      [to myself: _really_ have to contact ED for ad reward …]

  20. Just ordered 5 from Electrodragon, My wife is Chinese, we will sit down and between the both of us will take a stab at translating the documents. I I get the translation done I will post on the HAD Projects site

  21. Electrodragon wanted postage to the UK, took it up to $8+ – think I’ll wait for China delivery – my first one arrived this morning – it’s dead – blue light part on – output sitting at 1.1v… not good.

    1. Update: Got it “working” – it will say hello etc to me an occasionally hook into the WIFI – but it’s returning different info to the examples – most examples show on reset it sending “ready” – mine says “ok” – that’s a worry.

  22. Guys, got mine yesterday and spent long 5 hours until figured my modules run at 115200 baud and have RST on pin that should be CH_PD

    so be aware
    my modules came from aliexpress seller Tumbler hong

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s