Friday, July 24, 2015

Esp9266-Esp12 Adaptors

I purchased several Esp8266 Esp-12 modules with Adaptor boards, but found that the Adaptor boards are not very Protoboard friendly, that is, when put on a protoboard there are NOT any open (uncovered) hole locations for Jumper Pins. As shown below.

Note: All Holes for Jumpers are Covered by the White Board
And besides, I wanted to create my own adaptor, similar to the Esp-11 Adaptor created earlier (see previous post).

This is what I have created for the Esp-12, it has 9 pins with 2mm spacing on one side and 100mils spacing on the other.

I have made this Adaptor Board a Shared Project for your use at, see Link. Let me know if you find it useful.

The Adaptors are very inexpensive, 3 for $1.00, I suggest ordering them in groups of 12 or 24. The larger count makes the postage and PayPal charges more tolerable for OshPark.

Mounting Configurations

One board is used for each side of the Esp-12. They can be used in several configuration (including one that I had not previously thought of, when creating it, more on that later).

The Castellated Edge Connector needs to be cleaned and "de-burred", the manufacturing process leaves fibreglass dust and burs of metal from the inside of the hole that was cut to make the Castellated Edge Connector.

Clean and Match the Castellated Edge Connector
Align and Solder Header Pins
First, Header Pins were Aligned and Solder , they were later pushed into a Protoboard to help align the Esp-12 on top. Note: the Header is NOT soldered through the holes in this configuration.

All Finished

Another configuration uses the Adaptor parallel with the Esp-12 and with the Header soldered in the holes as normal.

The Flat Wing Configuration
I do not care for this parallel Flat-Wing Configuration, for the same reason that I do not like the original purchased adaptor, it covers all of the Protoboard Jumper-pin Holes (not protoboard friendly).

An Unplanned Back-to-Back Configuration

But, . . . while playing with this Flat-Wing Configuration, I notice that if I reverse the two boards the Esp-12 fits very nicely on top and leaves most of the Protoboard Jumper-pin holes available. I clipped the Header-pins very close (short) with very sharp clippers. And then, just for good measure and avoid shorts, I put tape on the back side of the Esp-12 board.

Adaptors Back-to-Back
The Esp-12 is aligned and then soldered on top.

Esp-12 Soldered to Back-to-Back Adaptors
Esp-12 Read for Use
Or, Ready for 8-Pin DIP Socket
Note, with this Header-pin spacing, this would fit into a normal 8-pin DIP socket !

The Family

Here is my (new) current family of Esp-12, ready for action.

The Family
Let the Esp Programming Fun Begin, . . . Again !! :-)

BTW, I have a Esp-13 Adaptor being manufactured, more on this later.

I like the Back-to-Back configuration so well, that I plan to create yet another adaptor, it will be a single board Back-to-Back Adaptor - details to follow.


Sunday, July 12, 2015

Esp8266-Esp11 Adaptors

I prefer the Esp8266; Esp11's and Esp12's for my projects, but interfacing to tightly spaced pins can be challenging. In past (see previous blogs) I have used several methods to make the connection to the edge "Castellated" pin-outs.

What is needed is an adaptor for the Esp11's 1.27mm (50mil) pin spacing and the standard 100mil protoboard spacing.

The following is my solution for the Esp11, a small board produced by I have made this board available for your use via a shared project, at:

Let me know if you find these useful, Thanks.

The Adaptors are so inexpensive, 3 for $1.00, that I suggest ordering them in groups of 12 or 24, the larger count makes the postage and PayPal charges more tolerable for OshPark.

A group of Adaptors
Ready for Solder
Castellated Connector
The Castellated Connector is created by the manufacture by routing (cutting) though the centre of a plated hole.

Note: the hole conductor is slightly "curled" (distorted) by the cutting process, but that is not a problem as the curl will be encased in solder when used.

Pin Alignment with Esp8266-Esp11
The Pin Pitch is 1.27mm (50mils)
Solder Is Used as Jumpers
The Solder Jumpers are very strong and durable, and perhaps making the joint stronger than the fiberglass PCB itself.

