#!/bin/sh #modem test MODEM="afskmodem" FN="pcm.log" SR=$1 if test -z $1 ; then echo "usage mtest samplerate (8000..48000)" SR="22050" ; fi pkill $MODEM echo "samplerate=$SR" echo "read raw soundcard data 16 bit stereo" echo "if you see 0s there is no audio input enabled, try amixer" echo "if you see pairs of same values there is no stereo input" echo "a lot of about same +- values if too high input level" echo "switch off any automatic gain control with amixer" echo "samplerate 8000/16000/24000 would be a good value but" echo "sloppy sound drivers crack and make unreadable modulation" ./$MODEM -f $SR -c 2 -D $FN & sleep 1 pkill $MODEM od -t d2 $FN | head -n 10 rm -f $FN echo "test mono modem, should here a clean tone else try other samplerate like 22050" ./$MODEM -f $SR -M 0 -B 1 -g -b 5 & sleep 5 pkill $MODEM echo "test stereo modem, should here clean tones else try other samplerate like 22050" ./$MODEM -f $SR -c 2 -M 0 -c 0 -B 1 -g -b 5 -M 1 -c 1 -B 1 -g -b 4 & sleep 5 pkill $MODEM