Further to this I have been looking at John's scripts published in CQ-TV266.
I initially had a lot of issues trying to copy the text from the pdf as it was transposed to the wrong characters, but eventually started to get it to work as I worked through the script with examples from the net.
Some of the options however I could never get top work properly, some packages on John's Jetson I did not have on mine such as xterm to allow for resizing of screens xdotool etc but installing was not a big thing.
I set about trying to understand and learn from the scripts and change things, then see what happened etc. I now have it such that a click on live tune sends longmynd to the correct frequency decodes it and displays a picture in totem, single click on another signal and it resets it all moves to the next frequency and displays that. There is no longer a reset option just an option to quit.
A few notes totem relies on codecs already installed on the pc, so if it does not decode everything you could try to install ubuntu-restricted-extras. Or, change the line from totem to vlc with a corresponding change in the quit script.
I have posted the two scripts below I could not attach them as files. 'auto' goes into home directory and 'quit' into the longmynd directory, You will need to run sudo chmod +x auto and sudo chmod +X quit to make them executable for them to run.
Thanks again to John for his work, have fun playing with the scripts and changing them to suit your own method of working, normally I have the line with totem rem'd out and the video streams are picked up by OBS top allow use in my transmit stream.
If you do not require the status from longmynd the use the line 'cat longmynd_main_status > /dev/null &' by removing the # and add # before the ./fake_read to stop that. I also run my streams to computer IP's to save flooding the home network with broadcasts.
Start with ./auto
auto:-
Code: Select all
#!/bin/bash
# Auto entry Freq & SR
clear
resize -s 12 80 # resize the screen to take up less space
cd ~/longmynd
gnome-terminal --geometry 31x6+0+0 -- ./quit & # Start routine to kill all
# Routine to read Live-tune
echo "Listening port 6789"
netcat -ul 6789 | while read line
do
killall -q longmynd fake_read totem
#cat longmynd_main_status > /dev/null &
echo “$line”
freq=$( awk -F "," '{print $2}' <<< $line | awk -F "=" '{print $2}' )
sr=$( awk -F "," '{print $5}' <<< $line | awk -F "=" '{print $2}' )
lnb_offset=$( awk -F "," '{print $3}' <<< $line | awk -F "=" '{print $2}' )
#echo “$freq”
#echo “$sr”
#echo “$lnb_offset”
# set frequency and symbolrate
freq2=$((freq - lnb_offset))
echo “Rx $freq with a symbolrate of $sr”
#sleep 0.5
# Start Rx process
./longmynd -i 192.168.1.40 20000 $freq2 $sr & # Start LongMynd
# cat longmynd_main_status > /dev/null &
./fake_read &
totem udp://0.0.0.0:20000/live &
clear
done
quit:-
Code: Select all
#!/bin/bash
while true; do
echo “Press Q to quit ? “ ;
read -n1 input;
if [ $input = q ] || [ $input = Q ]
then killall -q longmynd fake_read netcat auto totem # kill processes
printf "\n"
exit #close all terminal and end
else
echo “Invalid Option”
fi
printf "\n"
done
exit
Adrian