Solder Jumpers were Installed in Groups
Pin Headers (100mil) are Added
Ready for Use
These four Esp's are now ready to be used on my protoboard.

Some of my Esp projects are available online, see previous posts.


Wednesday, July 1, 2015

Esp8266 - My Experimental WebServer

I have been developing an Esp8266 Experimental WebServer (see previous posts).

There are many issues that had to be over come, and still more that will be worked on in the future. At one point I was just about to give-up on this effort, but my friend Jeff - KO7M has helped with some very sticky issues.
Currently my WebServer is about 2500 lines of Arduino IDE code, and compiles to about 300K bytes.

The WebServer provides three major web pages; Home, Help and Admin. Some of these pages are "contrived" to be large (e.g., ~30Kb), to push the limits of; Memory, Heap, and WIFI data transfers. Many issues had to be solved to allow this to all work. Heap and Memory Management has always been an issue. For String Constants, I use a P() and Pn() functions throughout (see code). For graphics, I have used SVG.

Here is a list of current features:

 * This Program Provides the following for the Esp8266 as a WebServer:
 *      Home Page Dashboard
 *      Help Page
 *      Admin Page, with WiFi Scan and Network Selection
 *      Page Navigator and Resource Links
 *      Raw Data Query
 *      NTP Network Time (Unix Epoch)
 *      mDNS Service/Client
 *      Optional Page AutoRefresh
 *      Auto AP Timeout
 *      Implements SVG 12/24 Hour Clock
 *      Implements SVG Gauge for FreeMem and Vdd
 *      Implements and uses Html "meter" function

This WebServer is a little slow, but tests indicate that it will support several browser connections, although only one will be actively be transferring data.

I am going to post my work to GitHub for others to use and/or provide feedback, I will provide the Link here when it is setup.

This WebServer is some what "contrived", and which I will use as a Template for my future Esp8266 projects. Normally, an Esp8266 would be used for data collection or control, but I wanted at least a simplified Stand alone Dashboard and with easy data access and I/O control, I think my implementation fits the requirements.

Here are a few of the graphic elements that are implemented, all of which are sourced directly by the Esp8266:

Esp8266 Dashboard
(home page)

An SVG Graphic

Admin Wifi Scan Page

Occasionally, I will make one of my Esp8266 WebServer available online at:

There are still more functions and ideas that I want to implement. And, there is lots-of-room for optimization, but I want this effort to be as dynamic and free of limitations as possible.

I will continue to develop this and try to keep the GitHub code up-to-date.


Monday, June 8, 2015

Esp8266 - Including Two New Functions

I am working on two new functions for my Esp8266 Project Template (see previous post). The two new functions are:
  • NTP Client to obtain Unix Time, and Provide Low Quality Time as an NTP Server
  • Configuration for New Node via a query to a Previously Configured Node.
