All Is Revealed

Here's the long-awaited page that describes how the web-controlled shortwave radio is made to work. [Alot of this is wrong now--ed.]

System Components

Hardware

The server hardware is an Intel-x86 computer equiped with a Creative Labs Soundblaster card for digitizing radio audio [like that--the sound hardware is built into the system board] and a serial port for controlling the Drake radio.

System Software

The server host runs version 1.0 of NetBSD, a freely available Unix based on the University of California, Berkeley Unix [actually it's OpenBSD 3.5]. Web services at my site are provided by the CERN HTTP daemon [nope, it's Apache now.]

Network

Access to the Internet is by a full-time dial-up connection. I use a pair of v.34 modems and the PPP implementation that is included in NetBSD. It's not really fast enough for this sort of thing but Bell Atlantic's by-the-minute pricing of their ISDN service means, for now, it's going to have to do. [Wrong, all wrong. Cable modem "small business service.]"

How It Works

Main Status Page

The main radio status page is generated by a CGI script that queries the radio for current frequency and mode information and produces HTML. At this point, there's no attempt to be radio- independent so the scripts writes R8-specific commands directly to the receiver. [ View this script.]

Because of the rather stringent timing and flow-control requirements of the R8 unit, I had to write a small C program to act as an interface to the radio. [View this program.]

The current frequency returned by the radio goes directly into the HTML produced by the status page script. The radio's reply to the mode query command is a bit-mapped binary quantity. A C program, ``decode_mode'', translates this quantity into a list of substitue commands for use with the Unix sed editor. [View this program.]

Tuning Control

The tuning controls form is processed by a Bourn shell script that assembles an R8 command and sends it to the radio via the radio interface program. [ View this script.] It is assisted in this by another C program, ``encode_freq'', which translates the frequency as typed into the form into an R8 frequency command. [ View this program.]

Live Audio

The ``live-audio'' links run simple CGI scripts which calls a C program to build a ``.au'' file and write it to standard output. [View the live-audio script. View the C program, ``net_audio''.]

The net_audio program connects to a socket served by another C program, ``audiod'', which reads from the system audio device and writes to the socket. This is necessary to allow more than one remote user to get audio from the radio at once. [View this program.]

Work In Progress

Compressed Audio

The compressed audio link on the main radio status page sends a 30-second wave file (.wav extension) which contains a GSM 6.10 encoded ``chunk.'' The .wav file is produced using a conversion program based on Jutta Degener's GSM compression library. [ View the conversion program, ``makewave''.]

Scheduled Recording

The scheduled recording pages work but the logic for locking the dial during a recording isn't in place yet, so you might not get everything you schedule...


Go to shortwave radio