Author Archives: Allen Huffman

About Allen Huffman

Co-founder of Sub-Etha Software.

RadioShack is back!

Have you checked the RadioShack store locator page lately? I did, last week, and instead of just finding three dealer stores in my state (none within an hour), I was surprised to see on in nearby Ankeny, Iowa. It was in some place called HobbyTown.

Somehow I missed the announcement that the Shack posted to their Facebook page back in July. Indeed, they now have a store-within-a-store at some HobbyTown locations.

I went to visit this location, and thought I’d share a trip report.

HobbyTown… Remote controlled cars, model rockets, and … RadoShack Express!
Yes, Virginia. There IS a RadioShack inside.
They only have the electronics parts, all displayed on the wall. No answering machines, video cables, or cell phones.
Even perfboards! This IS your father’s RadioShack! Except it’s still missing the space between the words :(

There was also another small glass cabinet nearby with a few other parts, and at the front checkout counter they had RadioShack brand batteries and such.

I have been working on some projects for Halloween, and found several items that I could put to use. I picked up a 12V buzzer, some 12V lights, some button switches, and some wire nuts. (Yeah, I know I could buy a whole bag of industrial wire nuts at the hardware store for just a bit more, but I only needed a few and “it was just a few bucks.”)

My bounty from my first trip to a RadioShack Express. They even use the old RS catalog numbers (after the RSH).

Leave a comment if you have a RadioShack near you.

Halloween DMX lighting and sound – introduction

Years ago, I worked with a local guy on bringing in computer controlled lighting and sound to a local haunted house attraction. The original attraction just used light bulbs of different colors and actors to make everything happen. Our upgrade included the following:

  • We used a cheap Windows PC and VenueMagic show control software.
  • We ran a chain of RGB DMX lights throughout the attraction.
  • About 14 speakers were installed, all wired back to a stack of cheap Pyle brand amplifiers.
  • A cheap USB hub and some $2 USB sound cards was used to get multi-channel audio from VenueMagic, and it worked great.
  • We installed pressure mats to trigger audio and effects.
  • I built an Arduino input box to read triggers from pressure mats and send them to VenueMagic as serial data.
  • There was also a DMX controlled relay board that was used to trigger air jets and control pneumatic doors.
  • When building regulations changed a few years into operation, the haunt was wired with illuminated exit signs and smoke detectors. Those were brought into the system so it could halt the show and turn on white work lights for safety.

The end result was a living, breathing attraction with flickering “flame” light, atmospheric moonlighting, strobe effects, as well as immersive surround sound throughout.

The VenueMagic software was, by far, the most expensive element of this project, and also the one that provided the most headaches. While the software itself was amazing and powerful, running on Windows was not. We had numerous issues over the years with Windows crashing, USB devices failing to be recognized, audio devices being remapped (requiring editing the show control configuration), etc.

Once the computer was in control, if it went down, you lost the entire show. The lights had a backup mode (we called it “party mode”) where they would begin randomly cycling through colors if there was no DMX signal. At least it didn’t leave the guests in the dark, but a silent haunt with circus lighting was far from scary.

In upcoming articles, I plan to discuss various ways you can show with complex lighting and audio, and make it play without needing a PC.

Just in time for the holidays ;-)

The CoCo is hooked back up.

Last week, I finally got around to unpacking and hooking back up all the Tandy Color Computer gear I took with me to the 2018 Chicago CoCoFEST! I am now using Ed Snider’s two-slow mini MultiPak replacement, so I ever have more room on my desk. I hope to get the Matchbox CoCo (new name for Roger Taylor’s FPGA CoCo recreation) permanently setup on the desk as well.

Even though I’m still going to be quite busy with summer activities (mostly taking bicycle rides), this gets me one step closer to returning to work on various CoCo projects, including SirSound.

I also got a cheap 3-D printer I will be reviewing, soon. The first thing I printed with it (other than the demo “cat” that it had) was an enclosure for the CoCoWiFi device (compliments of designer Travis Poppe). Now I know why John Strong of StongWare has been so into these printers for the past few years. Even this cheap “toy” one is great!

More to come…

Mandela Effect and Wayne’s World

I’m placing this here for searching engine visibility…

Mandela Effect amuses me because there was one that impacted me, involving a painting I remember seeing in the past twenty years, which does not exist. I have a plausible theory to explain that one, though.

Tonight, I saw Wayne’s World at a local theater. Two things stood out at me:

  1. During the first Wayne’s World segment, they bring on a guy who invented a Flowbee parody called the Suck Cut. I had remembered it being called the Suck ‘n Cut, but since I haven’t seen the movie since it first came out, I guess I just made the actual name more complicated and less like what it was a parody off. Flowbee, Suckcut. Not sure why I remembered it with extra stuff added.
  2. During the guitar store scene, Wayne picks up a guitar and starts to play the intro to Stairway to Heaven. I was very familiar with this song because I worked in a music store that sold guitars at the time of the movie’s release. But what he plays was not at all Stairway. But the joke was still there.

Well, number two is a licensing thing. I found an article explaining that only the original theatrical print had him playing a few notes from Stairway, and all subsequent releases from VHS on had those notes changed.