The Idea is that a newly constructed Esp8266 node should be able to configure itself based on similar node in the immediate area. The new node will be able to obtain SSID, Passwd and maybe Epoch (Unix Time) from a working node. Once the new node is online, a more accurate time will be obtained from a national NTP server (i.e.,

The full list of obtained configuration items have yet to determined.

I have some of this working, but it is still work in progress.


Wednesday, June 3, 2015

Esp8266 - Project Progress

For the last several weeks I have been programming my Esp8266's, I have experienced frustration, anguish, and some delight.

The frustration comes from the fact that the Esp8266 is a relatively new product and not all (or enough) documentation has been translated from Chinese to English. Or, the six or so, development environments (i.e. IDE's) are implementing conflicting strategies for supporting libraries and functions. Sorting out what is relevant, is sometimes difficult

So far, I have been using the Arduino IDE (originally Rev 1.6.1) which support the Esp8266. The included Examples are nice, but are not very useful as for an actual application, that is, they do not suggest how to implement typical combined solutions for some rudimentary functions.

For example, I think a typical home-grown project should have the ability to run in Software Access Point (SoftAP) mode at initial turn-on and accept configuration or connection information for Station (STN) mode connecting to local Access Point (AP) for further operations.

My Goal

My goal is to build that function into my project, but the details lacking on how to switch from one Channel or SSID to another via software control. The Esp8266 can be easily "Programmed" to attach to a selected AP, but that requires a new download for each environment. I am sure the solution is simple, but so far it eludes me.

Still Learning

I have learned a lot, and I have many of my desired functions working.

Note: two things I have learned about the Arduino IDE that I did NOT know, and documented here for my future reference, are;
  • First, Arduino IDE Tab Sections (normally files) with a hidden ".ino" suffix are compiled as part of the "main" file ("*.ino") without the need for the usual compiler "forward" declaration and "export" declarations typically found in other software IDE's. This is very handy for quick small projects, where organization is more important than software development correctness.
  • Second, Arduino IDE "control /" will convert a section of code into a "comment" and back again. This is very useful while debugging. This short-cut has always been there (I guess) but I had not previously used it, but now I use it all the time.
Project Template

In general, I am creating a "template" for my future projects. The template will have the following functions:
  • A "Dashboard" page which is accessible via the assigned device IP Address or alias.
  • A "Help" page that will list all of the available functions
  • "Query" methods or functions to extract data, that can be used via a web page or non-typical web access methods (e.g., curl, telnet, etc).
  • An "Admin" page, to control different aspects of the device.
  • A "Navigator Bar" to switch between pages and "Links" to support information.
  • A mDNS Responder, so that a device can be access via a "*.local" alias.
  • My goal is to include MQTT functions

Here are some example Pages, The Navigator Bar can be used to switch pages. Note: code was included to make the pages, Desktop and Mobile Device Friendly:
Home Page - The Dashboard
This is the "Admin Page" after a WiFi Scan, network selection and Passphrase can be entered to switch networks.
Admin Page - WiFi Scan
 The Help Page provides information and links.

Help Page
Note: the Help page provides links and/or URL's so that a "Query" can easily be constructed for Raw Data access. For example, on a remote system:

$ curl Nod1590.local/q/uptime 

The above will prints just the number of seconds (uptime) since power-on.

Some Hurtles

One of the most troublesome aspects of my Esp8266 development was dealing with unexpected web request. Initially, my tests were simple and successful, I was using a Firefox browser on my LinuxMint Workstation, where a simple single web requests received a simple single response from the Esp8266 App. The app provides a "404 Error" for all unexpected web request. This all worked great, and as expected.

But Then . . .

But then, I tried my app using my Cell Phone and Tablet Browsers, which quickly crashed my Esp8266 Web Application. The problem was these browsers repeatedly (and relentlessly) request a "/favicon.ico" file, which over-ran the Esp8266 buffers, or just "hogged" all of the available bandwidth ( which I have very little, I have a slow and terribly BAD Internet connection to my Shop ). The "/favicon.icon" requests can NOT be "ignored", they just keep coming and therefore the Esp8266 must deal with them. I spent several days (actually more than a few) looking for a solution, including creating and sending a dummy ( or contrived ) files to satisfy the requests. The online searches provided many suggestions, but in all cases the solutions were not optimal, they all still uses my (scarce) network bandwidth and small Esp8266 buffer space.

My devised and final solution was much more simple than I expected (and elegant, if I may say so). I pre-emptively re-direct all external "/favicon.ico" requests to where they belong - that is, to Espressif (the Manufacture) web site where they happily (or at least hopefully so) provide the file. The redirection takes place in the Browser and therefore the data transfer is between the browser and manufacture, and NOT with my Esp application. Espressif gets the web hits and I get bandwidth relief, the user sees a nice icon on the Exp8266 App browser tab, and my application does not have to deal with the issue. A single line in the Esp's web application html Header does the trick. Very-Very Simple!

<link rel="shortcut icon" href=""></link>

Note: Yes, I know this solution may not be web polite, and if I find a better solution, I will post it.

Lack of Understanding

Another thing that plagued my early Esp8266 App development was my lack of understanding of the "Strings Objects"! I have been working with too many languages lately. My friend Jeff - KO7M has helped and provided suggestion. In general, I was originally inappropriately using Strings that could be trashed (and crashed) by the "Garbage Collection" (GC) process. Most web page generation is about generating Large strings, managing them is important so that the "Heap" is not stressed and so GC can properly reclaim space.

But Now, Progress

Also, to save RAM space, I am using a previously used technique (see previous post) of moving all "string constants" to FLASH using PROGMEM, and "not" using the Heap, and there by avoiding some of the RAM space issues. As stated above, most web pages generation is just manipulating long strings in RAM.

To Be Done

I just have a few more issues to work out, and then I will publish the code as an example of Stand-alone Esp8266 Development App.


Saturday, May 9, 2015

Esp8266 Esp-12

There are several configurations of the Esp8266 modules which is denoted with a Exp-XX suffix. Currently I know of Esp-01 through Esp-12, each have their advantages and dis-advantages.

Although I have be experimenting with the Esp8266 Esp-11 (see previous post), my goal is to use the Esp-12 configuration for more complex applications. The Esp-11 configuration has only 8 pins, while the Esp-12 has 16 pins, and therefore more I/O options.

Breakout boards are available for each, but there are trade-offs; the Esp-12 Breakout Board is much wider than the Esp-12 itself. Even though the breakout Esp-12 Breakout Board is protoboard friendly (i.e., 0.1in spacing), it is so wide that there is little space to attach jumpers (I think only one hole row on each side is usable).

I decided to try the technique of bending header pins as necessary to match the 2mm spacing, I originally used this method on the Esp-11 (see previous post).

The pin spacing of the Exp-11 is smaller at 1.27mm, while the Esp-12 is 2.0mm. A good microscope is needed to solder headers directly onto either.

Esp8266 Esp-12 with two 0.1in Headers Attached

Now all that is needed is wiring-it-up and some software (Yeah, . . . famous last words).


Friday, May 8, 2015

Esp8266 - Programming Success

For several weeks, I have been failing at programming the Esp8266 ES-11.

I had purchased a group of five Esp8266's for initial experimentation. I also purchased a small number of 3.3v/5.0v FTDI (USB to Serial) Adapters which are used to program the Esp8266's (see previous post).

Esp8266 and FTDI
The FTDI is also used to configure the Esp8266's using simple (default) "AT" instructions.  I could configure the Esp for "Station", "Access Point", and for "Both" modes. In "Both" modes, the Esp can be configured as a WIFI-to-WIFI Router. The cellphone APPs; "Net Scan" and "WIFI Analyser" are very useful to understand what is going on (or not).

Everything was looking great.

So, the next step was to compile a program, to replacing the Default functions with a Program that I have written. The instructions looked simple, and there are several Programming Environments to choose from; Arduino IDE, nodemcu, ESPlorer, and others. Besides, supposedly, there are easy to use programs to re-Flash the device back to the "Factory Fresh" original (ROM) state (so I thought).

This is where the Trouble Started.

At each attempt to do something interesting, that is; Program the Device or Reflash it back to original configuration - I killed another of my Esp8266s, in other words I BRICKED it!

Of the five purchased Esp8266's, I managed to BRICK three of them, I only had two good Esp's left. Now, being gun shy, with the new Exp8266, everything was suspect.

The goal became "How to UnBrick a Esp8266" without "Bricking" another. I have been working this problem for about two weeks without progress or solution.

There is a ton of information on the Internet regarding Bricked Exp8266's, but a lot of it is confusing and conflicting.

This post is about what I did to UnBrick my Esp8266's.

I gave my friend Jeff - KO7M a Bricked Esp8266 and one of my FTDI USB-to-Serial Adapters. We worked several days trying to download or ReFlash the Exp8266 - without much luck.

The Fix.

After several more hours of work, Jeff suggested and tried a different FTDI.

It worked !

To make a very long story short, we replaced the FTDI with another variety, the Parallax PropPlug. We think the previous FTDI was corrupting the downloaded data that was being sent to the Esp8266's.

Yes I know, the PropPlug is a 5V device and Esp8266 are 3.3v devices. But I forgot that on the original test, and it is working, so I have not changed the configuration (only TX/RX/RST/GND are connected).

UPDATE: One of my readers (yeti) provided correction, the PropPlug is actually a 3.3v chip and device, I have always thought it was 5v. See Link,  Thanks !!

The PropPlug (on the right)
connected to
the Esp8266 (on the left)
Question: why would the original FTDI work interactively, but would NOT work to download Batch and Binary files? - "I Don't Know, and Don't Care" - with the PropPlug, I now have something that works.

Since I started using the PropPlug I have NOT had a single failure, and we have recovered each of the Esp8266's with either the original Binaries, or my compiled programs.

Currently I am playing with Arduino IDE Compiled WIFI WebServers, one of the servers has been running for greater than 48 hours, and has serviced about 4800 test page requests. I have three running side-by-side.

Three Web Servers
These will become a part of my Internet-of-Things (IoT).

I can't guarantee that they are online, but you can check at:

Esp8266 Web Server
Note: the page refreshes each 30 seconds.

More fun and information to follow.


Monday, May 4, 2015

K7QYP - A Bit of History

 A Bit of History, and a Blast from the Past
(the way I remember it)

About 48 years ago, I graduated from the US Navy's "A", "B" and "C" Electronic Training Schools. Due to the Training received in "C" School, also known as "PMEL" (Precision Measurement Electronic Lab), I was assigned to the Electronics Calibration Lab aboard the USS Howard W. Gilmore AS-16 in Charleston SC. Where I met Don Seahulster - K7QYP, who was my Shop's Lead.

Don was a Amateur (Ham) Radio Operator. On our first trip to sea together, Don brought his Ham Gear and portable antenna on board. The antenna was mounted on the hand rail outside the shop door. Don worked many Phone Patches back to the States for crew, including the XO which enjoyed getting updates and weather from his wife. The FCC, the Captain, and the Shipboard Radio Operations Officer were all aware of and supported Don's Ham Radio activities. To be able to talk with folks at home was a BIG morale boost for the Crew!

I was not a Ham at the time, this activity convinced me to get a Ham Ticket.

One of our planned Port-of-call was San Juan Puerto Rico, which just happen to have a FCC Field Office. Bob Stothfang and I studied together in preparation for the Ham test, we were both just out of Naval Electronic School and therefore hopefully, it would be easy, we just needed to brush up on the Regulations and some radio details.

At the FCC Office we both took the Amateur Radio; Technician, and General Tests. We also took the FCC; Third, Second, and First Class Radio Telephone License Tests. And while we were there, we took the Ship Board Radar Endorsement Test. A few weeks later, Bob and I, both received notice that we had passed ALL tests  :-)

I became; Eldon - WA0UWH, and Bob - WB8BEQ.

Later while on board, we were in the Ship Yard for some Refit and Repairs. Don received a new piece of Lab Equipment, a HP-117A VLF WWVB Receiver. We were the Shipboard Calibration Lab and this was to support the Time Standard for all calibrations. Of course, the VLF Receiver needed an outside antenna mount, and with the best coax money could buy, all plumbed directly to our LAB.

The Ship Yard did a great job on the installation, all of the through bulkhead water tight fitting were first class. The VLF Loop Antenna mount was up on the HeliDeck, but within arms reach while standing on the deck hand rails, this was so that the loop antenna could be rotated as necessary at each Port-of-Call (or at least that is what Don told me).

On our next trip to Sea, Don again brought his Ham Gear, and a new AVQ Antenna, which we mounted on the HeliPort VLF Antenna mounting stub (removed VLF antenna), with direct coax cable access to our LAB. With this configuration, we had much better signal into the States,  which produced many more and better Phone Patches for the Captain, XO and the Crew.

So, why relate all of this history?

Well because, a piece of that History has come full circle.

One of the QSL cards that Don sent 47 years ago, while on board the USS Howard W. Gilmore AS-16 running Phone Patches for the crew, was just recently seen on ebay for sale. And yes, Don has purchased it.

K7QYP - QSL on Ebay

Note, the 4 cent Stamp
Don sent the card for 4 cents, and received it back 48 years latter for $12.00 plus shipping - now that IS inflation !

When Don left the Navy, I became the Calibration Lab Lead, and continued the tridition of providing Phone Patches for the Crew with my Ham Gear and a 4BTV mounted on the same VLF antenna mounting stub.

Don is no longer K7QYP, he is now W4LSC, I am still WA0UWH, and I think, Bob is still WB8BEQ?

Somewhere, I still have the Radio Logs of those calls.

All Good Memories :-)


