Using Websdr with Ubuntu, Jack, PulseAudio and Fldigi to Demodulate Digital Signals
This "How To" is written for Ubuntu 10.10 (Maverick Meerkat), and
it explains how to use PulseAudio, Jack Audio Connection Kit, Firefox
with Sun Java 6, and Fldigi to decode digital modes received from a Websdr server.
Get Sun Java6 and PulseAudio Playing Together
The first thing to do is to get Sun Java 6 to work with PusleAudio.
1) Enable third party repositories, and install the following packages:
sudo apt-get install sun-java6-plugin sun-java6-jre sun-java6-bin openjdk-6-jre pavucontrol fldigi libportaudi
2) Copy some libraries from openjdk-6-jre to sun-java-6:
sudo cp /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libpulse-java.so /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/i386/
sudo cp /usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/ext/
3) Move the libjsoundalsa.so to a backup position:
sudo mv /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/i386/libjsoundalsa.so /usr/lib/jvm/java-6-sun-1.6.0.22/jre/lib/i386/libjsoundalsa.so.bak
4) Edit /etc/java-6-sun/sound.properties to add the
following four lines:
javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
5) Shut down Firefox or any other Java applications. Re-start them
along with the Pulse Audio Volume Control (pavucontrol), and make
sure sound works by going to a Websdr server
and listening.
You may have to open pavucontrol (Applications->Sound &
Video->PulseAudio Volume Control), and go to the playback tab and
select the right output for
the Java Audio Stream (Websdr) that is running, and sometimes the mute
buttons need to be unmuted.
Using Jack Audio Connection Kit (Optional)
1) First if you are still listening to Websdr, close that tab in
Firefox, go to a terminal and install the Jack packages.
sudo apt-get install jackd2 pulseaudio-module-jack qjackctl
2) Start Jack from Applications->Sound & Video->Audio
Production->Jack Control, and press the play button (green triangle). (You may
need to make changes in the Setup window as well, depending on your hardware.)
3) From the terminal, load the pulse modules for Jack.
pactl load-module module-jack-sink
pactl load-module module-jack-source
4) Open a Websdr page in Firefox.
5) Open the Connection Panel of Jack Control.
6) Open the PulseAudio Volume Control and see the Jack sinks and
sources in the Record and Playback tabs.
Fldigi (Optional if all you want to do is listen to a Websdr server)
Start Fldigi from the Applications->Hamradio menu. Go to the Configure-Sound
Card menu item. Select the Capture device as either Pulse or
Portaudio as you desire. Check to see if the waterfall is showing
audio coming in. Tune with Firefox to the frequency you wish to
listen and select in Fldigi the mode you want to listen to and watch
the text scroll across the screen. More help for Fldigi is available in the Help and PDF files on the Fldigi download page.
The results look like my screen below:
You can use this method with Fldigi to report spots
and run your own robotic radio, even without any radio hardware of your
own. You can find out more about the server setup at K7UEB here. If you wish to build your own receiver to use on your computer locally, Tony Parks, KB9YIG sells wonderful little inexpensive Softrock kits.
With one of these, a good sound card, an antenna, and your computer,
you have your own robotic radio receiver to spot stations from your
location.