Tried (and tired) to install ka9q radio

146 views
Skip to first unread message

Jari Kiiski

unread,
Feb 18, 2025, 3:43:32 PMFeb 18
to radiosonde_auto_rx
Hi!
I wrote earlier i had problems with trying to install ka9q radio.  I am using Ubuntu server 24.04 mimized version. I don't know much of Linux, so i used ChatGPT to help me. 
This would be too long if i write all error messages, but here is a list of things i had to do because of errors that came when i tried to run make -f Makefile.sdrplay:

sudo apt install libbsd-dev
sudo apt install libiniparser-dev
sudo apt install libopus-dev
sudo apt install libavahi-client-dev
sudo apt install libax25-dev
gcc -c rtp.c -o rtp.o
gcc -c ax25.c -o ax25.o
ar rv libradio.a rtp.o ax25.o
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libairspy-dev
sudo apt-get install libairspyhf-dev
sudo apt install libportaudio2
/*Install port audio from source*/
sudo apt install build-essential libasound2-dev libjack-jackd2-dev
wget http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
tar -xvzf pa_stable_v190600_20161030.tgz
cd portaudio
./configure
make
sudo make install
sudo ldconfig
/*end of portaudio installation*/
sudo apt install rtl-sdr librtlsdr-dev

(Installation of sdrplay api, went ok)

sudo apt install libncurses5-dev libncursesw5-dev
sudo apt install libsamplerate0-dev
sudo apt install libax25-dev libpcap-dev libnet-dev libc6-dev
And again these
gcc -c rtp.c -o rtp.o
gcc -c ax25.c -o ax25.o
ar rv libradio.a rtp.o ax25.o
**********
Last error, couldn't get rid of it so i gave up
**********
 cc  -o monitor monitor.o monitor-data.o monitor-display.o monitor-repeater.o libradio.a -lopus -lportaudio -lasound -lncursesw -liniparser -lbsd -lm -lpthread