Friday, May 1, 2015

Enigma - Hardware Implemented in Software

For several years, actually more like 30, I have being fascinated with the workings of the Enigma Machine.

On several occasions I have toyed with a Enigma Machine software design, but was never able to build an accurate solution. I have a very specific implementation in mind. So far, nothing has worked correctly. But, I guess, I have had a low-grade mental effort constantly considering the problem.

About three years ago, Wardy posted his build of a hardware implementation. That renewed my interest, but even with more work on my software implementation, and even with still a lot more thinking, there was no real progress.

Recently, my friend Jeff - KO7M posted his Enigma Machine implementation, I purposely did NOT read his details, because I wanted to continue with my implementation without external insight. But then again, his efforts renewing my interest in my software implementation. I still have that specific implementation in mind that I wanted to pursue.

So now, after several weeks of casual work on my software Enigma Machine, it still does NOT work as expected, some character are encoded correctly, but many others are NOT.

So, . . .

At night, sometimes I wake up,  thinking about the problem. And each night I seem to understand a little bit more.

There are several ideas that have helped me understanding the Enigma Machines operation. To simplify, I like to think of it in terms of:
  • Forget the Plug Board, it is a simple character exchange.
  • Code Wheels act like a "Fixed Wired, but Rotating PlugBoard", with simple two-letter exchanges.
  • The logic of the rotation of wheels is easier to understand if I think about it like a PlugBoard without cables plugged in, that is, character are not exchanged (i.e., A-to-A, B-to-B, etc)
  •  And, the Reflector is a simple adjacent character exchange (i.e., A-to-B, C-to-D, etc)
  • The code algorithm from the Input-to-the-Reflector, and the Reflector-to-the-Output, should mirror each other.
  • All wheel advancement and algorithms use Clock Maths.
  • Exchange of characters can be implemented after a correct wheel advancement algorithm is found and implemented.

