Monday, January 12, 2015

Operating the Arduino Enigma Machine via Serial Port

This guide shows how to operate the Arduino Enigma Machine from a computer via serial port. The following instructions can be followed with the touchscreen simulator or with the arduino sketch provided in the post titled Source Code for implementation of Arduino Enigma Algorithm thru Serial Port.

To start, find the Arduino logo on the desktop and double click it.
With no Arduinos plugged in, the list of existing serial ports are shown,
After an Arduino is connected to the computer, Windows will automatically install the USB driver and assign it a serial port. Click on Tools->Port and select the new serial port.

WARNING: From here, you can upload a blank sketch to your simulator if you click the right facing arrow next to the checkmark.

If this happens to you, don't worry, simply contact us at the gmail address shown on the Contact section on the right panel.

You will receive an installer to restore the firmware for the latest enigma program on your machine.

Once the right serial port is selected, press Ctrl+Shift+M or click on Tools->Serial Monitor

Ensure the baud rate on the lower hand right corner is set to 9600.

By default, the machine is set to verbose mode, where the actual rotor wiring and internal path is shown. The rotor types can be seen in the LCD with the machine open. The word TEST was typed. It encodes to EWVY.
To change the machine from Verbose to Encode, first open it by clicking on the Enigma Logo.
Once the machine is open, the reflector, rotor types, ring settings and machine configuration options can be changed.

Touch "SERIAL:" until it changes to "C"

The machine will now accept text to encode thru the serial port. The other options are NO, for no operation and V, for verbose.

The printer groups will affect how many characters are grouped together in the paper tape running above the lamp field as well as the characters returned through the serial port. The machine will now print four (4) characters, then a space.
Once the desired configuration is set, touch the words "CLOSE" or the handle on the upper left hand corner to close the machine.

These are just the steps needed to change the serial port operation.

To see how to change all the settings of the machine, please consult the users guide.
The settings for this example are:
Reflector C Thin
Greek Rotor Beta
Rotors 2,1,3
Plugs BL EZ IU JO MV PX RW.

To set the starting rotor position to ABGI, send !abgi. If a three rotor machine was selected, the rotors would be set to ABG and I would be encoded.Uppercase and lowercase are treated the same.
To encode something, type in the upper text box and click "Send".

The word "TEST" is going to be sent for encoding
Test was encoded to EWVY as shown at the bottom of the screen.

Next the words "OF THE ENIGMA MACHINE SIMULATOR" are going to be sent for encoding. Lower-case and upper-case characters are treated the same, any characters not in the Enigma Machine keyboard like numbers, symbols, space, are ignored.
The rest of the phrase was encoded and every four (4) characters, a space was inserted. Any additional characters be added to the current line.

We are now going to change the wheel positions back to ABGI by sending !abgi
When the wheel position is set with the ! command, a new line will be started. The string "TEST OF THE ENIGMA MACHINE SIMULATOR" was sent in one line. The result matches the line above where the phrase was sent in two parts.








Using the serial port, a division of duties can be established. If physical access to the machine is controlled, the person working through the serial port has operator access, where the wheels can be set and characters encoded, but internal settings cannot be changed. The person(s) that have physical access to the machine have officer access where all the settings can be changed.

1 comment:


  1. There are inconsistencies in the example above. First, you show an Arduino screenshot of:

    Reflector C Thin
    Greek Rotor Beta
    Rotors 7,8,6

    But the text says settings for this example are:
    Reflector C Thin
    Greek Rotor Beta
    Rotors 2,1,3 <-- DIFFERENT!!!
    Plugs BL EZ IU JO MV PX RW

    So when I set up for this, then send !abgi from the serial port to set the wheel positions, see my Enigma wheels go to "ABGI", and then type 'text' I get "EXYS" and not "EWVY".

    ReplyDelete