Friday, August 21, 2015

More Esp8266 Web Server Farm

I have my Experimental Esp8266 Web Server Farm up and running (see photo on original post), for your continued review, it is even faster, and will support many more browse connections.

With "AutoUpdate" set to 60 seconds, I have had as many as 25 browser tabs connected to one of my Esp servers. It normally eventually fails, that is, when more than 4 connections are requesting updates simultaneously. But it was fun to watch the mayhem. Sometimes the ESP even recovers on its own.

I have now included a "Visitor Map", so I can see where connections are coming from, see below.

There are three Esp8266's in this "farm", all using the identical source code. And because of that; the displayed Visitor Map will appear Identical on each, that is because they all contain the same "map registration key" which is used by

As indicated on a previous post, access to my farm is via a generic IPA:Port connection, which is:, which I had previously changed in my router as necessary to externally connect to a particular Esp (local IPA:80).

For the other devices in my Esp Farm (and bench), use PORT: 8162, 8168, 8169 and/or 8172 (note: one of these will also be also connected to the generic 8160 port). Note: one or more may not be working at any point in time, try one of the others.

With only my local tests and a little WIFI activity, so far the small and simple power supply has survived, and actually worked well. I may need to add "more power" with more concurrent user accesses.

An Interesting Idea: If other Esp Programmers with similar Experimental Public Accessible Esp Servers include the same "map registration key" (a short line line of Html code) we could create a "pseudo reverse beacon" that would display to the "world" our intense shared interest in the Esp. On each configured Esp Web Servers, the "Visitor Map" will display all web connections to our "Esp Web Collective". How fun is that!!??

Let me know if you are interested, I will share details (or you can extract the keys from my Esp web Home Page source list).

It's all fun, . . . with the ESP's !!! :-)


Wednesday, August 19, 2015

My WIFI Transfer Improvement - 160 Times

I use, and like, the Arduino IDE for ESP8266 software development and have used the "example code" for my initial efforts, but now, my interest expand beyond trivial examples.

My Experimental Web Server Farm
Above is My Experimental Web Server Farm :-)  (a little under powered, but it works)

Like many of the published ESP examples, I used a form of "server.send()" to transfer data via WIFI, but then I found "that" function is somewhat limited (or at least the way I understand it) and therefore I explored the available documentation and source code for other capabilities.

I found "server.sendContent()" which appeared more flexible and more to my desires for a transfer function. I have used "it" for several months for building my apps. My typical transfers are about 5K to 15K bytes, but can be as large as 100K bytes.

My dynamically created WEB Pages typically take about "6.5 seconds" to transfer to a browser, for a small device like the ESP's, I thought that was a little slow, but still usable.

Actually, for my application, I started considering abandoning the ESP's, due to lack of WIFI transfer speed.

BUT THEN, in some obscure recesses of some online web page, I found the "server.client().print()" function - A BIG SPEED IMPROVEMENT. Now the same dynamic WEB Page transfers in only "0.043 seconds" !!!!

For my application, that is a BIG speed improvement of 160 times faster. From my perspective, the little ESP is now a WIFI "screamer" !!

I really like it, . . . when something WORKS !!

This note is published here in hope that someone else finds this information useful. If previously known, it would have save me a lot of time and anguish.

I only wished I understood or knew this earlier, but then I am still learning the ESP (there is much to know). I am sure there are other ESP improvements or coding strategies that I have yet to discover. I plan to publish my "example" application code for others to review, use, and/or abuse.

For your review, my experimental ESP Web Server is (sometimes) running at:


Thursday, August 13, 2015

DipTrace 2.9 Beta

DipTrace has just made available Update 2.9 Beta, which includes several new capabilities or functions. The most interesting/useful to me is "Configurable HotKeys".

I have assigned:
  •       "]" to Object -> "Update All Copper Pours"
  • "Ctl-]" to Object -> "Unpour All Copper Pours"

During the last stages of a PCB edit, my productivity will now jump 1000%.

Previously making small trace-edits to (ensure connections or adjust) of the pours was an extremely tedious task.

Also, I have assigned:
  • "[" to View -> "Mirror"
Now a quick tap of "B" then "[", shows the the bottom side in "normal" flip-the-board-over view, which is very useful when adding Text Silkscreen to the bottom side.

And then, "T" and "[" reverts back to the normal top side view.

Note: A little Silkscreen text on each side helps orient yourself for each side.