Last Night

Last night, I suddenly woke up, . . . and had a algorithmic solution I wanted to try. In about five minutes, I had it typed in (see below).


With proper Settings, I can now correctly Encode and Decode any M3 and M4 Enigma message, as verified.


The following is the guts of my software Enigma Machine implementation:

# Get Message Character
$i = ord($m)-65;

# Inc Wheels as Necessary
@P[3] += 1;     # Increment with each character
@P[2] += ((@P[3]%26) == $Adv3_Static+1);
@P[1] += ((@P[2]%26) == $Adv2_Static+1);
@P[0] += 0;

$R3 = @P[3] % 26;
$R2 = @P[2] % 26;
$R1 = @P[1] % 26;
$R0 = @P[0] % 26;

# Do Enigma, Encode or Decode
$i = @PB[$i];
$i = (@WL3[($i+$R3)%26]+26-$R3)%26;
$i = (@WL2[($i+$R2)%26]+26-$R2)%26;
$i = (@WL1[($i+$R1)%26]+26-$R1)%26;
$i = (@WL0[($i+$R0)%26]+26-$R0)%26;
$i = @R[$i]; 
$i = (@WR0[($i+$R0)%26]+26-$R0)%26;
$i = (@WR1[($i+$R1)%26]+26-$R1)%26;
$i = (@WR2[($i+$R2)%26]+26-$R2)%26;
$i = (@WR3[($i+$R3)%26]+26-$R3)%26;
$i = @PB[$i];