/usr/bin/ld: monitor-data.o: in function `decode_task':
monitor-data.c:(.text+0x34e): undefined reference to `src_delete'
/usr/bin/ld: monitor-data.c:(.text+0x364): undefined reference to `src_delete'
/usr/bin/ld: monitor-data.c:(.text+0x139a): undefined reference to `src_process'
/usr/bin/ld: monitor-data.c:(.text+0x1cdd): undefined reference to `src_process'
/usr/bin/ld: monitor-data.c:(.text+0x1d3a): undefined reference to `src_new'
/usr/bin/ld: monitor-data.c:(.text+0x206a): undefined reference to `src_new'
collect2: error: ld returned 1 exit status
make: *** [Makefile.sdrplay:107: monitor] Error 1
 

There were times when i got quite frustrated, but not anymore. I understand that this needs quite a bit more knowledge of Linux systems. So i decided to stay with Spyserver and forget plans to compare RSP1A and Airspy R1. But if anyone manages to do that comparison, let me know if there is any difference in their performance as sonde receiver.
73, de Jari, OH4NDU

Mark Jessop

unread,
Feb 18, 2025, 4:02:03 PMFeb 18
to Jari Kiiski, radiosonde_auto_rx
This really does look like chatgpt is leading you down various rabbit holes that *really* should not be required. There are commands you are running in that list that you should *never* be running manually, e.g. individual build commands within ka9q-radio. The makefile should take care of all of that, and if you have to resort to building individual files something has gone *very* wrong.

It's possible that Ubuntu 24.04 may result in some differences when building, but not to the point that you should be needing to build portaudio from source? The libportaudio2 and libportaudio2-dev packages are available within ubuntu 24.04. 

Rather than asking chatgpt what to do, the better option would have been to ask for help, including the errors you are finding during compilation. Putting compilation errors for a project that chatgpt likely has zero information about is going to lead to it hallucinating answers that have likely resulted in your system being more broken than when you started... 

Hopefully someone with experience building ka9q-radio with SDRPlay support can chime in about any extra dependencies or steps required before building ka9q-radio. I don't have any SDRPlay devices so can't really help here...

73
Mark VK5QI

--
You received this message because you are subscribed to the Google Groups "radiosonde_auto_rx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to radiosonde_auto...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/radiosonde_auto_rx/e1a51b24-e9c2-4efb-a2b3-a5610481e168n%40googlegroups.com.

Jari Kiiski

unread,
Feb 24, 2025, 9:47:36 AMFeb 24
to radiosonde_auto_rx
Hello!
I shot in the dark again.
This time i first installed the dependencies following instructions on auto_rx wiki.
Then i did make -f Makefile.linux
                  sudo make -f Makefile.linux install
After that  make -f Makefile.sdrplay
                   sudo make -f Makefile.linux install
This time it looks like it compiles and installs without errors.
Made the wisdom file and tested.
control sonde.local does not give anything, but control <servername>.local gives response: 
        SSRC    preset   samprate      freq, Hz   SNR output channel
0 channels; choose SSRC, create new SSRC, or hit return to look for more:
I'm still unsure if it works or not. I have ka9q server and auto_rx in separate virtual machines which run on same host. 
Auto_rx webpage does not open, so it seems to be unable to start.
Any suggestions?

73, de Jari, OH4NDU

Mark Jessop

unread,
Feb 24, 2025, 4:26:22 PMFeb 24
to Jari Kiiski, radiosonde_auto_rx
Questions:
- Look at the log output from radio for any obvious errors using the command: journalctl -u radiod@sdrplay-autorx
- Look at the log output from auto_rx using either: 
  - Docker install: docker logs radiosonde_auto_rx
  - native install: journalctl -u auto_rx
  - My guess is it's not connecting to the ka9q-radio server for some reason, e.g. the server can't talk to your sdrplay or there's some other issue.

73
Mark


Jari Kiiski

unread,
Feb 25, 2025, 2:31:08 PMFeb 25
to radiosonde_auto_rx
Hello!
I made some investigation, and found that rad...@sdrplay-autorx.service seeks for /usr/local/lib/ka9q-radio/sdrplay.so. But there is no such file in the whole filesystem.
From /usr/local/lib/ i found files libsdrplay_api.so and libsdrplay_api.so.3
Could this be due to the wrong api version? I am now using 3.15.2

73, de Jari, OH4NDU

Michaela Wheeler

unread,
Feb 25, 2025, 4:09:11 PMFeb 25
to radiosonde_auto_rx
sdrplay.so comes from ka9q-radio, its likely that you haven't performed make install so this file hasn't been added there, or your build did not build sdrplay support make -f Makefile.linux SDRPLAY=1  will force sdrplay support

-- 
  Michaela Wheeler

Jari Kiiski

unread,
Feb 25, 2025, 4:39:20 PMFeb 25
to radiosonde_auto_rx
Thanks!
That created the file. But it still does not start. Now i get this error :
radiod@sdrplay-autorx[1006]: Error loading /usr/local/lib/ka9q-radio/sdrplay.so to handle device sdrplay: /usr/local/lib/ka9q-radio/sdrplay.so: undefined symbol: Verbose
Have i done something wrong ?
73, de Jari, OH4NDU

Michaela Wheeler

unread,
Feb 26, 2025, 1:38:27 AMFeb 26
to radiosonde_auto_rx
I haven't come across this, but I'm guessing that this has happened by either something changing between make and make install, in which case perform make clean and start the ka9q-radio build from the start again, or you've been manually moving around .so files and ended up with the wrong library named or placed in the wrong directory. 

-- 
  Michaela Wheeler

Jari Kiiski

unread,
Feb 26, 2025, 8:50:03 AMFeb 26
to radiosonde_auto_rx
Now i did everything again to a clean vm.
My procedure was:
1) Dependencies.
2) Sdrplay api using installation script from sdrplay downloads.
3) Reboot
4) Makefile.linux -SDRPLAY=1 (install)
5) Makefile.sdrplay (install)   it doesn't compile if don't do phase 4 first.
6) Wisdom files
7) radiod@sdrplay-autorx configuration file

I still get this error:
Feb 26 13:14:25 ka9qserver radiod@sdrplay-autorx[12302]: Error loading /usr/local/lib/ka9q-radio/sdrplay.so to handle device sdrplay: /usr/local/lib/ka9q-radio/sdrplay.so: undefined symbol: Verbose

What is your installation procedure?

73, de Jari, OH4NDU

Michaela Wheeler

unread,
Feb 26, 2025, 3:41:53 PMFeb 26
to radiosonde_auto_rx
You don't need to do 
Makefile.sdrplay

-- 
  Michaela Wheeler

Jari Kiiski

unread,
Feb 27, 2025, 12:57:40 PMFeb 27
to radiosonde_auto_rx
Hi!
Now i got it running. Again to clean os i first installed sdrplay api from https://github.com/srcejon/sdrplayapi. Then preferences and then 
 make -f Makefile.linux SDRPLAY=1.
Now sdrplay service and radiod are running happily, but i have problems with connection between auto_rx and ka9q server. They are both running in different vm:s on same host and same network. Multicast is enabled on vm:s nic.
Have no idea what causes it. Trying to figure out where the pain is now.

73, de Jari, OH4NDU

Michaela Wheeler

unread,
Feb 27, 2025, 3:13:01 PMFeb 27
to radiosonde_auto_rx
Are you vms network configured as bridged?
What does your radiod config look like? Does it have an interface set and the ttl high enough? (Non zero)
Are there any log messages?
You could try running avahi-browse on the vms and the host to see if you can see radiod

-- 
  Michaela Wheeler

Mark Jessop

unread,
Feb 27, 2025, 4:07:05 PMFeb 27
to Michaela Wheeler, radiosonde_auto_rx
I would recommend *not* running ka9q-radio and auto_rx on different VMs for this application. 
While ka9q-radio should be able to handle this, the multicast traffic it generates will also likely escape into the rest of your network, which can result in odd behaviour, particularly with WiFi networks. 
Run them both on the same VM, with the ka9q-radio ttl set to 0.

73
Mark VK5QI

Jari Kiiski

unread,
Feb 27, 2025, 4:54:29 PMFeb 27
to radiosonde_auto_rx
I have now both of them in same vm, but there is still something wrong in my setup.
Auto_rx does not connect to ka9q. It gives these error messages:

2025-02-27 21:40:20,680 CRITICAL:KA9Q (sonde.local) - tune call failed with a timeout. Is the server running?
2025-02-27 21:40:20,680 CRITICAL:Config - Could not contact KA9Q Server sonde.local:5555. Exiting.
2025-02-27 21:40:20,680 CRITICAL:Error in configuration file! Exiting...

I assume the last line points to errors above it. Or is there something else too?
And why there is the port number 5555 when it should not be used with ka9q? I commented out the sdr_port line, but  errors are still the same.
73, de Jari, OH4NDU

Mark Jessop

unread,
Feb 27, 2025, 5:10:36 PMFeb 27
to Jari Kiiski, radiosonde_auto_rx
This is still suggesting that ka9q-radio is not running correctly.

Please have a look at the log output from ka9q-radio to see if there's any obvious errors:

journalctl -u radiod@sdrplay-autorx -n 100 --no-pager


Also yes, the sdr_port value is not used for ka9q-radio, and I need to remove that from the error messages when ka9q-radio is in use.

73
Mark VK5QI 

Jari Kiiski

unread,
Feb 28, 2025, 5:58:58 AMFeb 28
to radiosonde_auto_rx
The last one was my bad (most likely others too)
I had installed Auto_rx with "normal" command. After adding --device=/dev/bus/usb, everything started to work.
Next thing is to make test setup to compare between Airspy and RSP1A in same antenna.
Other thing is to analyze my stumbling with this and try to find out what, why and how i did it wrong so many times.

73, de Jari, OH4NDU

Jari Kiiski

unread,
Feb 28, 2025, 8:23:48 PMFeb 28
to radiosonde_auto_rx
Now i have both ka9q radio and spyserver running. Both sdr's are connected to same antenna by splitter. Spyserver works as it has been for years. But i don't get any decodes from ka9q.  I see strong spikes at sonde's frequencies, but not a single decode. Could this be a samplerate issue or something like that? 

73, de Jari, OH4NDU

Mark Jessop

unread,
Feb 28, 2025, 8:27:09 PMFeb 28
to Jari Kiiski, radiosonde_auto_rx
Please paste the log output from ka9q-radio. It's quite possible you are experiencing sample drops due to using your sdrplay within a VM.

73
Mark


Sent by means most mobile.

Jari Kiiski

unread,
Feb 28, 2025, 8:39:39 PMFeb 28
to radiosonde_auto_rx
Uploaded the log to dropbox. Is this the log you mean? 
https://www.dropbox.com/s/h7hc48cldc78sso/ka9q_log.txt?st=kd1a8k8q&dl=0

Mark Jessop

unread,
Feb 28, 2025, 8:59:00 PMFeb 28
to Jari Kiiski, radiosonde_auto_rx
That's the one. Unfortunately nothing interesting in there. 

If you are seeing a scan plot , but nothing is deciding, then the issue is usually either:
- not enough SNR (looking at the scan plot can usually verify if this is the case, need >10dB for most sondes to decode)
- sample drops, due to insufficient USB throughput, or CPU issues.

SDRplays API uses a lot of CPU, in fact it uses about the same amount of CPU as ka9q-radio does, which is pretty ridiculous.
Unfortunately it looks like ka9q-radio isn't reporting any sample drops, but it might still be the issue. It would be worth running 'top' and seeing how loaded the machine is.

Sent by means most mobile.

Jari Kiiski

unread,
Mar 1, 2025, 12:46:15 PMMar 1
to radiosonde_auto_rx
You were right about the usb and vm. Everything started to work after i installed the software to the host machine directly.
Sdrplay seems to have more and stronger spuriosis signals, but after one sonde flight it seems to receive slightly better.
Now i just keep them running for some time to see if they have any differences.

73, de Jari, OH4NDU

Reply all
Reply to author
Forward
0 new messages