From df53876e411e5e4eceb6d341643147b6bbc3df01 Mon Sep 17 00:00:00 2001 From: Piotr Krysik Date: Sat, 13 Jun 2009 19:42:22 +0200 Subject: added two little utils from gsm-tvoid --- README | 7 +++++++ src/python/capture.sh | 39 +++++++++++++++++++++++++++++++++++++++ src/python/go.sh | 12 ++++++++++++ 3 files changed, 58 insertions(+) create mode 100755 src/python/capture.sh create mode 100755 src/python/go.sh diff --git a/README b/README index e69de29..61141d5 100644 --- a/README +++ b/README @@ -0,0 +1,7 @@ +To build gsm receiver use: + $ ./bootstrap + $ cd debug + $ ./configure + $ make + +Usage \ No newline at end of file diff --git a/src/python/capture.sh b/src/python/capture.sh new file mode 100755 index 0000000..7256f2b --- /dev/null +++ b/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 ($samples samples)" +$USRP_PROG -d "$DECIM" -f "$FREQ" -N $samples $FILE + diff --git a/src/python/go.sh b/src/python/go.sh new file mode 100755 index 0000000..1e8150d --- /dev/null +++ b/src/python/go.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +echo "go.sh [decim==112]" + +DECIM=$2 +FILE=$1 + +if [ $DECIM"x" = x ]; then + DECIM=112 +fi + +./gsm_receive.py -d "$DECIM" -I "$FILE" | ../../../gsmdecode/src/gsmdecode -i -- cgit v1.2.3