From 88fd0317ac88d661405e887fc1cc784441590965 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 9 Apr 2008 15:29:57 +0100 Subject: initial --- gsm-tvoid/src/python/capture.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 gsm-tvoid/src/python/capture.sh (limited to 'gsm-tvoid/src/python') diff --git a/gsm-tvoid/src/python/capture.sh b/gsm-tvoid/src/python/capture.sh new file mode 100755 index 0000000..14ef879 --- /dev/null +++ b/gsm-tvoid/src/python/capture.sh @@ -0,0 +1,39 @@ +#! /bin/sh + +if [ $1"x" = x ]; then + echo "./capture.sh [duration==10] [decim==112]" + echo "Example: ./capture.sh 940.4M" + exit 1 +fi +FREQ=$1 + +DURATION=$2 +if [ $2"x" = x ]; then + DURATION=10 +fi +DECIM=$3 +if [ $3"x" = x ]; then + DECIM=112 +fi + +USRP_PROG=usrp_rx_cfile.py +while :; do + which "$USRP_PROG" + if [ $? -eq 0 ]; then + break + fi + USRP_PROG=/usr/share/gnuradio/usrp/usrp_rx_cfile.py + which "$USRP_PROG" + if [ $? -eq 0 ]; then + break + fi + + echo "ERROR: usrp_rx_cfile.py not found. Make sure it's in your PATH!" + exit 1 +done + +FILE="capture_${FREQ}_${DECIM}.cfile" +samples=`expr 64000000 / $DECIM '*' $DURATION` +echo "Capturing for $DURATION seconds to $FILE" +$USRP_PROG -d "$DECIM" -f "$FREQ" -N $samples $FILE + -- cgit v1.2.3 From e24a2e69fbc23ab9b7fcd122905a4af4ebdb55b7 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 10 Apr 2008 03:08:53 +0100 Subject: caputre script --- gsm-tvoid/src/python/capture.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gsm-tvoid/src/python') diff --git a/gsm-tvoid/src/python/capture.sh b/gsm-tvoid/src/python/capture.sh index 14ef879..7256f2b 100755 --- a/gsm-tvoid/src/python/capture.sh +++ b/gsm-tvoid/src/python/capture.sh @@ -34,6 +34,6 @@ done FILE="capture_${FREQ}_${DECIM}.cfile" samples=`expr 64000000 / $DECIM '*' $DURATION` -echo "Capturing for $DURATION seconds to $FILE" +echo "Capturing for $DURATION seconds to $FILE ($samples samples)" $USRP_PROG -d "$DECIM" -f "$FREQ" -N $samples $FILE -- cgit v1.2.3