WizFi250?

Status
Not open for further replies.
Hi Frank, I have yet to receive the first cut at my ESP8266 Teensy add-on so I don't know if it works yet, but there are two pinout still available that could be used for GPIO13 and 15. I'll consider....
 
I just realized that it is be a very good idea to have GPIO13 & GPIO15 available - these are RTS/CTS for Hardwarehandshake.
I just ordered another ESP8266 Board.

In the meantime, I try to patch the original "AT-Software", perhaps it is possible to use GPIO0&2 as workaround with a bit trickery in the AT-software?
If it works ( I'm not sure ) , I will publish a patch for the most used "ESP-01" Boards

Frank.

It turns out that it is more difficult as expected , if not impossible .
- The firmware is no longer open source, and from the UART code that I really wanted to modify there is no source code
- There are the functions espconn_recv_hold ( struct espconn * pespconn ) and espconn_recv_unhold ( which do exactly what I want ) but in the API for AT commands there is no way to obtain " espconn ".
 
Hi Frank, I have yet to receive the first cut at my ESP8266 Teensy add-on so I don't know if it works yet, but there are two pinout still available that could be used for GPIO13 and 15. I'll consider....

For many applications it may work without RTS - but without there is no chance to slow down the transfer if needed.
For my current project, a handshake is really needed: It receives streaming audio and the servers send as fast as possible to fill the remote buffers.
If found some radiostations that send more than 1 MB at the beginning of streaming - i really don't want to add so much memory.
I tried to slow down the transfer with a very low baudrate - this works a bit better (the ESP8266 handles the the slowdown automatically), but even with that, the existent 256 KB fill slowly and after a minute the ram is full - so i need a way to tell the ESP "hey, pls. stop, i can't handle more!".
Interestingly, not all streaminghosts do this pre-buffering, i have some working without any trouble for several hours with only 128KB buffer. But i want it better ... ;-)

So i really need a handshake, but it's impossible with the ESP01 Boards.
For File Transfer, or similar applications a handshake is important too.
 
Last edited:
Just got the first batch of boards yesterday and will assemble in the next few days. Assuming everything works as designed, I am a little fuzzy on whether the ESP8266 chips I bought are pre-loaded with firmware, or do I have to load it into the ESP8266 or somehow get it into the flash memory? Anyone know how to properly initialize an ESP8266? I suppose it is too much to hope that I just plug it in and it magically works!
 
From the Datasheet:
Firmware & Software Development Kit
The application and firmware is executed in on-chip ROM a
nd SRAM, which loads the
instructions during wake-up, through the SDIO interface, from
the external flash.

Hm. That does not answer your Question..
But there is a ROM, I *think* it is able to download&write the firmware to the flash.
For your first experiments you can perhaps "steal" a flash from a ESP01 and solder it to your board, to prove that it works ?
Then you could try an empty flash in a second step.
 
I have access to the ESP8266 developer's forum. If it doesn't work magically, I will ask there what are the steps to make it work. The developer support is really quite extensive and I have no doubt I will get it working. How exciting, to have a Teensy with wifi!
 
I have tried many firmware but at the end I'm happy with this.
https://github.com/espressif/esp8266_at/tree/master/bin
It works also with Arduino's modified IDE from the esp8266 forum and with ESPlorer., basically it's just the AT version so it will work immediately with teensy.
Had many troubles with firmware uploaders on Win7, esp8266_flasher it's simpliest but doesn't work all the time and failed with expressif firmware, flash_download_tool_v1.2_150512 needs a degree in something to be used, also has the annoing limit of 14 coms (actually I'm using COM55, thanks to the tons of usb stuff I've used this year). The only one that worked out of the box: esptool.py, a python script, if you have Win I can give you the command line to burn firmware with it.
 
Last edited:
I am using a Windows XP laptop, will it work there? And is the firmware on the chip or is the chip blank when we buy it from China? Do you flash it with firmware via the UART or? Is the flash procedure written somewhere? Or is the firmware written to the on-board flash memory? Thanks for your help!
 
