Notes on Soundmodem

From HacDC Wiki

Revision as of 10:44, 4 March 2011 by Drwho (talk | contribs)

Soundmodem essentially emulates a hardware modulator/demodulator in software, vis a vis a daemon running in userspace.

v0.15 is the latest, I recommend using that. v0.14 requires libxml, which I don't think anybody makes available anymore. libxml2 is used for storing the config file in /etc/ax25.


Configure it by running (as root) /usr/local/bin/soundmodemconfig. It will open a window on your desktop with nothing in it. Click File, New, Configuration. Give your configuration a name (I used 'default').


IO Tab

On the I/O tab, choose your sound driver (out of soundcard, file, simulation, and alsa, I picked alsa). You'll have to play around with the value of the ALSA Audio Driver field to get one that works. On Windbringer, I used plughw:0,0. Check half duplex for now. Leave the Capture Channel field set to 'mono'. I don't know what to set the PTT Driver field to yet, so I left it on 'none'.

It's possible that we'll have to develop some sort of serial or USB push-to-talk interface for the comm system.

Channel Access Tab

Don't change the settings on the Channel Access tab.

Channel 0

Right below the name of your configuration in the tree you will see a new entry, Channel 0. If you select it you'll be presented with three new tabs on the right.

Modulator Tab

The possible values for the Mode selector are Off, fsk, afsk, pam, psk, and newqpsk. I picked afsk because the Xastir wiki told me so. I left the values for Bits, Frequency 0, and Frequency 1 set to 1200, but we can play with that later. Leave Differential Encoding checked.

Demodulator Tab

On the Demodulator tab (which governs decoding audio signals into bits) the options are much the same, save that the Mode selector has an extra option (p3d). Leave everything else the same for now.

Packet IO Tab

On the Packet IO tab, the network/non-serial side of soundmodem is configured. Pick an IP address, netmask, and broadcast addres for a network interface (hint: stick with RFC 1918 for now). There are two options in the Mode selector, KISS and MKISS. I went with the default (MKISS).


When running the soundmodem utility (soundmodem /etc/ax25/default.conf &), the daemon configures the sound card to send and receive bitstreams encoded as audio through the jacks in the soundcard. On the network side of the house, it allocates a virtual network interface (sm0) which has a callsign associated with it (relevant for ham radio, not so much for other applications) as well as an IP address, network mask, and broadcast address. The idea is that whatever packets are sent through that network interface will be transparently converted into sound and transmitted using whatever device is connected to the headphone and microphone jacks of the computer. Conversely, any data received by the broadcast device (ham radio, laser, etc) is demodulated into bits, encapsulated into network frames, and made available to the OS.

In theory, it's just like a point-to-point IP link, only instead of ethernet you're using a nebulously defined network technology. You should then be able to send and receive packets over this link just like you would on a LAN.

Diagnostics, Testing, and Configuration

Here's where you debug your configuration. It's going to take some flipping back and forth between tabs.

You really should run soundmodemconfig from a terminal, because if you got something wrong (like the audio device) it'll be printed to stderr. It doesn't show up in a window.

The Diagnostics menu only appears when you have a channel (Channel 0) highlighted.

The first option is Scope, for oscilloscope. To get a test signal, click the PTT button (make sure your speakers are turned down!)

The second option is Spectrum, for spectrum analyzer of the signal being send to the sound card. To get a test signal, click the PTT button (again, make sure your speakers are turned down!)

The third option, Modem, dumps the raw bitstreams that your soundcard-emulating-a-modem is sending and receiving. Seeing strings of bits (even when disconnected) means that you have probably configured soundmodem correctly.

I do not know what the AO40-P3D option does.

To save your config file, use the File, Quit option. It'l do it automagically to /etc/ax25/soundmodem.conf.