# Show Light, The Encode Character
print chr($i+65);

I will post a complete listing, after I code a proper User Interface and implement Multi-Notch Wheel advancements.

There are some details of newer Enigma Machine versions that I will not try implement, but they should be simple.

Note: There are probably optimizations that could be used in the code (I am still learning python).

This has be a long, mentally challenging, and fun project. But now, I guess I need to find another  :-)


Tuesday, April 28, 2015

Esp8266 - Easy Programming - NOT! (or, at least not yet)

UPDATED: see below

I have been playing with my Esp8266 (see previous post). I received these a few weeks ago, but before use, I had to wait to receive a 3.3 Volt USB to Serial Programmer.

Esp8266 Wired and Ready
To work easily with a Protoboard, I removed the original angled header from the Programmer, and replaced it with a "straight down" header. Unsoldering the header was a pain, because it was assembled with Lead-Free Solder, which does NOT melt very easy - I hate that stuff ! - (A note to the Manufacture, the EPA, and OSHA, I was not planning on eating or licking the board, normal 63/37 solder would have be fine  :-)

WIFI Analyzer
Once Wired, the Fun Starts.

Out of the box (the bag actually) this little board seem easy and is interesting to set up. With the help of online resources I was able to send and receive messages from the serial interface.

The supplied "AT+" commands allow you to change the WIFI mode and connect to a local WIFI Access Point.

