For flashing the board, uploading my programs and data I also bought USB/RS232 adapter with 3.3V support. This one:
It looks pretty slick and contains a chip which looks like a USB to RS232 converter from FTDI. I connected it to my Windows 10 machine and it was recognized as FT232R USB UART and the driver was downloaded and installed correctly.
In order to experiment with the device I did the following:
- Installed ESP8266 platform from Arduino Core for ESP8266
- Installed ESP8266 SPIFFS (flash file system) tool as described here
- Cloned Arduino Core for ESP8266 repository in order to get access to the examples
Uploading 1028096 bytes from to flash at 0x00100000 ............warning: espcomm_send_command: didn't receive command response warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04 error: espcomm_upload_mem failed SPIFFS Upload failed!
After some experimenting with the flashing utility (esptool) I found out that I can actually upload compiled program (not a SPIFFS image) into the same memory area 0x00100000 without a problem (!) and it made me thinking that there must be some difference in the files content. I checked the files and found out that the file produced by mkspiffs contains a lot of sequential 0xFFs (11111111). I forcefully replaced them with 0xAAs (10101010) just for sake of the experiment and tried to upload the file. It worked!
Initially I assumed that the there is a RS232 timer synchronization problem in ESP8266, but then I searched the Web and it seemed like I’m not alone having this problem, it’s quite common and tends to appear on Windows platforms. It looks like the driver starts sending 0x00 instead of 0xFF at random moments when it recognizes a fake FTDI chip! And indeed, my chip has date-code 1412-G which is, according to this report, fake.
After ordering a bit more other (a bit more expensive than the first one) USB to RS232 adapters, I started thinking what I can use to flash my ESP8266 while I’m waiting for the new (and hopefully genuine) adapters to come. I decided to try my Arduino UNO even though it doesn’t have 3.3V support. Yes, I know, it’s not recommended and you can burn your ESP8266 chip, but I couldn’t wait.
So, I connected the reset pin to the ground putting all the pins in the high-impedance state and effectively disconnecting the micro-controller from the board (some pins do have other connections though, like pin #13). I also connected:
- Ground Arduino <-> Ground Olimex ESP
- TX Arduino pin #1 <-> Olimex ESP pad 3/GPIO1
- RX Arduino pin #0 <-> Olimex ESP pad 4/GPIO3.
Everything worked and I was manged to upload the SPIFFS image and the program without a problem.
You can try to do the same, but be aware that using Arduino UNO (or similar board) for programming ESP8266 is risky and you can potentially damage both devices.