ESP8266 has now lot of followers but they do not offer anything better


ESP8266 took the developers hearts for no time. To have WIFI stack and processor resources in tiny chip with only 4 external components necessary to operate was great success story by Espressif.

Needless to say this didn’t remain unspotted by others and now we are going to see boom of similar modules.

IMO they are doomed to not gain such success though. Why? It’s simple – nobody can make simplier device.

ESP8266 is already simple and well optimized. If you buy it in reel price for 5000 pcs is $1.50/each, if you can buy in volume I’ve heard you can buy it for less than $1.

Espressif sells about 1 million of these chips now per month. Their sales warned me that if I want to order more than 500K pcs I have to warn them 4 weeks in advance, small orders like 5-10K they ship same day from stock.

So whoever decide to beat ESP8266 should make something better which cost less $1 which is quite steep goal.

We saw now next competitor MXCHIP it’s nothing fancy STM32+MarvelWIFI chip and TCP-IP stack. it’s sold for about x2 end user price, but we are not impressed at all from it. Why? Because it’s in the same league like ESP8266.

We develop IoT Firmware for more than 4 months now and we work extensively with ESP8266 so we learned his good and weak sides.

Good side: incredible simplicity as hardware – you have everything in the chip. High integration, reliable work. Most of the problems are due to the not so good software implementation, although Espressif now rised their bug bounty award to $2000 for reported bug i.e. they are confident the bugs in their firmware are fixed.

Weak side: their RTOS is binary blobs which make hard to contribute, we see lot of missed events when you enable more timers etc, but we can’t see where these comes from as the software is closed. We do workarounds on higher level to make sure IoT Firmware works reliable though for end user who do not have to worry about what happens at low level. Another issues is lack of memory to run normal TCP-IP stack. https? forget it no memory, once one https connection is made there is no resources to handle other, so in practice is not usable. SSL? forget it, no memory for more than 512 bit encryption which is assumed compromised already, so basically with ESP we do not advice you to connect to anywhere else than your local WIFI net, as WIFI is encrypted, it provides you with good security, but if you want to make your “IoT” available to outside, you have to put between ESP and Internet something with real TCP-IP stack and good security, like RT5350-OLinuXino running real Linux, where you can install SSL with 2048 bit key, and hide well your devices which otherwise could be hacked from outside. We already work on such ‘broker’ which to allow access to ESP8266 IoT Firmware from outside.

So whatever comes next as ESP competitor will be in the same league unless have at least few megabytes of RAM to may handle properly https and ssl encryption, and I highly doubt one could make such for less than $1 to compete with ESP.

ESP8266 already deeply penetrated the low cost low security market. Good luck to the others trying to compete them!

SoftUni Conf June 2015, Borovetz


The already traditional SoftUni Conf this year was in Borovetz last weekend.

Olimex was invited to speak for ESP8266 and we presented there our latest development the IoT Firmware.

We demonstrated how easy is to work with ESP8266-EVB and other modules like relays, temperature sensors, GAS sensors, RGB displays, RGB Leds, etc controlling everything by HTML and JavaScript without any electronics background nor low level programming.


here is code snip which will switch the ESP8266-EVB relay ON, just make web page containing this code:

// Connect to ESP8266-EVB events entry point 
var socket = new WebSocket('ws://');

