用户工具

站点工具


en:ocrobot:modules:seed

OCROBOT SEED (WIFI)

synopsis

OCROBOT SEED is Based on ESP8266 IC Cheap WIFI

Parameters


  • 802.11 b/g/n protocol
  • Wi-Fi 2.4 GHz, support WPA/WPA2
  • Integrated 10-bit ADC
  • Integrated TCP/IP protocol stack (ipv4 only at the moment)
  • Integrated TR switch, balun, LNA, power amplifier and matching network Integrated PLL, regulators, and power management units
  • +20dBm output power in 802.11b mode
  • Supports antenna diversity
  • Deep sleep power <10uA, Power down leakage current < 5uA
  • Integrated low power 32-bit MCU
  • SDIO 2.0, SPI, UART
  • Wake up and transmit packets in < 2ms
  • Standby power consumption of < 1.0mW (DTIM3)
  • Operating temperature range -40C ~ 125C

Firmware UPdate


Connection circuit

Reverse connection TX RX

vcc to 3V3

GND TO GND

Short circuit IO in the middle

Download Firmware Update TOOLS

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。

build a compilation environment(the firmware development)


build a virtual platform

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

compilation environment


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.

install SDK


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 codes


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

upload firmware


hardware prepared


connect cp2012 witn wifi module by the picture particularly get through two middle pin to enter firmware upgrating model

software


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

esptool.py

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

IO and circuit


normal model circuit

firmware update model circuit

get through middle two io to switch firmware upgdating model

picture


reference

en/ocrobot/modules/seed.txt · 最后更改: 2023/06/07 04:23 由 127.0.0.1