I am wondering if number one was something similar. I do find references on the internet to folks calling it “Suck ‘n Cut” as well, but the clips are Suck Cut. Mandela Effecters call this residual effect.

I think I just misremembered. It’s just rough to suddenly realize you have been wrong for a quarter of a century and no one corrected you :)

Sub-Etha Software announces more 2018 Chicago CoCoFEST! plans

FOR IMMEDIATE RELEASE:

Sub-Etha Software announces more 2018 Chicago CoCoFEST! plans

Des Moines, Iowa – March 14, 2018 – Iowa-based Sub-Etha Software reveals more plans for the upcoming 2018 27th Annual “Last” Chicago CoCoFEST! to be held April 21 and 22, 2018 at the Heron Point Convention Center in Lombard, Illinois.

“The biggest news,” says Sub-Etha co-founder Allen Huffman, “is that we will have Jolt Cola to drink during the road trip to Lombard, and maybe enough extra to share during the event.”

Among the new offerings at this year’s event will be CoCoWiFi, an inexpensive internet modem device that allows connecting the CoCo up to a WiFi network for accessing remote internet sites using telnet and other protocols. Both fully assembled and do-it-yourself kits are expected to be available, with pricing to be announced at the show.

CoCoWiFi is pretty cool,” says Huffman. “It looks like an old-school Hayes Smartmodem and can be used on any model Color Computer with any terminal program. If the MC-10 has a terminal program, I bet it would work there too. The best part about it is if you don’t wanna buy it, you can spend about $10 and put one together yourself without any soldering. But we’ll be glad to sell you one for much more than that.”

Another new offering will be SirSound, the serial port multi-voice sound device. SirSound provides (1980s) arcade-quality background music and sound effects from BASIC. It uses built-in commands with no assembly language or special drivers needed.

“SirSound is one of the funnest things I have ever worked on this month,” adds Huffman. “You can play the Frogger theme song just by typing a PRINT command. I expect it could also play the Pac-Man theme, too, but we haven’t tested that, yet.”

SirSound is still under development, as well as SirSound S (6-voices in stereo), SirSound Plus (SirSound with the ability to play stereo digital files) and Sir Sound S Plus. There will also be an open-source SirSound Jr project made available. It will have the most of the same features as SirSound, but will be limited to just 1-voice tone music. Beep beep.

“We also will have a selection of new-old-stock Sub-Etha items in original packaging for those who like to collect useless 5 1/4: floppy disks with photocopied instructions stored in plastic baggies. Of course, master disk images of all this stuff has been uploaded to the Color Computer Archive and will be available for free, too.”

Be sure to drop by Sub-Etha Software’s table in the main exhibitor hall during the event.

About Sub-Etha Software

Sub-Etha Software was founded in Lufkin, Texas in 1990, as a partnership between Allen C. Huffman and Terry S. Todd. It made it’s first CoCoFest appearance at the First Annual Atlanta CoCoFest in 1990, and it’s first Chicago CoCoFest appearance at the First Annual “Last” Chicago CoCoFEST! in 1992. They may be contacted online at www.subethasoftware.com

About the Chicago CoCoFEST!

The 27th Annual “Last” Chicago CoCoFEST! is sponsored by the Glenside Color Computer Club of Illinois. They may be contacted online at www.glensideccc.com.

Contact:
Allen Huffman
alsplace@pobox.com
PO Box 7634,
Des Moines, Iowa
U.S.A.
Ph: 515-999-0227

###

SirSound video demonstrations

One year ago, on March 9, 2017, Sub-Etha Software announced the Sir Sound CoCo Sound Card, today referred to as SirSound, without the space. Today we present to you the first public demonstration of the project.

SirSound demo 1- introduction

This 7-minute video walks through the basic concept of the device, and shows how easy it is to convert BASIC “PLAY” music to use the SirSound device.

SirSound demo 2 – polyphonic music

This 4-minute video shows how multi-voice music will be handled. It demonstrates 3-part harmony, and also a quick version of the Frogger arcade game theme music, all from BASIC.

More to come…

Proposing PreciousPak: The One Pak to Rule them All

“It is fun to reinvent the wheel. If it were not for folks doing this, we would never have built a better mouse trap…” – Some Dude

But when it comes to expansion cartridges (Paks) for the Tandy/Radio Shack TRS-80 Color Computer, what if we never had to reinvent the wheel again?

Programmable Hardware

These days, it is easy to make virtual hardware by the use of FPGAs and other such devices.  At a smaller level, there are already examples of expansion cartridges that have the ability to remap themselves into different I/O registers, all through software. This type of programmable hardware would be the basis of the PreciousPak.

PreciousPak artist’s rendering

Such hardware could, through software control, present itself at various I/O addresses within the CoCo’s memory map. This would allow it to appear at the same memory locations used by the RS-232 Pak, or the Orchestra-90 Pak, or anything else.

Then, the core hardware of the cartridge would be something like a programmable PIC chip or AVR (Arduino) processor, acting as an interface between the CoCo memory map and external hardware via SPI bus, I2C or TTL UART.

