0 KA9Q‐Radio Notes
Mark Jessop edytuje tę stronę 2024-03-07 08:40:56 +10:30

Just some notes to myself while working on KA9Q-Radio support in auto_rx

Installation

sudo apt install build-essential make gcc libairspy-dev libairspyhf-dev libavahi-client-dev libbsd-dev libfftw3-dev libhackrf-dev libiniparser-dev libncurses5-dev libopus-dev librtlsdr-dev libusb-1.0-0-dev libusb-dev portaudio19-dev libasound2-dev uuid-dev rsync time
  • git clone
  • build

Add your user to the radio group

sudo usermod -aG radio $(whoami)

FFTW Wisdom file generation

(Reference: ka9q-radio/docs/FFTW3.md)

This needs to be run to ensure the FFT calculations used in ka9q-radio are run as optimally as possible.

This can take many hours to run, so set the fftwf-wisdom command going and come back in a few hours. On a RPi 4 this took TBD hours to run.

TODO: Add plan entry for Airspy Mini

cd /etc/fftw/
sudo time fftwf-wisdom -v -T 1 -o nwisdom rof500000 cob2400 cob1250 cob1202 cob1200
ls -l nwisdom wisdomf 
# check that nwisdom is larger than wisdomf
cp -i nwisdom wisdomf

Config file for Airspy R2

[global]
hardware = airspy
mode = fm
status = sonde.local
iface = enp3s0 # Should be whatever your ethernet interface is - or could it just be set to lo?
ttl = 0        # This needs to be 0 else traffic will 'escape' into your network, potentially causing issues.
data = sonde-pcm.local

[airspy]
device = airspy
description = "Radiosonde RX"
# Need to check what settings below we need.
#serial =
#samprate = 20000000
#converter = 0
#calibrate = 0
#linearity = false
#lna-agc = false
#mixer-agc = false
#lna-gain =
#mixer-gain =
#vga-gain =
#gainstep =
#bias = false
#agc-high-threshold = -10
#agc-low-threshold = -40
#frequency = 149000000
# Frequency should be set ~600 kHz higher than the highest frequency you want to receive.
# For an Airspy R2 running at full sample rate, set this to 407m0 to cover 400-406 MHz.
frequency = 407m0 ; lock to radio sonde band (front end is a downmixer)

[telemetry]
# probably dont need any of this?
freq = "401m50"

[manual-400]
freq = 0
ttl = 0

Testing SDR

  • Tune seems to continue trying to resolve a hostname if it doesnt exist. Need a faster way of telling if a server exists.

IQ Capture

Use convention of ssrc = frequency in hz

Setting up a channel

tune --samprate 48000 --frequency 404m09 --mode iq --ssrc 404090000 --radio sonde.local

Getting IQ

pcmcat -2 -s 404090000 sonde-pcm.local

e.g. feeding data into RS41 decode chain.

pcmcat -2 -s 404090000 sonde-pcm.local | ./iq_dec --bo 16 - 48000 16 2>/dev/null |./fsk_demod --cs16 -b -10000 -u 10000 -s 2 48000 4800 - - | ./rs41mod --ptu2 --json --jsnsubfrm1 --softin -i

Closing a channel

tune --samprate 48000 --frequency 0 --mode iq --ssrc 404090000 --radio sonde.local

Spectrum data

todo