You need a USB to serial device that can output data at 3v3 volt or you have to use with a level converter (I'm actually using a cheap chinese unit with a 4050 chip), DTR or whatever are not so essential, only TX and RX.
You also need a strong 3v3 supply, the ESP8266 suck a lot of current and will not work if supply it's not consistant!

The ESP8266 connections, depends of module you have, if you use the cheap standard one (GPIO0 and GPIO2):
TX -> usb to serial RX
RX -> usb to serial TX
GND -> GND
+3v3 -> +3v3 (with at list 500/600ma)
ChPD -> +3v3
RST -> +3v3
GPIO2 -> +3v3
GPIO0 -> GND (when you program the chip), +3v3 (normal operation) Switching between modes require a Hardware reset.

Other ESP modules with GPIO15 or similar have a slight differences caused by extra GPIO's, you'l need to check forum for that.

About software, you need to install Python 2.7. http://python.org/, it should be installed correctly and should work at system level.
Download esptool.py https://github.com/themadinventor/esptool/raw/master/esptool.py, create a folder in C: and put esptool.py inside.
Download firmware https://github.com/espressif/esp8266_at/tree/master/bin and put files in the folder you have created.
Now you need the CMD shell, type CMD in windows run.
You need to point the shell in the directory you have created before, use command CD until you are there.
You also need to find out the COM your USB to serial it's using, let's say COM15 (as example)
Now time to type something on shell (one by one):

Code:
esptool.py -p COM15 write_flash 0x00000 boot_v1.1.bin [enter]

..If succesfully, reset ESP to prepare it to accept another upload

Code:
esptool.py -p COM15 write_flash 0x01000 user1.bin [enter]

..If succesfully, reset ESP to prepare it to accept another upload

Code:
esptool.py -p COM15 write_flash 0x7C000 esp_init_data_default.bin [enter]

..If succesfully, reset ESP to prepare it to accept another upload

Code:
esptool.py -p COM15 write_flash 0x7E000 blank.bin [enter]

Done. If you don't close the CMD you can disconnect power to esp, connect another one and instead retype everithing you just use the up/down arrow and repeat sequence.
Looks complicated but at the end it's not really. If you have troubles don't esitate to contact me.

Use it... Can be used in many ways, direct AT commands, using Arduino modified IDE to install a dedicated program and work as standalone or using UART with Teensy or use nodeMCU.
If you download ESPlorer http://esp8266.ru/esplorer/ you can play with it since it's still connected with USB to serial and check everithing works.

If you plan to use the Arduino modified IDE from ESP8266 forum on windows, unfortunatly they don't upgraded the win distro often so I had to recompile the IDE myself to have the whole thing really working (the one online it's not working almost at all on WIN).
If you need I can put the IDE somewhere and provide the link, the last version can overclock the ESP at 150Mhz as well and I've succesfully used for install REST and standalone server that communicate by serial with Teensy, it's like to have a kinda YUN for 2,5 buks!

PS
You do a great work with your mini modules, really amazing design!
 
Last edited:
Wow! sumotoy, thank you! This is great!

I plan to put the first board together tonight and I have an FTDI 3V3 serial programmer I used to use to program the Pro Mini. I chose a 3V3 voltage regulator with 300 mA current limit so I can provide the ESP8266 with enough power from LiPo battery. My plan is to mount the ESP8266 module on top of the Teensy (USB end) and a LiPo battery charger + 100 mAH LiPo battery on the bottom.

You do a great work with your mini modules, really amazing design!

Thanks for the kind words, and the very useful ESP8266 tutorial. I am sure I will be asking lots of questions since this device is all new to me.

But I am excited at the prospect of having a device with the Teensy power and footprint that can communicate via wifi.
I'll report on my progress and post a picture of the assembled board.
 
