Connection circuit
Reverse connection TX RX
vcc to 3V3
GND TO GND
Short circuit IO in the middle
Download Firmware Update TOOLS
Firmware Download
ocorobot Firmware (0.9.1) normal0.9.2 Firmware
Setup Tools
then choose your bin files according to your needs,the filename and address to match or it will cause problems
then choose a com port(The module'com port),click START button ,if the progress bar stop moving, pull and plug vcc directly to reset module to fix the problem。
wo need a UBUNTU operation system,windows users can use this software
https://www.virtualbox.org/wiki/Downloads
then download a Ubuntu ,the system version 32 bit or 64 bit is depended on your computer
http://www.ubuntu.com/
then build a ubuntu system with virtual machine,trying what you like such as vbox。
install the virtual machine software
at least 12 GB for your hard drive
choose the iso file which you downloaded before in this place
then start vertual machine ,build a Ubuntu system,this part is omitted
it takes a long time,you should walk around or do something else
once installed, press the keyboard shortcuts button
Ctrl+Alt+T
to start console
then use root permission
32 bit
sudo apt-get install git autoconf gperf bison flex texinfo libtool libncurses5-dev wget gawk libc6-dev-amd64
sudo apt-get install build-essential
sudo mkdir /opt/Espressif
sudo chown $username /opt/Espressif
$username is your original name,you can change it as you want
64bit users
sudo apt-get install git autoconf gperf bison flex texinfo libtool libncurses5-dev wget gawk libc6-dev-i386
sudo apt-get install build-essential
sudo mkdir /opt/Espressif
sudo chown $username /opt/Espressif
$username is your original name,you can change it as you want
then step by step
cd /opt/Espressif git clone -b lx106 git://github.com/jcmvbkbc/crosstool-NG.git cd crosstool-NG ./bootstrap && ./configure --prefix=`pwd` && make && make install ./ct-ng xtensa-lx106-elf ./ct-ng build
second of the orders above is copying files from github
the last one may take a long time so keep waiting until it finished.if you can’t going on,then follow us like this visit http://mirror.bjtu.edu.cn/gnu/ and search
gcc4.8.2
binutil2.24
isl0.12.2
mpfr3.1.2
cloog0.18.1
gmp5.1.3
mpc1.0.2
files ending with tar will be ok
copy these files to /opt/Espressif/crosstool-NG/.build/tarballs
retype ./ct-ng build
just wait then all will be ready.
then we begin to install sdk
clisk to download SDK(0.92)
copy unzip files to
/opt/Espressif/ESP8266_SDK/
add some library files(type one by one)
wget -O /opt/Espressif/ESP8266_SDK/lib/libc.a https://github.com/esp8266/esp8266-wiki/raw/master/libs/libc.a wget -O /opt/Espressif/ESP8266_SDK/lib/libhal.a https://github.com/esp8266/esp8266-wiki/raw/master/libs/libhal.a
add headfiles
wget -O /opt/Espressif/include.tgz https://github.com/esp8266/esp8266-wiki/raw/master/include.tgz cd /opt/Espressif/ tar -xvzf include.tgz
then download a useful tools
cd ~ wget https://github.com/esp8266/esp8266-wiki/raw/master/deb/src/esptool_0.0.2.orig.tar.gz tar -xvzf esptool_0.0.2.orig.tar.gz sudo cp esptool/esptool /usr/bin
so we finiahed the sdk
compile a standard at firmware
cd ~ mkdir esp_sources cd esp_sources cp -R /opt/Espressif/ESP8266_SDK/examples/at at cd at wget -O Makefile https://raw.githubusercontent.com/esp8266/source-code-examples/master/example.Makefile make
its all easy to understand.
then you will get two bin files after that upload to flash。
FW firmware/0x00000.bin FW firmware/0x40000.bin
connect cp2012 witn wifi module by the picture particularly get through two middle pin to enter firmware upgrating model
add a usb device in virtual machine
load usb constituent to virtual
we must use some tools written by python so install python 2.7 (pay attention!use python 2.7 not python3 ,they are different) python is included in new ubuntu system
if you use old version ,come to https://www.python.org/downloads/ to download it
we also need a library to support serial port communication pyserial-2.7
addres :http://pyserial.sourceforge.net/pyserial.html
download pyserial-2.7.tar.gz (md5)
unzip and install
tar -xvzf pyserial-2.7.tar.gz cd pyserial-2.7 python setup.py install
then download
unzip and copy bin files to(/home/miniking/esp_sources/at/firmware)
then type <code> cd /home/miniking/esp_sources/at/firmware
sudo esptool.py –port /dev/ttyUSB0 write_flash 0x00000 0x00000.bin
sudo esptool.py –port /dev/ttyUSB0 write_flash 0x40000 0x40000.bin <code>
its normal if you see two progress percentage in this step
especially disconnecting 3v3 to reset module after finishing uploading 0x00000,because module would turn to normal model,we cant upload second firmware at this model。
in the end,you would see “Failed to leave Flash mode”,its ok,you have done 。 please download new firmware and sdk at the end of the article our source code also available in the end
get through middle two io to switch firmware upgdating model