Mastodon

fldigi via wfview on Linux: IC-705 over the network

fldigi via wfview on Linux: IC-705 over the network

This is how I got fldigi on a Linux laptop to receive, transmit and control an IC-705, with wfview in the middle talking to the radio over the network. Audio goes between the two programs through ALSA loopback cards. Frequency control and PTT go through wfview’s built-in rigctld server.

The radio isn’t on USB in this setup, so there is no serial port to configure.


The signal path

IC-705  <-- LAN/UDP -->  wfview
                           |  RX audio:  wfview plays hw:10,1  ->  fldigi captures hw:10,0
                           |  TX audio:  fldigi plays hw:11,0  ->  wfview captures hw:11,1
                           |  CAT + PTT: fldigi Hamlib -> 127.0.0.1:4533 (wfview rigctld)
                         fldigi

What I used:

  • ThinkPad X220, Linux with PipeWire 1.0.5
  • fldigi 4.2.11 (PortAudio, Hamlib 4.7.0)
  • wfview, with its rigctld server on port 4533
  • snd-aloop kernel module, giving two loopback cards (10 and 11 here)

Audio loopback: the one rule

Each loopback card is a pipe with two ends. Sound played into ,1 comes out of ,0, and sound played into ,0 comes out of ,1. One program must use ,0 and the other ,1. If both use the same end, you get silence. That was my original fault: both programs were on ,1.

Direction wfview fldigi
RX (radio to fldigi) Audio Output: Loopback: PCM (hw:10,1) Capture: Loopback: PCM (hw:10,0)
TX (fldigi to radio) Audio Input: Loopback: PCM (hw:11,1) Playback: Loopback: PCM (hw:11,0)

fldigi audio settings

  1. Configure → Config Dialog
  2. In the left-hand tree, expand Soundcard and click Devices
  3. Tick PortAudio, then set Capture and Playback as in the table
  4. Click Settings under Soundcard. Set the Capture and Playback sample rates to 48000. Leave Converter alone
  5. Save, then restart fldigi

The raw hw: loopback devices do no rate conversion. Both ends of a pipe must open at the same rate, and 48000 matches wfview.

Keep desktop sound off the loopback

My PipeWire default output and input had ended up on the loopback cards. Desktop sound disappeared and could leak into fldigi’s receive audio. Put the defaults back on the built-in sound card, either in the desktop sound settings or with:

pactl info | grep Default
pactl set-default-sink   alsa_output.pci-0000_00_1b.0.analog-stereo
pactl set-default-source alsa_input.pci-0000_00_1b.0.analog-stereo

(Your device names will differ. pactl list short sinks lists them.)


CAT and PTT through wfview’s rigctld

In wfview, enable the rigctld server on port 4533 and make sure PTT is enabled.

In fldigi, Configure → Config Dialog → Rig Control:

  1. Hardware PTT: untick Use separate serial port PTT, and untick RTS and DTR. I had an old setting here pointing at the IC-705’s USB serial port, which doesn’t exist over LAN
  2. Hamlib:
    • Tick Use Hamlib
    • Rig: NET rigctl
    • Device: 127.0.0.1:4533
    • Tick PTT via Hamlib command
  3. Click Initialize
  4. Click Save

The Initialize gotcha

fldigi only reads the Hamlib settings, including PTT via Hamlib command, when you click Initialize. If you tick the box after initialising, CAT works but T/R and Tune do nothing, even though the setting is saved.

Fix: untick Use Hamlib, tick it again, and click Initialize.


Testing

Check How Expected
RX audio Watch the fldigi waterfall Signals and noise, not blank
CAT Change frequency on the radio or in wfview fldigi’s display follows within a second or two
PTT fldigi T/R on, then off Radio keys, then unkeys
TX audio TX level down, press Tune RF output shown, ALC at or near zero

Keep the drive low. Overdriving the IC-705 causes ALC clipping and splatter.


Troubleshooting

Symptom Likely cause Fix
Blank waterfall Both programs on the same end of a loopback pipe fldigi Capture on hw:10,0
Audio device won’t open Sample rate mismatch 48000 both directions
Desktop sound missing PipeWire default is a loopback card Reset defaults
Frequency doesn’t follow Hamlib not initialised Check 127.0.0.1:4533, click Initialize
CAT works, PTT doesn’t PTT setting not picked up Untick/retick Use Hamlib, Initialize
Good waterfall, no decodes wfview’s UDP link to the radio degraded Restart wfview; look for repeated “missing packet” lines in its log

Read-only checks from a terminal

None of these transmit:

# Is rigctld answering? Prints frequency and mode
rigctl -m 2 -r 127.0.0.1:4533 f m

# PTT state: 0 = RX, 1 = TX
rigctl -m 2 -r 127.0.0.1:4533 t

# Is fldigi connected to rigctld?
ss -tnp | grep 4533

# Which loopback streams are running, and at what rate
grep -H . /proc/asound/card1{0,1}/pcm*/sub0/hw_params

To find out whether fldigi is sending PTT at all, run the t check in a loop while pressing T/R. If it never changes to 1, fldigi isn’t sending the command. That’s how I tracked down the Initialize gotcha.