Since i have the ESP connected to my Teensy, i have a little sketch working as a "proxy" for programming. This way i don't have to disconnect it.
It works very good with the "official"downloader from the Espressif-bbs ( http://bbs.espressif.com/viewtopic.php?f=5&t=433 ) and others. I can upload the code here tomorrow (it's really very simple)

The best firmware so far is the latest official ( http://bbs.espressif.com/viewtopic.php?f=5&t=398 ).
But it works NOT with the ESP-01 boards, because they have only 512KB Flash, and this versions needs 1MByte minimum (the Olimex has 4).

Today I received my new ESP board from Olimex and flashed the firmware above..and hey.. my streamingradio works great now !! I connected the CTS pin to the teensy and use it for flow-control ESP->Teensy. I really should have done this weeks ago... my problems with buffering are all gone now. Lol, i think i have added more RAM than needed (256KB).

One Question, (i found no answer for this on the internet). How much RAM has the ESP8266EX ?

A little extra-info: I took a quick look at the python downloader.
It seems that there is a basic bootloader in the ESP-ROM which is able to write the FLASH. In the Script is a bit of assembler which gets downloaded to es ESP too, perhaps this does the main work. So, i assume that an empty FLASH can be written.
 
Last edited:
You welcome onhorse! There's tons of infos around this chip but when I start from basic with it I come across many difficulties to understand how and where...
Just a note about power consuming, I observed peak of 400mA (and over) several times, normally it's working in safe area but peaks can happen, overclocking at 150Mhz seems cause just a little warmer but I didn't try well the improvements and power consuming at that speed.
This chip it's a little current sucker.

The best firmware so far is the latest official ( http://bbs.espressif.com/viewtopic.php?f=5&t=398 ).
But it works NOT with the ESP-01 boards, because they have only 512KB Flash, and this versions needs 1MByte minimum (the Olimex has 4).
Thanks for Olimex info! I didn't know that, but on olimex site the MOD-WIFI-ESP8266-DEV has 2M, are you using another model?
About firmware, holy words, absolute agree, I have tried tons of strain but at the end the Espressif are the best. I'm actually using the ESP-01.
A little extra-info: I took a quick look at the python downloader.
It seems that there is a basic bootloader in the ESP-ROM which is able to write the FLASH. In the Script is a bit of assembler which gets downloaded to es ESP too, perhaps this does the main work. So, i assume that an empty FLASH can be written.
Yes, I have noticed, have received my ESP module blank, have tried many firmware uploader but none worked well as this one, on another module there was an old firmware and I was able to update quickly with any uploader. I think that once ESP has boot on it it's much easier to update.
I'm actually using it as REST server, can't resist, time ago I was coding a lot with PHP, apache and lamp stuff and now it's a dream that I have this tiny thing doing the same job (ok,almost...). This chip cost nothing compared many other stuff from Texas, etc. it's also very powerful, I can get his signal from far outside my house! Too bad that this come at the price of current sucker.
Anybody here tried the module with the ceramic antenna? It's better than circuit printed one?
 
Last edited:
OK, I got the first board put together and the 3V3 voltage regulator is working, the led indicator is on and now I have to figure out how to use it. How can I tell if I need to flash it with firmware? Is there some kind of Hello World program equivalent with this thing?

Here's what it looks like:

ESP8266.jpg

Hi sumotoy, I followed your steps to program the flash and got stuck at the first write attempt with this error:

test.png

Ani idea of what I am doing wrong? I am using a windows XP laptop and I downloaded python2.7
 
Last edited:
Sumotoy, yes that is correct, it's 2MB.

I do not want to confuse... here is my setup which i used yesterday to flash the Olimex Board (latest Firmware):

Screenshot.png
GPIO2 is tied to HIGH, MTDO to LOW.

My simple "Proxy":
Code:
#define ESP8266_RST        16
//#define ESP8266_CH_PD      3
#define ESP8266_GPIO0      17
//#define ESP8266_GPIO2      2

//Serial Ports
#define ESP8266_SERIAL Serial1
#define ESP8266_SERIAL_BAUD_INIT 115200


void setup() {  
  ESP8266_SERIAL.begin(ESP8266_SERIAL_BAUD_INIT);   
  pinMode(ESP8266_RST, OUTPUT);

  pinMode(ESP8266_GPIO0, OUTPUT);
  digitalWrite(ESP8266_GPIO0, LOW);  //LOW for flashmode
  
  //Reset:
  digitalWrite(ESP8266_RST,LOW); 
  delay(2);
  digitalWrite(ESP8266_RST,HIGH);
}

void serialProxy() {
  
    if (ESP8266_SERIAL.available()) {
        Serial.write( ESP8266_SERIAL.read() );          
    }
    
    if (Serial.available()) {
      ESP8266_SERIAL.write(Serial.read());          
    }    
    
}

void loop() {
  serialProxy();
}

When the ESP8266EX boots, with a 26MHZ Crystal the Baudrate is 74880 at first.
As soon as it reaches the "Usercode" (The AT-Interpreter) it switches to 115200 Baud.
You can use 115200 from beginning on if you accept some garbage-output at start.

Your board look great !
A bit finetuning for the next rev could be to do it like the olimex-board and tie GPIO2 HIGH, MTDO to LOW.
Schematic: https://www.olimex.com/Products/IoT.../resources/MOD-WIFI-ESP8266-DEV_schematic.pdf
A very good thing is the LED on TX.
 
Last edited:
Is there some kind of Hello World program equivalent with this thing?

You don't need a "Hello World". Just enter AT-Commands in a Terminal, uppercase and with CR+LF lineendings.
You can use the "proxy" from above (switch it to "run mode") and the Arduino Serial Monitor too.
 
I'd be surprised if a homebrew board responded to AT commands.
Surely the AT stuff is on the flash memory?
I use code like Frank B's as a 'pass through' when I use Teensy with ESP8266
 
tie GPIO2 HIGH, MTDO to LOW

Yes, after putting the board together, as usual, I realized I should do things differently. Next time I will add two leds, one on TX and one on RX as well as all three being individual 0402 leds instead of the rgb led I am using. And I now realize I should pull up GPIO 0 and 2, etc. I will redesign it to be better in the next go 'round. I just want to see if I can get it to work in this configuration first.

Which one is MTDO?

I'm curious to know the ESP tipology you have used, ESP-01? 512Kb ?

I looked at the olimex schematic as well as the espressif reference design. The former was very complicated and the latter is what I basically copied. The flash is 4 Mbit, or 512 Mbyte, yes.

Where do you get the esp flash download tool? That looks useful.

I will download the pyserial tool tonight and try again with sumotoy's method.

Be VERY careful about powering these things - this issue comes up very often & I was a disbeliever until recently...

What is the issue with the power? I have a 3V3 voltage regulator on the board rated for 300 mA. Is this not enough?
 
Which one is MTDO?
According to the Olimex-schematic, its the same as GPIO15 (aha(?)..that's new to me, too)
It is pulled down in this schematic, and the documentation (https://www.olimex.com/Products/IoT...ces/MOD-WIFI-ESP8266-DEV_jumper_reference.pdf) says this jumper has to be low to select the correct boot-mode.

And, for GPIO0:
For example:
Initially, you can't update the firmware of MOD-WIFI-ESP8266-DEV since by
the board starts in the default FLASH mode. In order to update the
firmware of the board you would need to change the starting mode to UART.
This is done by changing the position of the jumper named IO0JP(GPIO0) to
0. After the update is done – change the position of IO0JP(GPIO0) back to
1 again.
MOD-WIFI-ESP8266-DEV-2.jpg

Any progress ? :)
 
Last edited:
Now I am worried that I will have to redesign the board. GPIO15 is not broken out and seems to be necessary for flashing. I copied the pin outs from the available modules but they must load the SPI firmware before mounting on the board. How is the firmware flashed on this module?

Looks like GPIO15 might not be necessary since it is not broken out on the ESP01 module. I will try it just by setting GPIO02 LOW as above and see if I can get it to work. BTW, Where can I get the blank.bin file, on the github site it looks like a bunch of garbage and I can't download it?
 
Last edited:
I'm not really 100% sure, my eyes are not good and I used the thick probes from my multimeter, but this pin seems to be connect to GND on the ESP-01 Module.
Perhaps sumotoy can confirm this ?
 
Last edited:
Status
Not open for further replies.
Back
Top