This is not intended to be a “one pak to do everything.” Think of it as the hardware equivalent of Jim Brain’s CoCoFLASH product. His smart flash Pak can be reprogrammed with various ROM Pak images, allowing it to act like any of those original ROM Paks. In the case of PreciousPak, it would require loading with custom firmware and adding the proper expansion hardware to it.

Here are some of the things PreciousPak could be easily made to do…

PreciousPak things.

PreciousRS232Pak

The PreciousPak could have special firmware loaded on it’s processor to emulate the 6551 UART chip found in the the Deluxe RS-232 Program Pak. This code would fix the known bugs, and could implement an internal buffer allowing for better speeds without data loss. An inexpensive TTL-to-RS232 module would be plugged in to provide the standard RS-232 connector.

PreciousOrchestra90Pak

The PreciousPak could interface with a Digital-to-Analog converter, and map in to the Orchestra-90 I/O address, and become an Orchestra-90 Pak. For advanced use, the firmware might even be made to allow loading up an Orch-90 music file and have it play in the background while the CoCo does other things. (Orch-90+!)

PreciousHardDrivePak

Of course, the PreciousPak could interface with an SD card module or USB flash drive adapter and then have firmware to make it look like a Kenton or other SCS/IDE interface. This would allow it to leverage already-existing OS-9 drivers and builds of RGB-DOS. Depending on the capability of the core PreciousPak hardware, perhaps it could even be made to emulate the Western Digital 1773 floppy drive chipset and act like a true floppy drive, similar to how CoCoSDC currently works. (Though, I expect this would require much more capability than would be needed for most other devices, so why bother…)

PreviousMIDIPak

Firmware could emulate the 6850 UART, used by various CoCo MIDI Interfaces. A simple TTL-to-MIDI adapter would be plugged in, giving MIDI ports. By making it look like a 6850 in the standard CoCo MIDI Pak address, it would instantly be compatible with all existing MIDI software.

PreciousSoundPak

Completely new sound hardware could be added, and the firmware could translate incoming commands as needed. Software written to use the Texas Instruments SN76489 chip (like in the GameMaster Cartridge by John Linville) could work on this sound pak, provided whatever native sound chip it used was similar, and the firmware translated the commands.

Perhaps firmware could exist to allow dynamically switching into different modes, to emulate the types of sound found in Roger Taylor’s CoCo on a Chip FPGA project, or Gary Becker’s CoCoFPGA project. Perhaps it could be made to provide some level of emulation of the Tandy Speech/Sound Pak.

Product or Service?

This common hardware design would allow more folks to come out with custom hardware. With dozens of types of expansion devices based on the same core board, manufacturing costs could be reduced. And, with many expansion add-ons being off-the-shelf parts (like adding .92 cent RS-232 adapter), the overall cost of many items would probably be a fraction of what a custom board would cost.

There are so many off-the-shelf devices available today that could be made into such a Pak… Real time clocks, camera modules, WiFi, etc.

And, for folks on a budget that might now want to buy multiple paks all set up for different devices, they could buy just the core board, and then several of the add-on interfaces. They’d have to swap out firmware and modules before they could use it, of course, but it would be possible.

I find it a very intriguing idea.

But, unless someone with the know-how steps forward to do it, it will remain just a proposal.

About the Name

I was calling it OnePak, but there is a company by that domain name.

Wire up your own RS-232 WiFi modem for under $10 using ESP8266 and Zimodem firmware.

Updates:

  • 2018-03-02: Making link to separate article on installing firmware easier to notice.
  • 2018-07-28: Travis Poppe has a 3-D printed case for this you can download and print: https://www.thingiverse.com/thing:2923619

This is a fairly detailed guide to configuring a cheap ESP8266 WiFI module to act as a WiFi modem, then wiring it up to any computer with a traditional RS-232 port.

It can be as simple as hooking up four wires, or many more wires, or even making a breadboard prototype:

Hardware Needed

  1. ESP82660-12E NodeMCU 1.0 development module (or a NodeMCU ESP-32S module)
  2. microUSB cable and power source (either powered by a computer’s USB port, or a standalone USB power supply like a phone charger)
  3. RS-232 to TTL adapter that operates at 3.3V.
  4. Female-to-female jumper wires (or male-to-male jumper wires and a breadboard)
  5. RS-232 cable (and possibly an RS-232 gender changer or NULL modem adapter)

Software Needed

Currently, we have to download and build the special Zimodem firmware, but as soon as I figure out what it takes just to load a pre-built binary, this section will be removed.

  1. Serial Drivers for the development module you choose.
  2. Zimodem firmware for the ESP by Bo Zimmerman.
  3. ESP firmware flash tool (or Arduino IDE if you want to download and build the source code yourself).

HARDWARE

ESP Development Module