And Yes I know "Mirror" has always been there, but it was always a "Pain-in-the-butt" to find it in the drop down menus, and therefore I seldom used it.

Thanks, DipTrace Team !!!


Saturday, August 8, 2015

Enigma - Revisited

I have watched and read several more articles regarding cryptography. Each suggest that any method that uses "reused keys" or "reused sheets" is doomed to be deciphered, especial with very fast computers available today. The Enigma Machine had a very large Key, one of 158,962,555,217,826,360,000 settings. Which is computed as:

5 * 4 * 3 * 26^3 * ( 26! / (6! * 10! * 2^10) ) = 158,962,555,217,826,360,000

Note: I did NOT verify the above expression :-)

It has been suggested that the use of the Enigma, which did NOT use a "reused key", had its own downfalls. The most fatal where the facts that any single character would never encrypt to itself, and the "day key" was transmitted twice, or read from a code book.  History may have been recorded very differently without these two flaws.

The mechanics of the Enigma changed the running "key" with each character as the message is encoded, which is good. But, the starting "day key" was normally transmitted in a predictable formant twice at the beginning of each day.

I have played with my software implementation of the Enigma Machine, and have recently realised that software does not have-to-have the "limitation" imposed on the original Enigma Hardware, which had only 26 letters, 3 or 4 mechanical wheels, and jumper wires to implement the cypher.

My software implementation "could" easily use all of the ASCII codes (256, or maybe even more), as many "wheels" as desired, and with coded jumpers (in wheels and plug-boards) that "could" encode to themselves.

I think, flaws could be removed, as  the "published" problems with the Enigma. And, it is easy to do, it is just a mater of some easy to implement software! A very long "day key" could be created with Diffie-Hellman key exchange that could be easily transmitted via the Internet. The Software Enigma could instantly encode and transmit a message the same way.

It was suggested that even with the knowledge of the internal working of the Enigma. it would have been a lot harder to break the code (if the flaws had been eliminated). The same is true with a software solution, the algorithm could be published without much fear.

I wonder: How long would it take to decipher text from my Greatly Expanded Software Enigma Implementation? With just 256 Letter Codes, 256 Wheels, and 1 plug-board?

The German Enigma Key would appear to be a VERY SMALL fraction of the size of the possible Keys with 256 Letter Codes and 256 Wheels.

Actually, I do not think that would/could ever be answered, the problem is just too big.

For now, Software algorithms are always fun to think about  :-)


Maybe "it", the number of keys for a 256 Letter Codes and 256 Wheels would NOT too big to calculate, I think it would be about:

256! * 256^256 =

Or, about: 2.77221 x 10^1140 Keys

This number is not as big as a "googolplex", but it is very large.

This was computed with the following on a Linux machine:

$ echo "`echo 256 | factorial` * `echo '256^256'`" | bc


Tuesday, August 4, 2015

Another ESP Adaptor

UPDATE: Here is some important info, watch this thread for progress:

Yes, this is yet another Esp8266 Adaptor, but this one will support an Esp-12E with its extra six pins. The side pins match the Castellated pins on the Esp-12E. Note: this Diptrace 3D rendering does not know how to correctly represent Castellated connectors.

Top Side - Esp8266 Esp-12E Adaptor
I just sent the design into for manufacture, the boards should be returned in about 2 weeks. The cost is $1.50 each. If all goes well, I will share the design as a Project on OshPark.

Bottom Side - Esp8266 Esp-12E Adaptor
"If", I did everything right (with no mistakes),  this should fit a 22 pin DIP socket, or a normal Protoboard with lots of available holes for jumper wires. The underside used two single row SMT 0.1 inch Headers which are available on Ebay, for example: here.

While designing this adaptor, I considered adding a few Pullup Resistors, Program and Reset switches. But, for the boards size that would require a four layer board, and would decreases Pin flexibility.

I think this adaptor will be my favourite, for small Esp8266 Protoboard development projects. The Esp-12E provides lots of I/O and is still very small (I like that).

Note: this design is the result of experimenting with a "Back-to-Back Configuration" as suggested in a previous post.

Monday, August 3, 2015

Kolban’s book on the ESP8266

I found a wonderful new published ebook and/or PDF for the Esp8266, the link saved here for future reference:

Also, see:

Thanks, Kolban for your efforts !


Friday, July 24, 2015

Esp8266-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.