I use a Cellphone App; "Wifi Analyzer" to see the Esp8266's RF output, along with other local WIFI AP's. 

And, another App; "Net Scan", was used to check for the IP Address as seen from my network.

The web page provides some good instructions and examples, but the way the pages is written as an Image, you can NOT Cut-n-Paste from it, now how dumb is that!

The following is an example of a normal initial dialogue with a Esp8266, recorded here for my future reference (Cut-n-Paste works here). Note: to make the listing shorter, some blank lines have be removed.


c_�� #��FjS�fJ;��
[ Version:]







But, NOT all is well in Paradise.

I have managed to "Brick" the first two of my Esp8266's (only 3 more left).

After the initial set up and tests, my desire was to install an application onto the Esp8266, I chose a simple example "Hello World - Web Server" from the specially configured Arduino IDE 1.6.1.

The download (actually Uploading) went as expected, with a status of "Done Uploading". But, that is when the troubles began. I can no longer see the RF output on the WIFI Analyzer, the IP Address does not show up on Net Scan, and the RESET status text sent to the Terminal Window is just Binary Trash, regardless of the Baud Rate or Terminal Settings that I choose.
Binary Trash

Update: With help from Jeff - KO7M, and his Digital Analyser we have determined the "Trash" is a "Reset Message" sent at 74115 Baud (or 74880 baud nominal), most of my usual programming tools do not have that baud rate as an option. But even when forced, no joy:

$ ./ --baud 74880 -p /dev/ttyUSB* write_flash 0x000000 foo.bin
Erasing flash...
Writing at 0x00000000... (0 %)
Traceback (most recent call last):
  File "./", line 538, in <module>    
  esp.flash_block(block, seq)
  File "./", line 197, in flash_block
    struct.pack('<IIII', len(data), seq, 0, 0)+data, ESPROM.checksum(data))[1] != "\0\0":
  File "./", line 106, in command
    raise Exception('Invalid head of packet')
Exception: Invalid head of packet

We were able to extract binary from a known "good Esp8266", but was unable to flash a "bad Esp8266" with that binary (see above).

Currently I am, "still" Lost.

There is a lot of conflicting information regarding; "How to UnBrick a Esp8266", the suggested programs do not work well with Linux, and the Firmware files were very hard to find. The most helpful online resource seems to be from this blog.

But, so far, I have NOT been able to "UnBrick" my two Esp8266's, they are cheap and I could just toss them, but I want to figure this out.

Here is what I see on a Workstation terminal, note: I am in group "dialout" and have normal write access to /dev/ttyUSB0. I thought that maybe the Serial Data Rate was wrong (see above), but then I can repeat the Arduino re-program just fine, with the proper finished "Done Uploading" report.

$ ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Apr 28 17:03 /dev/ttyUSB0

$ ./ -p /dev/ttyUSB0 write_flash 0x000000 AI-v0.9.5.0_AT_Firmware.bin
Traceback (most recent call last):
  File "./", line 473, in <module>
  File "./", line 151, in connect
    raise Exception('Failed to connect')
Exception: Failed to connect

I am hopeful, . . . and when I do find the answer, I will update this post with additional information.

UPDATE: It works, see post.