// Send authentication message
socket.onopen = function () {
                User: 'olimex',
                Password: 'olimex'

// Switch relay on ESP8266-EVB
        function () {
                        URL: '/relay',
                        Method: 'POST',
                        Data: { Relay:1 }

We will speak more about ESP8266-EVB IoT Firmware on TuxCon  which is 11th of July in Plovdiv and there will be Hackathon on 12th of July for people who want to hack with it.


ESP8266-EVB Lua MQTT example


MQTT is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol. It works like Twitter – you have many sensors which post so main server their info which is streamed and other clients/users can subscribe for sensors of interest out of the whole stream. The advantage is very lightweight protocol and low bandwidth usage.

Another advantage is that the sensors do not need specific IP address to operate, they establish the connection to MQTT server and thus you do not need to specially configure your home network to map ports using NAT etc. You just need internet connection, then the sensors connect to the server and send their info.

Peter Lalov sent us today link to his MQTT implementation for ESP8266-EVB with Lua, the project is open source released under BSD-3 licensee on Github.

Espressif ESP8266 Bug Bounty Program – Report a bug and win USD1000


Espressif is working hard to remove bugs in their very popular ESP8266 WiFi SoC. They want to make superior solution to CC3000 competetive product from TI, which is well known for it’s security issues.

So on March 20th Espressif boldly posted on their BBS the Bug Bounty Program – they will give USD 1000 to anyone who reports bug in ESP8266 .

We are working intensively with ESP8266 to make our plug and play IoT solution with pluggable UEXT modules to ESP8266-EVB and one of our developers Peter found bug in SSL implementation where you can brick or reset ESP8266 by sending large amount of data over https. He reported the bug to Espressif and today he got this e-mail:

From: Quote
Sent: Wednesday, April 8, 2015 5:26 PM
To: peter@
Subject: ESP8266-Bug Bounty Winner Information Requirement (BBP#29)

Thank you for your bug report, which will help us improve our SDK.
Our engineer has confirmed your bug report and they will release debug method to you later.
I am assigned to give the reward to you.
Please provide some information to us, which is needed for us to keep record.

a.. The company you are working for
b.. Your name
c.. Your nickname that you want to be announced
d.. contact number or mail
e.. Paypal account or bank account
You should declare tax according to your local law by yourself.

Yay! Quick USD1000 earned 🙂 Glad to see Espressif stands behind their word.

And from the e-mail header seems Peter is not alone but #29 in the Bug Bounty Program.

In other hand if they have decided to open source their binary blobs these bugs would be fixed by the community (which is huge and growing with each next day). So they could save themself these $30K.

Having the sources would also make less nervous people who want to use ESP8266 in more serious stuff where is not good to have “black boxes” with unknown code inside.

Programming ESP8266-EVB with Arduino IDE



We made Arduino style library to easy the stand alone ESP8266 programming, but we were not using any IDE but mostly command line compile and programming. Two of our developers decided to use Eclipse and set it up for ESP8266 tools.

Yesterday we spotted on ESP8266_wiki GitHub account that someone already add support for ESP8266 in the latest Arduino 1.6.1 IDE release, how cool is this?

I decide to try it today. I downloaded the pre-build binaries arduino-1.6.1-linux64.tar.xz and decompress it in /home folder then ran terminal and “sudo ./arduino” in the Arduino-1.6.1 folder, the Arduino IDE was launched.

Then I connected USB-SERIAL-Cable-F to ESP8266-EVB Open Source Hardware board UEXT connector connecting blue wire to PIN2, the green wire to PIN.3 and red wire to PIN.4 on the UEXT connector as on this picture:


Then in Arduino IDE I Selected Tools->Board-> Generic ESP8266 board

Then connected USB-SERIAL-CABLE-F to USB and selected Tools-> Port -> /dev/ttyUSB0

Then selected Tools-> Programmer->esptool

From examples loaded Blink LED then changed the port 13 to port 5 where the relay is connected.

I pressed the ESP8266-EVB button and connect 5V power supply to board to make it enter in bootloader mode, then click on Upload button.

The sketch was compiled and uploaded successfully then the relay start to switch on and off like expected.

Well done! I didn’t check all the libraries, but I see inside demos for web servers etc.


Free ESP8266 Workshop – March 7th in Olimex training building


ESP8266 is amazing low cost little device which allow you to run web server on it and to connect embedded devices to Internet via WiFi. We organize free ESP8266 workshop in our training building on 7th of March starting at 14.00 o’clock.

Some of the topics which will be discussed:

  • Where we are with ESP8266 development boards, new boards and plans.
  • How to install all tools necessary for development with ESP8266.
  • How to make your first blink LED program.
  • How to make simple web server.
  • New Arduino style library for ESP8266 with GPIO, ADC, DAC(PWM), SPI, I2C, Serial. Access to the 2MB Flash in Olimex modules for data logging, web pages and more.
  • How to develop with Lua and MQTT with ESP8266.
  • New Plug and Play firmware for ESP8266-EVB with automatic recognition of UEXT modules connected for measurement of temperature, humidity, accelerometer, LCD, etc.
  • How to make web server with secure access
  • Low power modes and battery operation.

Everyone is welcome! If you have project with ESP8266 which you want to share or make lighting talk about please send us e-mail to include you in the workshop program.

ESP8266 Building Hello World Blink LED and Simple Web Server to drive the Relay and check Button status


ESP8266-EVB is small 57×50 mm board with Relay and Button which are connected to Internet via ESP8266 WIFI module.

ESP8266 has inside Xtensa106 processor and RF front end circuit, you do not need separate processor to drive the relay and read the button as ESP8266 can be programmed with custom code.

Here we will explain how to setup your tools and make your first project.

First you need to install your tools. It’s simple, just follow the instructions here:

There are just few small mistakes as some commands will require SUDO before them and some paths are not exactly same, but you have to follow the steps and once you get error to read and correct the problem.

Here is what we do on Ubuntu 14.04 LTE 64-bit:

sudo apt-get install git autoconf build-essential gperf bison flex texinfo libtool libncurses5-dev wget gawk libc6-dev-amd64 python-serial libexpat-dev
sudo mkdir /opt/Espressif
sudo chown $username /opt/Espressif/
sudo cd /opt/Espressif
sudo git clone -b lx106 git:// 
cd crosstool-NG
./bootstrap && ./configure --prefix=`pwd` && make && make install
./ct-ng xtensa-lx106-elf
./ct-ng build
cd /opt/Espressif
mkdir ESP8266_SDK
wget -O
wget -O
mv esp_iot_sdk_v0.9.3 ESP8266_SDK
mv License ESP8266_SDK/esp_iot_sdk_v0.9.3
cd /opt/Espressif/ESP8266_SDK/esp_iot_sdk_v0.9.3
sed -i -e 's/xt-ar/xtensa-lx106-elf-ar/' -e 's/xt-xcc/xtensa-lx106-elf-gcc/' -e 's/xt-objcopy/xtensa-lx106-elf-objcopy/' Makefile
mv examples/IoT_Demo .
cd /opt/Espressif/ESP8266_SDK/esp_iot_sdk_v0.9.3
wget -O lib/libc.a
wget -O lib/libhal.a
wget -O include.tgz
tar -xvzf include.tgz
cd /opt/Espressif
wget -O esptool_0.0.2-1_i386.deb
dpkg -i esptool_0.0.2-1_i386.deb
cd /opt/Espressif
git clone esptool-py
ln -s $PWD/esptool-py/ crosstool-NG/builds/xtensa-lx106-elf/bin/

For less experienced users, we are preparing VirtualBox disk image which to run on Virtual machine on any OS like Linux, MAC OS, Windows, and everything inside is pre-configured and ready to use, hopefully we will upload this image on ESP8266-EVB web page tomorrow as we didn’t manage to complete it today.

Once you have setup the Tools you can download our examples from GitHub:

cd /opt/Espressif
git clone
cd ESP8266-EVB-blinkLED

the project will be compiled and you will see something like this:

AR build/app_app.a
LD build/app.out
FW firmware/0x00000.bin
FW firmware/0x40000.bin

congratulations you made your first code!

now we hae to load it to ESP8266-EVB

you need: ESP8266-EVB, 5V adapter like SY0605E, USB-Serial-Cable-F
connect the USB-SERIAL-CABLE-F to ESP8266-EVB UEXT connector as follows:

  • blue wire to pin#2
  • green wire to pin#3
  • red wire to pin#4

plug the USB cable to your computer USB connector and check which serial port it connects by typing:


your computer should display something like:

Bus 004 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

if you type:

ls /dev/tty*

you will see:

.... /dev/ttyUSB0 ....

If the USB device is with different name you have to update it in the makefile.

After the code is compiled with no errors you can write it to ESP8266 by following these steps:

  1.  first you have to press button and hold it and to apply power 5V, ESP8266 will enter bootloader mode
  2. type ‘sudo make flash’ and wait until code is loaded:
sudo make flash
/opt/Espressif/esptool-py/ --port /dev/ttyUSB0 write_flash 0x00000 firmware/0x00000.bin 0x40000 firmware/0x40000.bin
Erasing flash...
Writing at 0x00007300... (100 %)
Erasing flash...
Writing at 0x00061200... (100 %)

now Green LED must start blinking!

So far so good, you just made blinking LED on ESP8266, now let’s make something more complicated – to run Embedded web server on ESP8266, go to esphttpd project directory:

cd /opt/Espressif/ESP8266/esphttpd

then upload the code

sudo make flash

then upload web pages with:

sudo make htmlflash

Now ESP8266 firmware is uploaded and ESP8266 create Embedded server.

Scan for WIFI which name starts with ESP_XXXXXXX where XXXXXX is the ESP8266 MAC address and connect to this network then open browser at you will see this home page:


if you click on Relay button in the right side you will see new page:


On this page you can switch the on-board relay by clicking on ON and OFF button

If you click on the Button button in the right side you will see new page:


If you click on Start scan the web page will start to refresh each second and display the button status if you click on Stop scan the page will not refresh.

This is very basic demo code which can be used as template for your own projects!

Previous Older Entries Next Newer Entries