scan

#!/bin/bash

#Written by Paul Rodenhuis VK2AHB with ssistance from Kevin VK2CKD

# 071020 try to scan js8 frequencies with HB

#

# assumes js8call script running. and HB x minutes set.

if [ $# = 0 ]

then

echo "Usage: scan [3.6, 7, 10, 14, 21, 28]"

exit 0

fi

echo -n "How many minutes? "

read minutes

echo $minutes

seconds=`expr $minutes \* 60`

echo "Seconds" "$seconds"

echo "No of args " $#

qsy () {

DEV=/dev/ttyUSB0

(

stty raw 19200

case $i in

3.6)

#set Frequency to 3578.0

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x57\x03\x00\xFD" ;;

7)

#set Frequency to 70780

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x07\x07\x00\xFD" ;;

10)

#set Frequency to 10130

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x00\x13\x10\x00\xFD" ;;

14)

#set Frequency to 140780

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x07\x14\x00\xFD" ;;

21)

#set Frequency to 21078

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x07\x21\x00\xFD" ;;

28)

#set Frequency to 28078

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x07\x28\x00\xFD" ;;

esac

) < $DEV > $DEV

}

tuner() {

DEV=/dev/ttyUSB0

(

stty raw 19200

#set TUNER on

echo -n -e "\xfe\xfe\x94\xe0\x1C\x01\x01\xfd"

echo -n -e "\xfe\xfe\x94\xe0\x1C\x01\x02\xfd"

) < $DEV > $DEV

}

#Start of main script

while true

do

for i in `echo "$*"`

do

echo "$*"

echo -n "$i "

echo " `date +%H:%M`"

qsy $i

tuner on

sleep $seconds

done

done

scan15

#!/bin/bash

#Written by Paul Rodenhuis VK2AHB with ssistance from Kevin VK2CKD

# 071020 try to scan js8 frequencies with HB

#

# assumes js8call script running. and HB x minutes set.

if [ $# = 0 ]

then

echo "Usage: scan [3.6, 7, 10, 14, 21, 28]"

exit 0

fi

#echo -n "How many minutes? "

#read minutes

minutes=15

#echo $minutes

seconds=`expr $minutes \* 60`

echo "Seconds" "$seconds"

echo "No of args " $#

qsy () {

DEV=/dev/ttyUSB0

(

stty raw 19200

case $i in

3.6)

#set Frequency to 36580

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x57\x03\x00\xFD" ;;

7)

#set Frequency to 70780

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x07\x07\x00\xFD" ;;

10)

#set Frequency to 10130

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x00\x13\x10\x00\xFD" ;;

14)

#set Frequency to 140780

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x07\x14\x00\xFD" ;;

21)

#set Frequency to 21078

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x07\x21\x00\xFD" ;;

28)

#set Frequency to 28078

echo -n -e "\xFE\xFE\x94\xE0\x05\x00\x80\x07\x28\x00\xFD" ;;

esac

) < $DEV > $DEV

}

tuner() {

DEV=/dev/ttyUSB0

(

stty raw 19200

#set TUNER on

echo -n -e "\xfe\xfe\x94\xe0\x1C\x01\x01\xfd"

echo -n -e "\xfe\xfe\x94\xe0\x1C\x01\x02\xfd"

) < $DEV > $DEV

}

#Start of main script

while true

do

for i in `echo "$*"`

do

echo "$*"

echo -n "$i "

echo " `date +%H:%M`"

qsy $i

tuner on

sleep $seconds

done

done