This page accompanies an article by Martin Ewing AA6E "A Software-Based Remote Receiver Solution" published in QEX for January/February 2014, pp 3-6. A draft version of this article is available as http://aa6e.net/doc/qex_2014_01_rrx.pdf. The "official" files for this article can be found at http://www.arrl.org/qexfiles.
The files accompanying the article are also available in a zip archive here:
- Initial distribution: http://aa6e.net/files/rrx_distrib_2013_02_21.zip (17 MB)
- Update for better compilation of afxmit/afrecv: http://aa6e.net/files/update20140108.zip (20 kB) Some default settings in the initial distribution of the C programs did not compile correctly with the latest gcc distributions. This update supplies some new files that replace files in the initial distribution to ensure proper compilation.
Compiling afrecv.cpp under Windows is rather complicated, especially for people used to working in the Linux system. This section will supply some tips for this process.
- XAudio2 Requirements: We are using the XAudio2 Windows API. This is part of the DirectX system, which is not present on most Windows computers. For compilation of afrecv.cpp, you need to download the DirectX SDK (Software Development Kit). I used the "June 2010" version, which is available at Microsoft DirectX Download. If you do not wish to compile, you may be able to use a pre-compiled exe file (to be supplied), but you will still need to install the DirectX runtime support.
- Known Problems:
- remote.py termination error. In some Windows installations, remote.py fails when the user quits the program. This is annoying, but harmless. You just click through the error reporting dialogs. The bug seems to have shown up with wxPython 3.0.
Using Raspberry Pi or Multiple Sound Cards
(Added 5/28/14) The Raspberry Pi has a built-in output-only "sound card" that is normally loaded as the default (card 0) device. When you use an add-on USB sound card, it will appear as card 1. The problem is that afxmit.c requires the audio input device to be the default (card 0), which obviously won't work for the standard Pi setup. Solution:
cd /etc/modprobe.d sudo vi alsa-base.conf # or other text editor
options snd-usb-audio index=-2
#options snd-usb-audio index=-2
Save and reboot. You can use alsamixer (and F6 key) to verify that your audio input soundcard is now card 0.
Similar changes to alsa-base.conf may be necessary if you have multiple soundcards on any platform. A future version of afxmit.c may permit selecting different sound cards at run time.
afrecv in a Linux Virtual Machine under Windows
If you are a "Linux person" with a Windows-based station PC, you may want to avoid the hassles of Windows compilation. If so, you might look at VirtualBox, which will allow you to run a full Linux system alongside your Windows desktop. The virtual OS approach does require a lot of resources (~300+ MB RAM, 2+ GB disk, and CPU), but current-generation PCs often have enough surplus capacity to handle a virtual Linux along with Windows.
Check back on this page for latest news and updates. You may also wish to consult our preliminary Wiki page about this project, including installation instructions, at W1HQ remote.
Possibilities for Future Development
These are some areas for improvements that may or may not happen some day.
- Diagnostics Capability. Sound setup is often a frustrating problem. Some audio-related diagnostics would be helpful:
- afxmit: Optional numeric dump of audio samples to verify succesful sound card setup.
- afxmit: Optional test signal injected in place of audio input samples, e.g. 1 kHz squarewave.
- afrecv: Optional numeric dump of received audio samples.
- Alternative codecs, e.g., Opus.
- Reimplement afrecv and remote.py as an integrated Python program using PyAudio, esp. if this would work in Windows. Avoid the need for Windows C compilation.
Your suggestions welcome!