The ESP8266 is a tiny WiFi device that can also run custom code. The development module version has a built-in USB-Serial adapter that can be used for debugging and loading firmware, and also gives a convenient way to power the module.

  • I started out with a NodeMCU ESP8266-12E module from Amazon for $8.29, available with 2-day Prime shipping. I later ordered a batch of five for $25 from this e-Bay reseller (shipped from the US). You can also find them for under $4 each if shipped from China.
  • The ESP32 is also supported, like this ESP32-WROOM-32 NodeMCU 32-S module for $12.99 on Amazon. They can be also be found for under $6 shipped from China. The ESP32 adds support for Bluetooth, but the firmware we will be using currently does not make use of it. The only real reason to use it is that Zimodem for ESP32 will be built using standard RS-232 signals, while the Zimodem build for ESP8266 has inverted RS-232 signals for Commodore computers, and will require some additional setup to make work on non-Commodore machines.
  • Even an under-$2 ESP-01 will work if you are not needing full RS-232 signals like hardware flow control and carrier detect. However, you will need more hardware to program it and power it, so I just stick with one of the development boards that has USB built in. (It actually cost me more to order an ESP-1 plus the USB programming adapter than to buy one of the devkits with everything built in.)

microUSB Cable and power supply

You will need a standard USB to microUSB cable to hook the ESP to a computer so you can load the firmware. Most Android phones use this type of cable, as do things like the Raspberry Pi. If you don’t have one, you can probably buy one at the local gas station.

This cable will also provide power for the ESP module, so it will need to be hooked to a computer’s USB port, or into a USB power supply like a phone charger. Again, commonly available even at the local gas station.

RS-232 to TTL Adapter

The ones I found have a standard DB9 female connector and contain circuitry that will convert the 3.3V chip-level TTL signals used by the ESP chip to standard 12V RS-232 levels that a computer uses. These will often will come with a short 4-wire jumper cable that can be used to hook them up to the ESP module.

  • If all you want is just transmit and receive (referred to as a “3-wire” hookup), you can go with a simple one like this $7 one from Amazon (there are also ones under $6), or find them for less with slower shipping (under $1 shipped from China). These provide hookups for TX (transmit), RX (receive), VCC (power) and GND (ground). For simple uses, this may be all you need. MAKE SURE THE ADAPTER SUPPORTS 3.3V! Some only work with 5V and are not compatible with the ESP modules. WARNING: Some of the ones I tried that claimed they operated at 3.3V did not, so it may take some trial and error.
  • If you also need hardware flow control (referred to as a “5-wire” hookup), there are adapters that a add extra connections for CTS and RTS. They are usually cost just a dollar or so more. (Here is a $10 one from Amazon, but I’ve found them for under $4 on eBay.)
  • If you need full RS-232 signals, including carrier detect, I have found two sources of adapters that provide TX (transmit), RX (receive), DCD (data carrier detect), CTS (clear to send), RTS (request to send), DTR (data terminal ready), DSR (data set ready), and RI (ring indicator).
        • Pololu 23201a Serial Adapter – available asssembled for $11.50, or in a partial kit for $9.95. This adapter uses one row of 10 pins, and is breadboard friendly.  However, I have had been some issues with this part, so I cannot currently recommend it. If you try it and can get it to work, please let me know.
        • AIBANS.BREAKOUT Adapter – available through Amazon for $4.68+$3.03 shipping from California reseller MD Fly, or $3.25+$3.65 standard shipping through their e-Bay listing. (On eBay, you can get a shipping discount for ordering multiple units.) This one works great for me, but it uses a dual-row of pins so it is not breadboard friendly.

Jumper Wires (Female-to-Female)

Most of the RS-232 to TTL adapters I have seen come with a set of jumper wires with female ends. They slide over the pins on the board, and then slide over the pins of whatever you are connecting it to. They allow hooking up parts without needing soldering skills or even a breadboard. I find bundles of 40 of these for under $3.

This .92 cent adapter, shipped from China, came with jumper wires.

Optional: Breadboard and Male-to-Male Jumper Wires

Optionally, if you want something that is a bit more “stable” (without exposed pins and such), you can use a breadboard and male-to-male jumper wires, then plug everything up and jumper them together.

RS-232 Cable and Adapters

You will need a cable to go from your computer’s RS-232 port to the adapter. Your cable will depend on the type of RS-232 to TTL adapter you have. All the ones I have use DB-9 female connectors, but there are some that use a male connector.

For example, my Radio Shack Color Computer has a 4-pin DIN connector for the built-in Serial I/O port. Back then, cables where made that had a male 4-pin DIN connector on one end (to plug into the CoCo) and a male DB-25 connector on the other (to plug into a modem). If I could find my old cables, I could use them, but I would still need a DB-25 to DB-9 adapter to go between that cable and the smaller DB-9 connector of the RS-232 to TTL adapter.

Another common type of serial cable is a NULL modem cable, which was used to hook two computers together by serial ports. I have a NULL modem cable that has the male 4-PIN DIN connector on one end and a female DB-9 on the other. Since it is a NULL modem cable, it has the TX and RX lines swapped so it can plug directly to a “modern” PC’s serial port DB-9 male connector. To use this cable, I needed a male DB-9 to male DB-9 NULL modem adapter, which will swap the TX and RX again, making it a normal cable like the RS-232 to TTL adapter requires, and change the gender so it will plug into the TTL adapter.

