fldigi working - HAM Radio


9 posts
by flask28 » Mon Oct 29, 2012 9:27 am
After a bunch of messing around I finally got the ham radio digital mode application fldigi working on my Pi. I'm running the rev b board and the latest greatest firmware/wheezy updates.

For a soundcard I used a USB Signalink I had sitting here. The nice part about a signalink is it handles PTT for me and presents as a usb soundcard to the Pi. But I'm sure you could use a cheap usb soundcard and a ptt-type cable (or vox even) to do the same thing and much of this should apply.

I've never played with linux sound before, so I apologize if I sound stupid. Don't need sound on servers! So this is my first time mucking about with ALSA.

When I plugged in the signalink I saw it was discovered and watched some drivers get loaded on the console. I was pretty excited about that right there.

The command "aplay -l" showed me:

Code: Select all
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0


Card 0 is the internal soundcard, and Card 1 is my signalink. A good sign! This is telling me the signalink has registered with ALSA as an output device. Cool, let's check for an input device.

The output of 'arecord -l" showed:

Code: Select all
**** List of CAPTURE Hardware Devices ****
card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0


And "cat /proc/asound/cards" output:

Code: Select all
  0 [ALSA           ]: BRCM bcm2835 ALSbcm2835 ALSA - bcm2835 ALSA
                      bcm2835 ALSA
 1 [CODEC          ]: USB-Audio - USB Audio CODEC
                      Burr-Brown from TI USB Audio CODEC at usb-bcm2708_usb-1.3, full speed


So far so good. The internal soundcard does not have a capture device, so just card 1 is showing up. The program 'alsamixer' is showing both cards, and I can select between them. I don't see a capture device in alsamixer though, and that's freaking me out. Turns out I got it working and never had the capture device show in alsamixer so that was no biggie.

The fldigi package didn't fire up for me, I'm not sure why, so I ended up compiling it from source. I had to add a bunch of packages as you'd expect but finally it compiled and worked. If the package loads for you I'm jealous. But once I got it loaded, I saw I couldn't select any devices in the soundcard config.

After reading the fldigi linux recommendations I figured using the portaudio library on top of ALSA was the way to go. So I installed the portaudio packages and recompiled fldigi with portaudio support (your working package probably has this already). I fired up fldigi and could suddenly select port audio devices - and my signalink was in there as the USB Audio CODEC as a playback and capture device. YES!!

But it didn't work. I wasn't getting any signal in fldigi, no waterfall. The capture wasn't working.

I tried a million things, but I think I know what fixed it. I added the singalink explicitly as a device listed in /etc/asound.conf. Here's what my asound.conf file looks like:

Code: Select all
pcm.mmap0 {
type mmap_emul;
slave {
pcm "hw:0,0";
}
}

pcm.slink {
type hw;
slave {
pcm "hw:1,0";
}
}

pcm.!default {
type plug;
slave {
pcm mmap0;
}
}

As soon as I did that I had a working waterfall in fldigi. I did a quick tx test and PTT got triggered. I need to make a contact with someone local here to be sure (I am using a vhf radio for this atm) but it's looking pretty good so far.

Since a soundcard is a soundcard, I bet this will work for the cheapie usb soundcards too. I have a few of those I'm going to try next - not that I have a cable to connect it to my radio yet. Well, next is AX25 and soundmodem. I have my KPC3+ connected via the GPIO and console access works fine, but I have not set it up as a native KISS AX25 device for ARPX or the like. I'd like to see if I can go without a TNC. That would be nice.
Posts: 5
Joined: Wed Oct 17, 2012 8:06 am
by andytuk » Tue Oct 30, 2012 2:39 pm
This is on my list of things to try on my Pi - thanks for the info.

I will be using my homebrew interface to my Yaesu FT-847.

Andy(2E0GPU)
Posts: 34
Joined: Sun Mar 11, 2012 12:04 am
by boyo » Thu Nov 01, 2012 4:20 am
This post is what I have been looking for, and has single handedly moved the raspberry pi to the top of my Christmas list.
Posts: 1
Joined: Thu Nov 01, 2012 4:18 am
by flask28 » Fri Nov 02, 2012 9:38 pm
One other configuration tip.

I had problems triggering the transmit through FLDIGI until I added an an environment variable. Be sure to set:

PA_ALSA_PLUGHW=1
Posts: 5
Joined: Wed Oct 17, 2012 8:06 am
by g1rnz » Thu Nov 15, 2012 1:49 pm
Hi I got fldigi to install without issue on my rev b R-pi and am using a signalink usb interface. The problem is that it seems to use full cpu and will not anything. Has anyone success in decoding psk-31.
Posts: 1
Joined: Thu Nov 15, 2012 1:39 pm
by flask28 » Thu Nov 22, 2012 8:21 pm
Yep, I had the same problem decoding, fldigi is super cpu-intensive.

I finally got it decoding psk31 with a hefty overclock (default turbo settings) but that overclock corrupts the SD card pretty quickly, I never got more than a few psk contacts before I saw the SD write errors start popping up.

So now I'm trying to find an OC that the RPi can cope with and hopefully that'll be enough for fldigi.

FYI, soundmodem worked much better with the OC as well. My packet decode rates seemed to improve dramatically. I think the RPi might be just a little underpowered for these massive floating point-based services.
Posts: 5
Joined: Wed Oct 17, 2012 8:06 am
by cartman » Mon Jan 21, 2013 8:36 pm
flask28: Were you able to get soundmodem decoding AX25 packets? I've tried with a few USB soundcards and a Signalink and the waveform is there but no decoding. It works the first time on my desktop with fc17 and netbook using Ubuntu 12.10.

73,
Gary
VE6UQ
Posts: 2
Joined: Sat Jan 19, 2013 4:03 pm
by F5VLB » Sun Apr 06, 2014 2:53 pm
Hello, I am interested by this solution to equip my volunteers in the scope of our participation to emergency networks in cas of accidents,troubles, ...

Is it possible to have an email to contact you enabling me to establish a procedure how to install and use FLDIGI on a raspberry ? This will be great !

regards

f5vlb@kermaz.com

John
F5VLB
Posts: 1
Joined: Sun Apr 06, 2014 2:35 pm
by hampi » Mon Apr 07, 2014 9:39 pm
F5VLB wrote:Is it possible to have an email to contact you enabling me to establish a procedure how to install and use FLDIGI on a raspberry ?


I tried apt-get install fldigi, but that seems to be broken in my rasbian version.
Posts: 140
Joined: Fri May 31, 2013 11:29 am