-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial test scripts for verifying RADE reporting.
- Loading branch information
Showing
3 changed files
with
288 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
FirstTimeUse=0 | ||
ExperimentalFeatures=0 | ||
[Audio] | ||
soundCard1SampleRate=-1 | ||
soundCard2SampleRate=-1 | ||
soundCard1InDeviceName=@FREEDV_RADIO_TO_COMPUTER_DEVICE@ | ||
soundCard1InSampleRate=48000 | ||
soundCard1OutDeviceName=@FREEDV_COMPUTER_TO_RADIO_DEVICE@ | ||
soundCard1OutSampleRate=48000 | ||
soundCard2InDeviceName=@FREEDV_MICROPHONE_TO_COMPUTER_DEVICE@ | ||
soundCard2InSampleRate=48000 | ||
soundCard2OutDeviceName=@FREEDV_COMPUTER_TO_SPEAKER_DEVICE@ | ||
soundCard2OutSampleRate=48000 | ||
SquelchActive=1 | ||
SquelchLevel=-4 | ||
fifoSize_ms=440 | ||
transmitLevel=0 | ||
snrSlow=0 | ||
mode=257 | ||
TxRxDelayMilliseconds=0 | ||
[Filter] | ||
codec2LPCPostFilterGamma=50 | ||
codec2LPCPostFilterBeta=20 | ||
MicInBassFreqHz=100 | ||
MicInBassGaindB=0 | ||
MicInTrebleFreqHz=3000 | ||
MicInTrebleGaindB=0 | ||
MicInMidFreqHz=1500 | ||
MicInMidGaindB=0 | ||
MicInMidQ=100 | ||
MicInVolInDB=0 | ||
SpkOutBassFreqHz=100 | ||
SpkOutBassGaindB=0 | ||
SpkOutTrebleFreqHz=3000 | ||
SpkOutTrebleGaindB=0 | ||
SpkOutMidFreqHz=1500 | ||
SpkOutMidGaindB=0 | ||
SpkOutMidQ=100 | ||
SpkOutVolInDB=0 | ||
codec2LPCPostFilterEnable=1 | ||
codec2LPCPostFilterBassBoost=1 | ||
speexpp_enable=1 | ||
700C_EQ=1 | ||
[Filter/MicIn] | ||
EQEnable=0 | ||
BassFreqHz=100 | ||
BassGaindB=0 | ||
TrebleFreqHz=3000 | ||
TrebleGaindB=0 | ||
MidFreqHz=1500 | ||
MidGaindB=0 | ||
MidQ=1 | ||
VolInDB=0 | ||
[Filter/SpkOut] | ||
EQEnable=0 | ||
BassFreqHz=100 | ||
BassGaindB=0 | ||
TrebleFreqHz=3000 | ||
TrebleGaindB=0 | ||
MidFreqHz=1500 | ||
MidGaindB=0 | ||
MidQ=1 | ||
VolInDB=0 | ||
[Filter/codec2LPCPostFilter] | ||
Gamma=50 | ||
Beta=20 | ||
[Hamlib] | ||
UseForPTT=0 | ||
EnableFreqModeChanges=1 | ||
UseAnalogModes=0 | ||
IcomCIVHex=0 | ||
RigNameStr=ADAT www.adat.ch ADT-200A | ||
PttType=0 | ||
SerialRate=0 | ||
SerialPort= | ||
PttSerialPort= | ||
RigName=0 | ||
[Rig] | ||
UseSerialPTT=0 | ||
Port= | ||
UseRTS=1 | ||
RTSPolarity=1 | ||
UseDTR=0 | ||
DTRPolarity=0 | ||
UseSerialPTTInput=0 | ||
PttInPort= | ||
CTSPolarity=0 | ||
leftChannelVoxTone=0 | ||
EnableSpacebarForPTT=1 | ||
HalfDuplex=1 | ||
MultipleRx=1 | ||
SingleRxThread=1 | ||
[PSKReporter] | ||
Enable=0 | ||
Callsign= | ||
GridSquare= | ||
FrequencyHzStr=0 | ||
[Data] | ||
CallSign= | ||
[Reporting] | ||
Enable=1 | ||
Callsign=ZZ0ZZZ | ||
GridSquare=ZZ12ZZ | ||
FrequencyAsKHz=0 | ||
FrequencyList=1.9970,3.6250,3.6430,3.6930,3.6970,3.8500,5.4035,5.3665,5.3685,7.1770,7.1970,14.2360,14.2400,18.1180,21.3130,24.9330,28.3300,28.7200,10489.6400 | ||
ManualFrequencyReporting=1 | ||
DirectionAsCardinal=0 | ||
Frequency=14236000 | ||
[Reporting/PSKReporter] | ||
Enable=1 | ||
[Reporting/FreeDV] | ||
Enable=1 | ||
Hostname=qso.freedv.org | ||
CurrentBandFilter=0 | ||
UseMetricDistances=1 | ||
BandFilterTracksFrequency=0 | ||
ForceReceiveOnly=0 | ||
StatusText=FreeDV Automated Test System - https://github.com/drowe67/freedv-gui | ||
RecentStatusTexts= | ||
TxRowBackgroundColor=#fc4500 | ||
TxRowForegroundColor=#000000 | ||
RxRowBackgroundColor=#379baf | ||
RxRowForegroundColor=#000000 | ||
MsgRowBackgroundColor=#E58BE5 | ||
MsgRowForegroundColor=#000000 | ||
[Reporting/FreeDV/BandFilterTracking] | ||
TracksFreqBand=1 | ||
TracksExactFreq=0 | ||
[CallsignList] | ||
UseUTCTime=0 | ||
[FreeDV2020] | ||
Allowed=0 | ||
[MainFrame] | ||
left=26 | ||
top=23 | ||
width=800 | ||
height=780 | ||
rxNbookCtrl=0 | ||
TabLayout= | ||
[Windows] | ||
[Windows/AudioConfig] | ||
left=26 | ||
top=23 | ||
width=918 | ||
height=739 | ||
[Windows/FreeDVReporter] | ||
left=20 | ||
top=20 | ||
width=-1 | ||
height=-1 | ||
visible=0 | ||
currentSort=-1 | ||
currentSortDirection=1 | ||
reportingUserMsgColWidth=130 | ||
[File] | ||
playFileToMicInPath= | ||
recFileFromRadioPath= | ||
recFileFromRadioSecs=60 | ||
recFileFromModulatorPath= | ||
recFileFromModulatorSecs=60 | ||
playFileFromRadioPath= | ||
[VoiceKeyer] | ||
WaveFilePath=/home/mooneer/Documents | ||
WaveFile=voicekeyer.wav | ||
RxPause=10 | ||
Repeats=5 | ||
[FreeDV700] | ||
txClip=1 | ||
txBPF=1 | ||
[Noise] | ||
noise_snr=2 | ||
[Debug] | ||
console=0 | ||
verbose=0 | ||
APIverbose=0 | ||
[Waterfall] | ||
Color=0 | ||
[Stats] | ||
ResetTime=10 | ||
[Plot] | ||
[Plot/Spectrum] | ||
CurrentAveraging=0 | ||
[Monitor] | ||
VoiceKeyerAudio=0 | ||
TransmitAudio=0 | ||
VoiceKeyerAudioVol=0 | ||
TransmitAudioVol=0 | ||
[QuickRecord] | ||
SavePath=/home/mooneer/Documents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/bin/bash | ||
|
||
# Determine sox driver to use for recording/playback | ||
OPERATING_SYSTEM=`uname` | ||
SOX_DRIVER=alsa | ||
FREEDV_BINARY=src/freedv | ||
if [ "$OPERATING_SYSTEM" == "Darwin" ]; then | ||
SOX_DRIVER=coreaudio | ||
FREEDV_BINARY=src/FreeDV.app/Contents/MacOS/freedv | ||
fi | ||
|
||
createVirtualAudioCable () { | ||
CABLE_NAME=$1 | ||
pactl load-module module-null-sink sink_name=$CABLE_NAME sink_properties=device.description=$CABLE_NAME | ||
} | ||
|
||
FREEDV_RADIO_TO_COMPUTER_DEVICE="${FREEDV_RADIO_TO_COMPUTER_DEVICE:-FreeDV_Radio_To_Computer}" | ||
FREEDV_COMPUTER_TO_SPEAKER_DEVICE="${FREEDV_COMPUTER_TO_SPEAKER_DEVICE:-FreeDV_Computer_To_Speaker}" | ||
FREEDV_MICROPHONE_TO_COMPUTER_DEVICE="${FREEDV_MICROPHONE_TO_COMPUTER_DEVICE:-FreeDV_Microphone_To_Computer}" | ||
FREEDV_COMPUTER_TO_RADIO_DEVICE="${FREEDV_COMPUTER_TO_RADIO_DEVICE:-FreeDV_Computer_To_Radio}" | ||
|
||
# Automated script to help find audio dropouts. | ||
# NOTE: this must be run from "build_linux". Also assumes PulseAudio/pipewire. | ||
if [ "$OPERATING_SYSTEM" == "Linux" ]; then | ||
DRIVER_INDEX_FREEDV_RADIO_TO_COMPUTER=$(createVirtualAudioCable FreeDV_Radio_To_Computer) | ||
DRIVER_INDEX_FREEDV_COMPUTER_TO_SPEAKER=$(createVirtualAudioCable FreeDV_Computer_To_Speaker) | ||
DRIVER_INDEX_FREEDV_MICROPHONE_TO_COMPUTER=$(createVirtualAudioCable FreeDV_Microphone_To_Computer) | ||
DRIVER_INDEX_FREEDV_COMPUTER_TO_RADIO=$(createVirtualAudioCable FreeDV_Computer_To_Radio) | ||
DRIVER_INDEX_LOOPBACK=`pactl load-module module-loopback source="FreeDV_Computer_To_Radio.monitor" sink="FreeDV_Radio_To_Computer"` | ||
fi | ||
|
||
# Determine correct record device to retrieve TX data | ||
FREEDV_CONF_FILE=freedv-ctest-reporting.conf | ||
if [ "$OPERATING_SYSTEM" == "Linux" ]; then | ||
REC_DEVICE="$FREEDV_COMPUTER_TO_RADIO_DEVICE.monitor" | ||
else | ||
REC_DEVICE="$FREEDV_COMPUTER_TO_RADIO_DEVICE" | ||
fi | ||
|
||
# Generate config file | ||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
if [ "$FREEDV_RADIO_TO_COMPUTER_DEVICE" == "FreeDV_Radio_To_Computer" ] && [ "$OPERATING_SYSTEM" == "Linux" ]; then | ||
sed "s/@FREEDV_RADIO_TO_COMPUTER_DEVICE@/$FREEDV_RADIO_TO_COMPUTER_DEVICE.monitor/g" $SCRIPTPATH/$FREEDV_CONF_FILE.tmpl > $(pwd)/$FREEDV_CONF_FILE | ||
else | ||
sed "s/@FREEDV_RADIO_TO_COMPUTER_DEVICE@/$FREEDV_RADIO_TO_COMPUTER_DEVICE/g" $SCRIPTPATH/$FREEDV_CONF_FILE.tmpl > $(pwd)/$FREEDV_CONF_FILE | ||
fi | ||
|
||
sed "s/@FREEDV_COMPUTER_TO_RADIO_DEVICE@/$FREEDV_COMPUTER_TO_RADIO_DEVICE/g" $(pwd)/$FREEDV_CONF_FILE > $(pwd)/$FREEDV_CONF_FILE.tmp | ||
mv $(pwd)/$FREEDV_CONF_FILE.tmp $(pwd)/$FREEDV_CONF_FILE | ||
sed "s/@FREEDV_COMPUTER_TO_SPEAKER_DEVICE@/$FREEDV_COMPUTER_TO_SPEAKER_DEVICE/g" $(pwd)/$FREEDV_CONF_FILE > $(pwd)/$FREEDV_CONF_FILE.tmp | ||
mv $(pwd)/$FREEDV_CONF_FILE.tmp $(pwd)/$FREEDV_CONF_FILE | ||
|
||
if [ "$FREEDV_MICROPHONE_TO_COMPUTER_DEVICE" == "FreeDV_Microphone_To_Computer" ] && [ "$OPERATING_SYSTEM" == "Linux" ]; then | ||
sed "s/@FREEDV_MICROPHONE_TO_COMPUTER_DEVICE@/$FREEDV_MICROPHONE_TO_COMPUTER_DEVICE.monitor/g" $(pwd)/$FREEDV_CONF_FILE > $(pwd)/$FREEDV_CONF_FILE.tmp | ||
else | ||
sed "s/@FREEDV_MICROPHONE_TO_COMPUTER_DEVICE@/$FREEDV_MICROPHONE_TO_COMPUTER_DEVICE/g" $(pwd)/$FREEDV_CONF_FILE > $(pwd)/$FREEDV_CONF_FILE.tmp | ||
fi | ||
mv $(pwd)/$FREEDV_CONF_FILE.tmp $(pwd)/$FREEDV_CONF_FILE | ||
|
||
# Start recording | ||
if [ "$OPERATING_SYSTEM" == "Linux" ]; then | ||
parecord --channels=1 --rate 8000 --file-format=wav --device "$REC_DEVICE" --latency 1 test.wav & | ||
else | ||
sox -t $SOX_DRIVER "$REC_DEVICE" -c 1 -r 8000 -t wav test.wav & | ||
fi | ||
RECORD_PID=$! | ||
|
||
# Start FreeDV in test mode to record TX | ||
$FREEDV_BINARY -f $(pwd)/$FREEDV_CONF_FILE -ut tx -utmode RADE -txtime 5 2>&1 | tee tmp.log | ||
|
||
FDV_PID=$! | ||
#sleep 30 | ||
#screencapture ../screenshot.png | ||
#wpctl status | ||
#pw-top -b -n 5 | ||
#wait $FDV_PID | ||
|
||
# Stop recording, play back in RX mode | ||
kill $RECORD_PID | ||
|
||
$FREEDV_BINARY -f $(pwd)/$FREEDV_CONF_FILE -ut rx -utmode RADE -rxfile $(pwd)/test.wav | ||
|
||
# Clean up PulseAudio virtual devices | ||
if [ "$OPERATING_SYSTEM" == "Linux" ]; then | ||
pactl unload-module $DRIVER_INDEX_LOOPBACK | ||
pactl unload-module $DRIVER_INDEX_FREEDV_RADIO_TO_COMPUTER | ||
pactl unload-module $DRIVER_INDEX_FREEDV_COMPUTER_TO_SPEAKER | ||
pactl unload-module $DRIVER_INDEX_FREEDV_COMPUTER_TO_RADIO | ||
pactl unload-module $DRIVER_INDEX_FREEDV_MICROPHONE_TO_COMPUTER | ||
fi |