I also have the Deluxe RS-232 Program Pak, which provides a full RS-232 port with a female DB-25 connector. To use that, I ordered a standard male DB-25 to male DB-9 cable from Amazon. This will plug directly from my RS-232 Pak to the RS-232 to TTL adapter.

Basically, you will need whatever serial cable your system requires and a way to convert it to plug into a DB-9 connector.

SOFTWARE

The ESP modules have their own software installed, and it includes a command mode where you can use “AT” commands (similar to the old Hayes Smartmodem standard) to do various WiFi things. But, this is not setup to emulate an old modem connection. Instead, we will use Bo Zimmerman’s excellent replacement firmware called Zimodem. He provides the source code, but you will have to download and build it, then load it into your module.

I am now maintaining a special version of Zimodem that has things set up for normal RS-232 use. (By default, the original Zimodem works in a Commodore mode for 8266, and normal for ESP32. My version works in normal mode for both.)

Serial Drivers

Most of the low-cost ESP parts use serial hardware that is not recognized by a Mac or PC (not sure about Linux). If you plug up your ESP part to your computer and it is not recognized as a serial port (Like COM5: on windows, or /dev/cu.SLAB_USBtoUART on Mac), you will need drivers.

Most sellers will provide links to where to find drivers. For the Amazon parts I purchased, they used the CP2012 chipset, and I had to download and install the drivers for it. Once installed, you can plug the ESP module up and it should show up as a new serial port device.

Firmware Flash Utilities

Because of the various methods available to install ESP firmware, I have split them out into a separate article.

Please read this article for details on how to load the firmware onto the module without needing to install the Arduino IDE, download the sources, and build it yourself.

Testing Zimodem

Once the firmware has been installed on the module, you can open up the Serial Monitor in the Arduino IDE and verify it is running. You will need to set it to 1200 baud to match the default speed used by Zimodem, and have it set to “Carriage return“. You can type “AT” and it should respond with “OK”. You can type “AT+CONFIG” and it should startup the configuration process.

Zimodem startup banner, and entering the “AT+CONFIG” command.

If you get this far, you are ready to hook it up to the RS-232 to TTL adapter and then connect it to your computer.

WIRING

Simple 3-wire hookup

For simple serial ports, all you may need to do is hook up TX (transmit), RX (receive), VCC (3.3v) and GND (ground) between the ESP module and the TTL adapter. Here is the pinout of the NodeMCU ESP8266-12E module:

NodeMCU ESP8266-12E module pinouts.

All you have to do is connect the jumper wires between the pins of this module, and the matching pins on the TTL adapter. Some TTL adapters may have TX and RX reversed, but in general you want to hook up like this:

3-wire hookup:

    TTL         ESP8266
    ===         ==================
2   RX  <------ TX  GPIO1 (TX)
3   TX  ------> RX  GPIO3 (RX)
5   GND <------ GND GND
    VCC <------ 3V3 3.3V

For one of my adapters, I found it would not work using the 3.3V pin, and I had to switch to using the Vin (voltage input) pin, which would be the 5V coming off the USB connection. *THIS IS NOT RIGHT since the I/O pins of the ESP modules are mean to handle 3.3V and not 5V, so use caution. If you absolutely can’t get it to work on 3.3V, you can do what I did, but you risk frying the ESP.* I have other adapters that work properly at 3.3V.

It looks like this (note I am using the incorrect Vin instead of VCC):

ESP8266 to “3-wire” RS-232 TTL adapter.

WARNING! Keep all the bare metal pins from touching anything else! They could cause a short if they made contact with any metal. To reduce the chance of this happening, I used some of the non-conductive packing foam that the ESP module came in, and plugged the exposed pins into it:

To protect the exposed pins, I plugged them into the non-conductive packing foam that the part came in.

There are still a few exposed pins, and on the top side of the module are lots of metal parts and solder connections, so just make sure you keep away from any metal parts!

Now I was able to hook this up to my Color Computer’s Serial I/O port and load up an old terminal program and start using Zimodem.

Zimodem via Greg-E-Term on a Radio Shack Color Computer via the bitbanger Serial I/O port at 1200 baud.

RS-232 Challenges – Carrier Detect and Flow Control

A quick tidbit on RS-232…

There are nine lines used for RS-232. They go between the computer (DTE, data terminal equipment) to the device (DCE, data communication equipment). Prepare for many acronyms!

TX and RX: You can think of most lines as one-way paths, with some lines going from the computer to the device, and others going from the device to the computer. For instance, transmit (TX) from the computer goes one way to receive (RX) of the device. On the device, it’s transmit goes one way to the receive of the computer.

CTS and RTS: Some lines are used for flow control. Each device has a request to send (RTS) output line that goes to the other side’s clear to send (CTS) input line. CTS goes to RTS, and RTS goes to CTS, similar to have TX and RX and handled. For example, the computer turns on RTS (request to send) to tell the remote device it is okay to send data. The remote device reads this on it’s CTS (clear to send) pin. The reverse is also true, with the remote device’s RTS going to the computer’s CTS. Thus, if using flow control, the computer or device only send when their CTS (clear to send) line is active.

DCD: The device may also use carrier detect (DCD). For a telephone modem, when a call is connected, the device will turn on carrier detect. The computer can read the status of the DCD line to know if a connection is in progress.

