Software defined radio using Jack audio connection kit.
Fifth redesign in progress, see Notes/revision-2014-01-04.org for the latest plan.
This is a kit for building software defined radios on linux which uses:
- the jack audio construction kit
- the tool command language
- the UI toolkit based on tcl
I’ve written these instructions as I use them on a laptop running Ubuntu 18.04. Most of it is generic enough to work on other current Linux systems with minor translations of package management tools and package names. It’s also generic enough to port to MacOS or Windows. But I don’t run other Linux systems, MacOS, or Windows so asking me to help you make it work may be a lost cause.
I will be assuming that you have installed the keyer sources in your home directory, which I abbreviate as “~”. So I will refer to the keyer source directory as “~/keyer” in all that follows. At the moment it depends on being there and parts of the package won’t work correctly if installed elsewhere.
Using your preferred Ubuntu package manager, you want to install the following packages:
These are not all the required packages. Several other packages will be dragged in because they’re required by the packages listed.
The “apt-get” command to install these packages is
sudo apt-get install build-essential git-core libasound2-dev jackd2 gladish libfftw3-dev libjack-jackd2-dev tk8.6-dev tcllib tklib tcl-udp libusb-1.0-0-dev
Getting the source
The sources are archived at https://github.com/recri/keyer. Assuming that you installed the git packages and want the sources to be in ~/keyer,
cd ~ && git clone https://github.com/recri/keyer
will create a new directory named “keyer” in your home directory. The sources will be up to date as of the time that you clone the repository.
cd ~/keyer && git pull origin master
will refresh your sources to the most recent at any time. It’s prudent to run:
cd ~/keyer && make all-clean
before refreshing the sources because the list of things to be built and cleaned up is changing all the time.
If things get messed up (and you have no local changes to preserve) you can always:
cd ~ && rm -fr keyer && git clone https://github.com/recri/keyer
to start over again from a clean copy.
cd ~/keyer && make
will compile everything needed to run. If you have problems, please go back to the list of required packages and make sure you didn’t miss one.
cd ~/keyer && make clean
will remove intermediate files not required to run.
cd ~/keyer && make all-clean
should remove all built files.
I don’t do any install. I usually run the scripts from ~/keyer manually prefixing bin/ to get the commands I want to run.
MidiKey hardware interface
The whole point is to get CW keying information into the computer with the lowest latency possible. To do that you’ll need a MIDI-USB-Keyer dongle to hookup your straight key or paddle.
I started with a paddle interface built on a breadboard from a Teensy 2.0 (from http://www.pjrc.com/teensy/), a stereo audio jack, and three jumper wires.
The Teensyduino application to translate paddle transitions into MIDI events is in MidiKey/MidiKey.ino. The instructions for building it are in the source code.
I’ve packaged the keyer dongle into an Altoids Smalls tin, shown in the tin, and exposed. The perf board is supported on 5/8” standoffs of the bottom of the tin. The Teensy is mounted on upside down header pins, short end through the perf board long end through the Teensy mounting holes. The Teensy and stereo jack are super glued onto the perf board. The stereo jack lugs are soldered to a set of five header pins. The rest of the connections are wire-wrapped between long legs of header pins.
The set of 11 pins at the left edge of the exposed image is a Sparkfun Blackberry trackball breakout which is unsupported in the software at the moment. You can see the trackball erupting through the tin.
In retrospect, I’d switch to using input pins closer to the stereo jack end of the Teensy.
Glen Overby provoked this project on the dttsp list at yahoo back in November 2011. He has built another MIDI key interface which is described here. It should work with this software if the MIDI note is set properly.
|Teensy B0||->||stereo jack dit|
|Teensy B1||->||stereo jack dah|
|Teensy GND||->||stereo jack common|
|Iambic paddle||->||stereo jack|
The usages are in flux.
MidiKey - Teesyduino application
The necessary steps should be listed in the comment at the head of MidiKey/MidiKey.ino.
Don’t forget to install the /etc/udev/rules.d rules file for the Teensy.
More details, too much information
I threw a bunch of stuff out of this README so it would be less of a mess. They’re all in the Notes directory of the project, and if you navigate there in the github web interface then github will open files and mark them down for you. This README and all the files in the Notes directory are written in org-mode using emacs, an outline mode. The github markdown processor does a good job of converting them to web pages, but some things get lost or mangled in the translation, like internal links.
This code is derived from many sources.
The largest debt is to the dttsp sources, Copyright (C) 2004, 2005, 2006, 2007, 2008 by Frank Brickle, AB2KT and Bob McGwier, N4HY. Many of the modules here are directly or indirectly derived from their code.
Perry Cook’s Synthesis Toolkit provided one worked example of how to make adjustments to DSP components on the fly.
Faust, http://faust.grame.fr/, is a really neat idea, dsp computations described as an algebra on infinite streams of samples. It also provided an example of how not to make adjustments to DSP components on the fly.
Copyright (C) 2011-2014 by Roger E Critchlow Jr, Santa Fe, NM, USA. Copyright (C) 2018 by Roger E Critchlow Jr, Charlestown, MA, USA.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA