Digimorse
Mixing Morse code and error control coding for extreme weak-signal, noise-free QSOs. In active development, studying error control coding, digital signal processing, rust.
Install / Use
/learn @devzendo/DigimorseREADME
digimorse
What is this?
Morse code was the first means by which messages were sent by Marconi, as he performed his experiments in the 1890's. This was achieved using a crude spark gap transmitter. In 1913, Edwin Armstrong and Alexander Meissner used thermionic valves to build a continuous wave oscillator which refined the transmission mechanism. This form of transmission, known by the acronym CW, was widely used for military, maritime and commercial telegraphy, gradually being replaced by more modern systems of communication. Its last maritime use was in 1999.
It is still, however, used widely by amateur radio operators, such as myself. Although the electronic circuits used have been refined as far as they can be, the essential continuous wave transmission mechanism has remained unchanged.
This project is an attempt to modernise that.
Project Status
Project started September 2020. Currently in its early development / feasibility study phase.
Currently in May 2024, I'm working on the receiver, taking audio input and running it through a Fast Fourier Transform to obtain the incoming frequency spectrum. I've completed the last part of the transmit chain of major system components, specifically the modulation of channel symbols using Gaussian Frequency Shift Keying. The transmit chain from the Arduino-based Morse key interface, keyer protocol decoder, sidetone generator, source encoder and channel encoder (using a CRC and low-density parity-check (LDPC) code) are all done.
After this, I'll need to modify the transmitter to permit output to a .WAV file, for use in testing the receiver chain.
There's no graphical user interface at the moment - the system is configured and used via a command line interface. After the transmitter is complete, and can be used from the command line, I'll make a start on the GUI and receiver chain.
I'm also porting it from its original macOS development system to run on Ubuntu. It should also run on Windows.
Overview
This is an EXPERIMENT in taking Morse code, in real-time, encoding it, wrapping it in modern error-detection/correction codes, and modulating it out to a connected amateur radio transceiver as a narrow-bandwidth signal.
The intention is to take our historic mode of communication, and be able to receive it and decode it (with your brain) whilst removing the effects of natural or man-made interference and fading. The operator will be able to visualise all the transmissions in a waterfall display, making it easy to see and select transmissions of interest. There will be the facility to filter out some or all stations so you can hone in on the one you want - and reply to it in digitally encoded Morse. By adding error correction, and carefully designing the encoding and modulation, it is hoped that the weak signal characteristic enjoyed by users of FT8, JT9 etc. can be added to Morse.
What digimorse is not:
- Computer-generated or computer-decoded Morse. It doesn't decode the Morse for you. That's cheating! It is a beautiful skill to master, like a language or musical instrument; mastering Morse is a fine human achievement. digimorse seeks to add another dimension to it!
- The death of CW or Amateur Radio As We Know It(tm). You don't have to use it!
- Completely automated, just macro-key-pressing. No, you use your normal Morse key or paddle. Macros will come later perhaps.
- Quantized. If you have a unique rhythm to your keying, digimorse won't correct it. The timing of your keying goes out verbatim. You can use our keyer with a paddle which will give good timing (later).
There are arguments that adding a keyboard entry facility (instead of key/paddle) and an auto-decoder (instead of human decode) might be warranted: in the case of disabilities. I'm happy to discuss these and maybe implement them; they're not my current priority.
What you'll find different to usual CW:
- No noise! QRN, QRM, QSB, gone!
- When you start keying, digimorse encodes your callsign and locator automatically, digitally. Receiving stations will see who and where you are on the waterfall display. Your encoded Morse is sent along with this - so receivers won't hear your keying as soon as you start. There are short delays.
- When you stop keying, digimorse may not have finished encoding and transmitting. The screen will show you how much longer your transmission will actually take.
- So there's not a rapid-fire switching of conversation.
What do I need to try it?
- A fairly modern computer running Windows 10, macOS 10.15ish (High Sierra to Big Sur), or Ubuntu 16.xx LTS, 18.xx LTS, 20.xx LTS.
- Sorry no Raspberry Pi yet - definitely considering a build for this.
- An interface between the computer sound system and your amateur radio transceiver, e.g. Tigertronics SignaLink USB.
- Monitor, keyboard, mouse.
- An interface between your Morse key or paddle and USB. See the https://github.com/devzendo/digimorse-arduino-keyer project for a simple Arduino Nano-based Morse key/paddle <-> USB Serial interface and simple keyer.
Downloads
There aren't any yet. There will be for the first release, but that won't be any time soon. You'd have to install build tools and build it yourself...
Roadmap
First release:
- Reads keyer output, measures timings, source-encodes these, and mixes with callsign and locator information, adds error detection/correction with a low-density parity check code, modulates using ??? and Gaussian Frequency Shift Keying to prevent hard phase transitions resulting in splatter.
- Can choose your transmit offset within the 2500Hz bandwidth shown.
- Waterfall shows all signals in received bandwidth, and their decoded callsign/locator information.
- Select a signal, or click-drag-release over a portion of the display to apply a filter so that only the chosen signals are played.
Second release:
- Who knows?
Release Notes
0.0.1 First Release (work in progress)
- Created repository! Wrote the above... made notes... learning about information theory, error control coding, modulation/demodulation, the Fourier transform, the Rust programming language, the FLTK and PortAudio frameworks for GUI and audio, built the Arduino keyer.
Configuring and running Digimorse
The GUI is not present yet; all configuration needs to be done via the command line. To run Digimorse, use the terminal or Command Prompt, and run the 'digimorse' program. There are several options and modes in which you can run the software. Add the '--help' option to the command line to show the full details.
Before Digimorse can be used, several devices need setting in its configuration.
You will need to configure your audio output device (for speakers or headphone) so you can hear the decoded Morse, and your sidetone when keying.
You will need to configure your transceiver audio output and input devices so Digimorse can receive and transmit encoded Morse.
To discover the names of the audio devices currently available on your system, use the ListAudioDevices mode:
$ digimorse ListAudioDevices
[2021-09-17T07:49:11Z INFO digimorse] Number of audio devices = 4
[2021-09-17T07:49:11Z INFO digimorse] 0: "Built-in Microphone" / IN:2 OUT:0 @ 96000Hz default; 48000Hz supported
[2021-09-17T07:49:11Z INFO digimorse] 1: "Built-in Output" / IN:0 OUT:2 @ 44100Hz default; 48000Hz supported
[2021-09-17T07:49:11Z INFO digimorse] 2: "USB AUDIO CODEC" / IN:0 OUT:2 @ 48000Hz default; 48000Hz supported
[2021-09-17T07:49:11Z INFO digimorse] 3: "USB AUDIO CODEC" / IN:2 OUT:0 @ 48000Hz default; 48000Hz supported
Please take care with the device names. Note in the above output, my transceiver is shown as "USB AUDIO CODEC" - and has two spaces between AUDIO and CODEC. You must copy-and-paste these names precisely when setting the devices, as shown below...
Now, set the appropriate devices. This is a one-off operation, you don't need to do it every time Digimorse runs - the settings you make here are saved in the software's configuration file. The following command should be given on one line; it is split for display in this guide:
$ digimorse --audioout "Built-in Output" --rigaudioout "USB AUDIO CODEC" --rigaudioin "USB AUDIO CODEC"
--keyer /dev/tty.usbserial-1420
[2021-09-17T07:50:13Z INFO digimorse] Setting audio output device to 'Built-in Output'
[2021-09-17T07:50:13Z INFO digimorse] Setting rig output device to 'USB AUDIO CODEC'
[2021-09-17T07:50:13Z INFO digimorse] Setting audio input device to 'USB AUDIO CODEC'
[2021-09-17T07:50:13Z INFO digimorse] Audio output device is 'Built-in Output'
[2021-09-17T07:50:13Z INFO digimorse] Rig output device is 'USB AUDIO CODEC'
[2021-09-17T07:50:13Z INFO digimorse] Rig input device is 'USB AUDIO CODEC'
[2021-09-17T07:50:13Z WARN digimorse] No keyer serial port device has been configured; use the -k or --keyer options
Ok, now we have the audio devices set, we need to tell Digimorse which device the keyer is connected to. Currently there's no easy way to show which device this is. Basically, plug it in, and:
- On Windows, look in Device Manager under COM and LPT ports, to see what's new.
- On macOS, in a terminal, ls -l /dev/tty.usbserial* and choose the device file you see there.
Configuration File
- macOS: /Users/<your username>/Library/ApplicationData/digimorse/digimorse.toml
- Linux: /home/<your username>/.digimorse/digimorse.toml
- Windows: C:\Users<your username>\AppData\Roaming\digimorse.toml
Development
Current activities
For information on current development activities, please see the TODO file file.
Technology
All development is in Rust, which is a new, difficult, but interesting language. It would be easier in C++, and quicker - but probably less provably correct, and portability would be painful.
Source directory structure
The source is split into the following directories:
src/lib.rs - main body of code split into various modules.
src/d