RI: There is a ring indicator (RI) that was used by modems to indicate an incoming call. I’ve never used this at all, since the RS-232 interface I had back then wasn’t even wired for it.

DTR and DSR: I am less clear on how all these could be used, but in general, DTR was set by the computer to tell the remote device if it should hangup or not. The computer would “drop DTR” and that would force the modem to hangup. DSR is set by the device to indicate it is there and ready.

Here is a quick chart to explain them, specifically as how they are used by Zimodem:

 DTE (Comp.)        DCE (Modem)
 DB-9 Male          DB-9 Female
=============      =============
pin in    out      in    out pin
1   DCD <--------------- DCD   1
2   RX  <--------------- TX    2
3         TX  ---> RX          3
4         DTR ---> DTR         4
5   GND                  GND   5
6   DSR <--------------- DSR   6
7         RTS ---> CTS         7
8   CTS <--------------- RTS   8
9   RI  <--------------- RI    9

Some RS-232 interfaces require more than just TX and RX to be happy. The Color Computer’s RS-232 Pak, for example, uses a 6551 UART chip. This chip will not receive data unless it sees carrier detect (DCD). Old telephone modems would provide this DCD signal when a call was in progress, and drop the signal when the call ended This gave the computer a way to know if a connection was established or not. Unfortunately, this signal is not present in a 3-wire connection.

Faking carrier detect and flow control

It was possible to hook two computers together without a modem by using a NULL modem cable. These cables would swap TX and RX, so one computer’s transmit would end up at the other computer’s receive. They would also often do some trickery to force the DCD signal to be active. They did this by tying some of the pins on the RS-232 port together:

RS-232 port modification to make it operate without needing real DCD and other signals.

If we really don’t care about this missing lines (like CTS/RTS flow control, DTR/DSR, etc.), we can modify the RS-232 to TTL adapter so make it provide a fake DCD signal back to the computer.

Using the above diagram as a reference, I was able to solder a few pins together and use a short piece of wire to recreate it on real hardware:

Ugly soldering example of tying the DCD, DSR and DTR pins together, as well as CTS and RST.

This modification makes it so anytime the computer enables DTR, it will make DCD and DSR read as if they are enabled. It is creating a fake status by looping the DTR signal back into the DCD and DSR input pins.

Since this 3-wire hookup also does not have CTS and RTS, if the computer is expecting CTS (clear to send) to be active, that can never happen and thus it can never send. This modification ties the outgoing RTS (request to send) back to the incoming CTS (clear to send). When the computer enables request to send, to tell the remote device it is okay to send, it will read that same signal as if the remote device sent in it’s own request to send (coming in on the CTS line of the computer).

So much stuff.

Suffice it to say, but tying these lines together, it will fool the RS-232 device into thinking there is an active carrier detect and data terminal ready signal from the demote device anytime DTR is enabled. And, it will see a clear to send signal anytime it turns on read to send… Loopy goodness!

With that said, if you don’t want to solder, you could pick up these RS-232 jumper devices and create the connection this way. Note that in this example, I do not have CTS and RTS tied together. For my specific test, I did not need it, but other RS-232 interfaces may require it.

Minimal wiring required to get an RS-232 Pak to talk to a 3-wire RS-232 interface (TX, RX and GND).

5-wire hookup – Implementing real CTS/RTS flow control

Another option is to use an RS-232 to TTL adapter that actually provides more of these signals. For a bit more, you can find an adapter that has CTS and RTS as well:

“5-wire” RS-232 to TTL adapter, adding CTS and RTS for flow control.

By adding two more wires between Zimodem and the adapter, you can use real hardware flow control. Zimodem will only send when it sees a clear to send signal from the computer, and if Zimodem can’t handle all the data it is receiving, it will disable it’s request to send, so the computer’s CTS line indicates “stop sending me stuff!”

    TTL         ESP8266
    ===         ==================
2   RX  <------ TX  GPIO1 (TX)
3   TX  ------> RX  GPIO3 (RX)
5   GND <------ GND GND
7   RTS ------> D1  GPIO5  (CTS)
8   CTS <------ D2  GPIO4  (RTS)
    VCC <------ 3V3 3.3V

This configuration still would not work for my 6551-based RS-232 Pak. I would still need to fake the carrier detect.

Full-wire hookup – as real as it gets

The final, and best, solution is to use an RS-232 to TTL adapter that actually provides all the signals that Zimodem supports and that your RS-232 interface may require. This requires hooking up even more wires (ten total):

    TTL         ESP8266
    ===         ==================
1   DCD <------ D4  GPIO2 (DCD)
2   RX  <------ TX  GPIO1 (TX)
3   TX  ------> RX  GPIO3 (RX)
4   DTR ------> D6  GPIO12 (DTR)
5   GND <------ GND GND
6   DSR <------ D7  GPIO13 (DSR)
7   RTS ------> D1  GPIO5  (CTS)
8   CTS <------ D2  GPIO4  (RTS)
9   RI  <------ D5  GPIO14 (RI)
    VCC <------ 3V3 3.3V

Mine looks like this:

Wiring up a “full” RS-232 to TTL adapter.

If all those wires get to you, you can also do the same thing on a breadboard:

ESP8266 to RS-232 on a breadboard.

Configuring Zimodem: Commodore versus The World

Although the wiring seems complete, there is one final issue that needs to be solved.

Zimodem, when built for the ESP8266, inverts all the RS-232 signals. This is because that is how Commodore computers did it, and Zimodem was designed for Commodore users. Commodore inverts HIGH and LOW from the standard, so all signals have to be inverted in
Zimodem from their defaults. On Commodore, “HIGH” means active. For RS-232, “LOW” means
active.

What this means is even if you have the carrier detect wired up properly, Zimodem is going to send the opposite signal. When a connection is in progress, the signal will read as “no carrier” to a normal RS-232 interface. When Zimodem is ready to receive data, the request to send will look like the opposite.

This causes huge issues :)

If you are using my special build of Zimodem, you can skip this section. I already pre-configure my version as follows.

Fortunately, Zimodem is fully configurable. Using simple “AT” commands, you can change the behavior of any of the incoming or outgoing RS-232 signals that Zimodem uses. All you have to do is be able to send some commands and then save the Zimodem configuration. Here is the summary:

AT S Settings:
==============
0=HIGH is active (defualt).
1=LOW is active.
2=force HIGH
3=force LOW

Sig  SReg Default RS-232 Standard
===  ===  ======= =================
DCD  S46  0       1 (force LOW)
CTS  S48  0       1 (force LOW)
RTS  S50  0       1 (LOW is active)
RI   S52  0       1 (LOW is active)
DTR  S54  0       1 (LOW is active)
DSR  S56  0       1 (LOW is active)

You can set these commands one at a time, like:

ATS46=1
OK
ATS48=1
OK
...etc...

…but you may find that the moment you toggle one of them, you appear to be locked out. This is because the inverted defaults actually work to our advantage. On my interface, I need DCD before I can receive. Zimodem has no carrier, so it is sending out the inverted “there is no carrier” signal, which reads as “carrier detect” for me. The moment I “fix” that so it sends the normal signal, I suddenly have no carrier and can no longer receive data.

You may choose to send all the commands in one line:

ATS46=1S48=1S50=1S52=1S54=1S56=1

However, as soon as that is done, you may not see “OK”. Carrier detect is still flipped… You may be able to still send commands, but you would be typing blind if your interface requires DCD before it will receive. Because of this, I like to force DCD to be always on:

ATS46=3S48=1S50=1S52=1S54=1S56=1

That command flips everything, but makes sure DCD (S46) is forced low (3), so it appears like a carrier is always present. This lets me communicate with Zimodem at all times.

If I were running a BBS that relied on detecting carrier, I would have to leave that at S46=1 and just send commands blindly. (BUT, one of my old terminal programs, Greg-E-Term, is not coded in a way that makes this work. It seems if there is no DCD, it doesn’t let me send anything at all. Other terminal programs I have do not behave this way, so I consider it an issue with what GETerm was designed to do.)

Confusion Conclusion

With all of this said, there are probably still many omissions. A future article needs to be a summary of useful Zimodem commands and tutorials on how to use it.

I also want to cover another alternate approach to having to configure with all those ATS commands. In my case, I simple modified the source code so the version I built had them setup the normal way so I never had to do any configuration.

And I need to document how to just install a binary without using Arduino IDE.

Until then… Comments greatly appreciated.

How to load Zimodem firmware to an ESP8266 without Arduino IDE

Updates:

  • 2018-02-25: Clarification on what ESP devices these instructions are currently limited to, per a comment from James J.
  • 2018-02-26: Added notes about versions for ESP-1, NodeMCU ESP8266-12E, and NodeMCU-32S modules.
  • 2018-02-27: Added link to Espressif tool for Windows that is supposed to do ESP32 modules (and also does ESP8266). If it works, I may update this just to use that one tool for both module types.
  • 2018-03-02: Removed second Windows option until I have confirmed how it works.

Updating ESP8266 / ESP32 Firmware

NOTE: These instructions are currently limited to devices like the NodeMCU ESP8266-12E and the NodeMCU-32S development kits:

An ESP8266 development board, available for under $9 from Amazon. (And much less from China!)

These devices have a built-in USB-to-Serial interface, so they can be plugged up to a Mac/PC over a USB cable for uploading firmware. However, the instructions probably will work with things like the ESP-1 module by using a USB programming device that interfaces it to USB.

ESP-1 module USB programming adapter.

Customized Zimodem firmware for all three of these platforms is now being created.


The excellent Zimodem firmware by Bo Zimmerman turns a low-cost ESP8266 module into a WiFi smart modem. One of the challenges users face is how to get this firmware installed on their module to begin with. I have been providing steps on how to install and configure the Arduino IDE so you can download the Zimodem source, build it, and load it.

But, if you aren’t a developer and don’t really want to go through that many hoops, you can take an existing firmware binary file and just load it directly.

Here are the steps as I know them, for Windows (with a nice GUI), or Mac OS X/Linux (command line).

Customized Zimodem Firmware images

I have a customized version of the Zimodem firmware on my server pre-built for the NodeMCU ESP8266-12E devkit, NodeMCU-32S devkit, and ESP-1 module. Download this firmware image here:

http://subethasoftware.com/files/zimodem/

The versions will be named as follows:

  • zimodem.ino.generic-3.4.bin – for the ESP-1 module.
  • zimodem.ino.nodemcu-3.4.bin – for the NodeMCU ESP8266-12E development kit.
  • zimodem.ino.nodemcu-32s-3.4.bin – for the NodeMCU-32S development kit.

These names are the default names that the Arduino IDE creates, with the version number added.

Windows – ESP8266 NodeMCU Firmware Programmer

Download the NodeMCU flasher program. There is a 32-bit and 64-bit version:

https://github.com/nodemcu/nodemcu-flasher

NOTE: A different utility may be needed for ESP32. There is one that espressif (the ESP chip creator) provides that does both ESP8266 and ESP32. It is a .rar file, and when I downloaded it under Window 10, it ended up as a .man file (?). I had to rename that to .rar, and then find a RAR extractor (I used a free one from the Microsoft store). If you are using an ESP32, you may want to try this:

https://www.espressif.com/en/products/hardware/esp32/resources

Tutorial: http://iot-bits.com/esp32/esp32-flash-download-tool-tutorial/

With your ESP8266 module plugged in (so it appears as a COM: port to Windows), open the NodeMCU flasher program and select that COM port:

On the Advanced tab, uncheck the default internal firmware (that is the option you would use to restore an ESP8266 module back to factory firmware), and browse to the new firmware in the second line. Checkbox that line, and set the start address to 0x0000.

ESP8266 Flasher for Windows – Config tab, for specifying the new firmware to load.

You might also go to the Advanced tab and increase the baud rate if you want the update to go faster. Once the binary file and COM port have been specified, return to the Operation tab and click Flash to begin the upload to the ESP8266.

ESP8266 Flasher for Windows – Operation tab, flashing in progress.

…and when complete…

ESP8266 Flasher for Windows – Operation tab, flashing complete.

You can now restart the ESP8266 module and it should be using the new firmware.

Windows – ESP8266/ESP32 Espressif Flash Download Tools V3.6.3

I have tested this tool on ESP8266, but not on ESP32 yet. I will update this section when I do. It requires more steps to install and setup, but may be what we have to use for ESP32. Running it offers four different parts it can flash:

Espressif Flash Download Tools V3.6.3 for ESP8266 and ESP32

I will update this tutorial when I have confirmed how to use this.

Mac and Linux – esptool

Install esptool (a Python script) and pySerial (a Python library for talking to the serial port):

easy_install esptool
easy_install pyserial

NOTE: I think I hadto run this as super user, “sudo easy_install esptool”.

Identify the serial port connected to the ESP module. This can be done from a shell (Linux) or the Terminal (Mac). On Mac, can look for devices that begin with “cu”:

alsmbpro:temp allenh$ ls /dev/cu*
/dev/cu.Bluetooth-Incoming-Port /dev/cu.HC-05A-DevB /dev/cu.SLAB_USBtoUART

If you do not know what to look for, you could do this command before plugging in the ESP8266, then again after you plug it in and see what appears. (On my system, I know I installed Silicon Labs drivers, so I recognized the “SLAB” name.)

On Linux, I think you need to do ls /dev/ttyS*. (I also saw an exemple using “setserial -g /dev/ttyS[0123]”).

Now that you know what serial port is connected to the ESP module,  run esptool.py specifying that port, and the firmware image to use. On my system:

esptool.py -p /dev/cu.SLAB_USBtoUART --baud 460800 write_flash --flash_size=detect 0 zimodem.ino.nodemcu-3.4.bin

If it works, you should see something like this:

prompt$ esptool.py -p /dev/cu.SLAB_USBtoUART --baud 460800 write_flash --flash_size=detect 0 zimodem.ino.nodemcu-3.4.bin
esptool.py v2.2.1
Connecting........_
Detecting chip type... ESP8266
Chip is ESP8266EX
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 344528 bytes to 247587...
Wrote 344528 bytes (247587 compressed) at 0x00000000 in 5.8 seconds (effective 472.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting...

You can now restart the ESP8266 module and it should be using the new firmware.

Over-the-Air Updates

Once you have this special build of the firmware, you will be able to do over-the-air updates. Make sure you configure your Zimodem for your WiFi network by going through the:

AT+CONFIG

You can then use the command “AT&U” to see what the current version is. Bo is currently working on 3.4.

In stock Zimodem, firmware updates pull from Bo’s website for the two boards he support (the ESP-1, I think, and some flavor of ESP32). For my customized “CoCoWiFi” version, it will pull special builds from my website instead, and there are three different boards supported.

As I build new versions of this customized Zimodem firmware, I will place them on my server and you can type (from the Zimodem command mode):

AT&U=3.4

That will get whatever version I have available. You should not need to do any more USB updates, unless something goes horribly wrong, or you want to go back to stock NodeMCU firmware.

Please let me know if this works for you.