mirror of
https://github.com/km4ack/patmenu2.git
synced 2025-05-16 14:50:13 -07:00
commit
ffa39983b5
@ -66,7 +66,18 @@ if [[ $? -eq 0 ]]; then
|
|||||||
echo "Depending on your internet speed"
|
echo "Depending on your internet speed"
|
||||||
else
|
else
|
||||||
|
|
||||||
exit
|
#check for internet before attempting to download the list
|
||||||
|
|
||||||
|
internet=1 #set the test to false
|
||||||
|
|
||||||
|
while [ "$internet" = 1 ]; do
|
||||||
|
echo "check for internet connection"
|
||||||
|
ping -c 5 8.8.8.8
|
||||||
|
internet=$?
|
||||||
|
sleep 60 #wait one minute before trying again
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Internet connection detected"
|
||||||
fi
|
fi
|
||||||
#remove old files before downloading new ones
|
#remove old files before downloading new ones
|
||||||
if [ -f $THIRTY ]; then
|
if [ -f $THIRTY ]; then
|
||||||
|
@ -246,7 +246,7 @@ POSITION(){
|
|||||||
POST=$(yad --form --width=420 --text-align=center --center --title="Position" --text-align=center \
|
POST=$(yad --form --width=420 --text-align=center --center --title="Position" --text-align=center \
|
||||||
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
|
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
|
||||||
--text="<b>Position Reports</b> by KM4ACK" \
|
--text="<b>Position Reports</b> by KM4ACK" \
|
||||||
--field="Choose":CB "Post Position|Single Station Request|All Nearby Stations" \
|
--field="Choose":CB "Post Position|Single Station Request|All Nearby Stations|100 Mobile Stations" \
|
||||||
--field="Enter Call Below <b>ONLY</b> for Single Station Requests":LBL \
|
--field="Enter Call Below <b>ONLY</b> for Single Station Requests":LBL \
|
||||||
--field="Call Sign-SSID" \
|
--field="Call Sign-SSID" \
|
||||||
--field="Comment for Post Position" \
|
--field="Comment for Post Position" \
|
||||||
@ -283,6 +283,11 @@ elif [ "$REPORT" = "All Nearby Stations" ]; then
|
|||||||
SUBJECT="REQUEST"
|
SUBJECT="REQUEST"
|
||||||
BODY="WL2K_NEARBY"
|
BODY="WL2K_NEARBY"
|
||||||
COMPOSE
|
COMPOSE
|
||||||
|
elif [ "$REPORT" = "100 Mobile Stations" ]; then
|
||||||
|
TO="INQUIRY"
|
||||||
|
SUBJECT="REQUEST"
|
||||||
|
BODY="WL2K_MOBILES"
|
||||||
|
COMPOSE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
2
catalog
2
catalog
@ -18,6 +18,8 @@ yad --form --width=420 --text-align=center --center --title="Pat Catalog" --text
|
|||||||
--field="Position Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source $MYPATH/cat-functions; POSITION"' \
|
--field="Position Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source $MYPATH/cat-functions; POSITION"' \
|
||||||
--field="Propagation Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source $MYPATH/cat-functions; PROPAGATION"' \
|
--field="Propagation Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source $MYPATH/cat-functions; PROPAGATION"' \
|
||||||
--field="News Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source $MYPATH/cat-functions; NEWS"' \
|
--field="News Reports":fbtn 'bash -c "kill -USR1 $YAD_PID; source $MYPATH/cat-functions; NEWS"' \
|
||||||
|
--field="Send SMS":fbtn 'bash -c "kill -USR1 $YAD_PID; $HOME/patmenu2/sms/manage-sms"' \
|
||||||
|
--field="Convert WL2K_NEARBY to APRS":fbtn 'bash -c "kill -USR1 $YAD_PID; $HOME/patmenu2/convert_to_aprs"' \
|
||||||
--button="Main Menu":1
|
--button="Main Menu":1
|
||||||
|
|
||||||
QUIT=$?
|
QUIT=$?
|
||||||
|
11
changelog
11
changelog
@ -1,6 +1,15 @@
|
|||||||
release=2.8.0
|
release=2.9.0
|
||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
2.9.0 add 100 Mobiles to Position Request screen in catalog - https://github.com/km4ack/patmenu2/issues/51
|
||||||
|
fix stop modems - https://github.com/km4ack/patmenu2/issues/51
|
||||||
|
add wait for internet to getardoplist-cron - https://github.com/km4ack/patmenu2/issues/50
|
||||||
|
add convert WL2K_NEARBY to APRS in Pat Catalog - Thanks to Kenny, KC4OJS for the idea!
|
||||||
|
add convert_to_aprs file
|
||||||
|
fix issue #54 when starting VARA modems - https://github.com/km4ack/patmenu2/issues/54
|
||||||
|
add sms text feature
|
||||||
|
add sound card to quick stats
|
||||||
|
fix typo - https://github.com/km4ack/patmenu2/issues/57
|
||||||
2.8.0 redesign layout of main screen
|
2.8.0 redesign layout of main screen
|
||||||
add new modem menu
|
add new modem menu
|
||||||
add vara modem start (beta)
|
add vara modem start (beta)
|
||||||
|
91
convert_to_aprs
Executable file
91
convert_to_aprs
Executable file
@ -0,0 +1,91 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#scirpt to convert WL2K_NEARBY to POS file
|
||||||
|
#that can be imported into YAAC
|
||||||
|
#KM4ACK 01AUGUST2022
|
||||||
|
|
||||||
|
MYPATH=$HOME/patmenu2
|
||||||
|
LOGO=$MYPATH/pmlogo.png
|
||||||
|
MAIN=$MYPATH/./catalog
|
||||||
|
CONFIG=$HOME/.config/pat/config.json
|
||||||
|
PATCALL=$(grep mycall $HOME/.config/pat/config.json | head -1 | sed 's/"mycall": "//;s/",//;s/ //g')
|
||||||
|
LIST=$HOME/.local/share/pat/mailbox/$PATCALL/in
|
||||||
|
MAILBOX=$HOME/.local/share/pat/mailbox/$PATCALL/in
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#remove exiting file if it exist
|
||||||
|
if [ -f $HOME/Desktop/gateways.pos ]; then
|
||||||
|
rm $HOME/Desktop/gateways.pos
|
||||||
|
fi
|
||||||
|
|
||||||
|
#give user feedback
|
||||||
|
yad --center --timeout=2 --timeout-indicator=top --no-buttons \
|
||||||
|
--text="<b>Processing File</b>" &
|
||||||
|
|
||||||
|
#Look for the WL2K_NEARBY email
|
||||||
|
COUNT=0
|
||||||
|
#var=$((var+1))
|
||||||
|
for file in $MAILBOX/*
|
||||||
|
do
|
||||||
|
NEARBY_LIST=$(grep WL2K_NEARBY $file)
|
||||||
|
if [ -n "$NEARBY_LIST" ]; then
|
||||||
|
COUNT=$((COUNT+1))
|
||||||
|
if [ $COUNT -gt 1 ]; then
|
||||||
|
#Warn user about multiple WL2K_NEARBY Reports in inbox
|
||||||
|
yad --form --width=500 --text-align=center --center --title="WL2K to ARPS Object" --text-align=center \
|
||||||
|
--image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \
|
||||||
|
--text="<b>Multiples Found</b>\rBe sure only one WL2K_NEARBY report\ris in your inbox. Multiples will cause erroneous data." \
|
||||||
|
--button=gtk-ok
|
||||||
|
$MAIN &
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
FILE=$file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
#create a copy to work with
|
||||||
|
cp $FILE /run/user/$UID/tempgatelist
|
||||||
|
|
||||||
|
#check that we have a file. warn user if not
|
||||||
|
if [ $? = 1 ]; then
|
||||||
|
yad --form --width=500 --text-align=center --center --title="WL2K to ARPS Object" --text-align=center \
|
||||||
|
--image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \
|
||||||
|
--text="<b>FAILED</b>\rNo Nearby (WL2K_NEARBY) File Found in Inbox"
|
||||||
|
$MAIN &
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
#remove everything but the data we need at the top of the file
|
||||||
|
sed -i '1,17d' /run/user/$UID/tempgatelist
|
||||||
|
|
||||||
|
###########NOTE#############
|
||||||
|
#APRS symbol lookup table can be found at
|
||||||
|
#https://4.bp.blogspot.com/-ewK-9I_62wk/WIMI_LFpEII/AAAAAAAAWYA/xMso0AANY649LEWvOAjMIsmyPLWBwOszQCLcB/s1600/KWFAPRS_LUTv2.png
|
||||||
|
#In the echo command below I have used "\a" which produces a red diamond on the map. The "\" goes between the $LAT $LONG and the
|
||||||
|
#second character goes between the $LONG and $Comment
|
||||||
|
#########End Note###########
|
||||||
|
|
||||||
|
#process the file
|
||||||
|
while read -r line; do
|
||||||
|
CALL=$(echo $line | awk '{print $1}')
|
||||||
|
CALL=`printf "%-9s" $CALL`
|
||||||
|
LAT=$(echo $line | awk '{print $5}' | sed 's/-//')
|
||||||
|
LONG=$(echo $line | awk '{print $6}' | sed 's/-//')
|
||||||
|
COMMENT=$(echo $line | awk '{$1=$2=$3=$4=$5=$6=$7=$8=""; print $0}' | sed -e 's/^[ \t]*//')
|
||||||
|
TIME=$(date -u +%H%M%S)
|
||||||
|
|
||||||
|
# echo ";$CALL*$TIME""h""$LAT/$LONG-$COMMENT" >> ~/Desktop/gateways.pos (Produces a house on the map)
|
||||||
|
echo ";$CALL*$TIME""h""$LAT\\$LONG""a""$COMMENT" >> ~/Desktop/gateways.pos #(Produces a red diamond on the map)
|
||||||
|
done < /run/user/$UID/tempgatelist
|
||||||
|
|
||||||
|
#let user know processing is finished
|
||||||
|
yad --form --width=500 --text-align=center --center --title="WL2K to ARPS Object" --text-align=center \
|
||||||
|
--image ${LOGO} --window-icon=${LOGO} --image-on-top --separator="|" --item-separator="|" \
|
||||||
|
--text="<b>Processing done.</b>\rA gateways.pos file has been created and\r is on your desktop ready to import into YAAC." \
|
||||||
|
--button=gtk-ok
|
||||||
|
|
||||||
|
#remove the temp file
|
||||||
|
rm /run/user/$UID/tempgatelist
|
||||||
|
$MAIN &
|
||||||
|
exit
|
@ -147,6 +147,14 @@ TELNET=$(grep telnet, $SMD)
|
|||||||
ARDOP=$(grep ardop, $SMD)
|
ARDOP=$(grep ardop, $SMD)
|
||||||
AX25=$(grep ax25, $SMD)
|
AX25=$(grep ax25, $SMD)
|
||||||
PAT=$(pidof pat)
|
PAT=$(pidof pat)
|
||||||
|
CARD=$(arecord -l | grep USB | awk '{print $2;}' | sed 's/://')
|
||||||
|
|
||||||
|
#Check if sound card found
|
||||||
|
if [ -z $CARD ]; then
|
||||||
|
CARD="Not found"
|
||||||
|
else
|
||||||
|
CARD="$CARD,0"
|
||||||
|
fi
|
||||||
#Set telnet variable
|
#Set telnet variable
|
||||||
if [ -n "$TELNET" ]; then
|
if [ -n "$TELNET" ]; then
|
||||||
TELNET="telnet,"
|
TELNET="telnet,"
|
||||||
@ -183,6 +191,7 @@ yad --form --width=320 --text-align=center --center --title="Quick Stats" --text
|
|||||||
--field="Rig Control":RO "$RIG" \
|
--field="Rig Control":RO "$RIG" \
|
||||||
--field="Pat Port":RO "$PORT" \
|
--field="Pat Port":RO "$PORT" \
|
||||||
--field="Pat Server":RO "$PAT" \
|
--field="Pat Server":RO "$PAT" \
|
||||||
|
--field="Sound Card":RO "$CARD" \
|
||||||
--button=gtk-ok
|
--button=gtk-ok
|
||||||
$MAIN &
|
$MAIN &
|
||||||
exit
|
exit
|
||||||
|
39
sms/add-carrier
Executable file
39
sms/add-carrier
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#script to add phone carries to master list
|
||||||
|
#KM4ACK 02AUGUST2022
|
||||||
|
|
||||||
|
FILE=$HOME/patmenu2/sms/cellproviders.txt
|
||||||
|
MYTEMP=/run/user/$UID/templist.txt
|
||||||
|
MAIN=$HOME/patmenu2/sms/manage-sms
|
||||||
|
export MYPATH=$HOME/patmenu2
|
||||||
|
LOGO=$MYPATH/pmlogo.png
|
||||||
|
|
||||||
|
INFO=$(PARSER='OFS="\n" {print $1}'
|
||||||
|
|
||||||
|
tail -300 $FILE | awk "$PARSER" | \
|
||||||
|
yad --title="Search Results" --width=1100 --height=500 \
|
||||||
|
--image $LOGO --window-icon=$LOGO --image-on-top --multiple \
|
||||||
|
--center --list --text="Carrier List" \
|
||||||
|
--column Carrier \
|
||||||
|
--button="Cancel":1 \
|
||||||
|
--button="Add Carrier":2 > $MYTEMP)
|
||||||
|
BUT=$?
|
||||||
|
|
||||||
|
if [ $BUT = 1 ]; then
|
||||||
|
$MAIN &
|
||||||
|
exit
|
||||||
|
elif [ $BUT = 252 ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i 's/|//g' $MYTEMP
|
||||||
|
|
||||||
|
cat $MYTEMP >> $HOME/patmenu2/sms/myphonelist.txt
|
||||||
|
sort $HOME/patmenu2/sms/myphonelist.txt > /run/user/$UID/sortedlist
|
||||||
|
mv /run/user/$UID/sortedlist $HOME/patmenu2/sms/myphonelist.txt
|
||||||
|
|
||||||
|
yad --center --timeout=3 --timeout-indicator=top --no-buttons --text="The carrier list has been updated"
|
||||||
|
|
||||||
|
$MAIN &
|
||||||
|
exit
|
72
sms/cellproviders.txt
Normal file
72
sms/cellproviders.txt
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
3-River-Wireless=@sms.3rivers.net
|
||||||
|
ACS-Wireless=@paging.acswireless.com
|
||||||
|
Alltel=@message.alltel.com
|
||||||
|
ATT=@txt.att.net
|
||||||
|
Bell-Canada=@txt.bellmobility.ca
|
||||||
|
Bell-Canada=@bellmobility.ca
|
||||||
|
Bell-Mobility=@txt.bell.ca
|
||||||
|
Bell-Mobility=@txt.bellmobility.ca
|
||||||
|
Blue-Sky-Frog=@blueskyfrog.com
|
||||||
|
Bluegrass-Cellular=@sms.bluecell.com
|
||||||
|
Boost-Mobile=@myboostmobile.com
|
||||||
|
BPL-Mobile=@bplmobile.com
|
||||||
|
Carolina-West=@cwwsms.com
|
||||||
|
Cellular-One=@mobile.celloneusa.com
|
||||||
|
Cellular-South=@csouth1.com
|
||||||
|
Centennial-Wireless=@cwemail.com
|
||||||
|
CenturyTel=@messaging.centurytel.net
|
||||||
|
Cingular=@txt.att.net
|
||||||
|
Clearnet=@msg.clearnet.com
|
||||||
|
Comcast=@comcastpcs.textmsg.com
|
||||||
|
Corr-Wireless=@corrwireless.net
|
||||||
|
Dobson=@mobile.dobson.net
|
||||||
|
Edge-Wireless=@sms.edgewireless.com
|
||||||
|
Fido=@fido.ca
|
||||||
|
Golden-Telecom=@sms.goldentele.com
|
||||||
|
Helio=@messaging.sprintpcs.com
|
||||||
|
Houston-Cellular=@text.houstoncellular.net
|
||||||
|
Idea-Cellular=@ideacellular.net
|
||||||
|
Illinois-Valley-Cellular=@ivctext.com
|
||||||
|
Inland-Cellular=@inlandlink.com
|
||||||
|
MCI=@pagemci.com
|
||||||
|
Metroncall=@page.metrocall.com
|
||||||
|
Metrocall-2-Way=@my2way.com
|
||||||
|
Metro-PCS=@mymetropcs.com
|
||||||
|
Microcell=@fido.ca
|
||||||
|
Midwest-Wireless=@clearlydigital.com
|
||||||
|
Mobilcomm=@mobilecomm.net
|
||||||
|
MTS=@text.mtsmobility.com
|
||||||
|
Nextel=@messaging.nextel.com
|
||||||
|
OnlineBeep=@onlinebeep.net
|
||||||
|
PCS-One=@pcsone.net
|
||||||
|
Presidents-Choice=@txt.bell.ca
|
||||||
|
Public-Service-Cellular=@sms.pscel.com
|
||||||
|
Quest=@qwestmp.com
|
||||||
|
10digitphonenumber=@pcs.rogers.com
|
||||||
|
Rogers-Canada=@pcs.rogers.com
|
||||||
|
Satellink=.pageme@satellink.net
|
||||||
|
Southwestern-Bell=@email.swbw.com
|
||||||
|
Sprint=@messaging.sprintpcs.com
|
||||||
|
Sumcom=@tms.suncom.com
|
||||||
|
Surewest-Comms=@mobile.surewest.com
|
||||||
|
T-Mobile=@tmomail.net
|
||||||
|
Telus=@msg.telus.com
|
||||||
|
Tracfone=@txt.att.net
|
||||||
|
Triton=@tms.suncom.com
|
||||||
|
Unicel=@utext.com
|
||||||
|
US-Cellular=@email.uscc.net
|
||||||
|
Solo-Mobile=@txt.bell.ca
|
||||||
|
Sprint=@messaging.sprintpcs.com
|
||||||
|
Sumcom=@tms.suncom.com
|
||||||
|
Surewest=@mobile.surewest.com
|
||||||
|
T-Mobile=@tmomail.net
|
||||||
|
Telus=@msg.telus.com
|
||||||
|
Triton=@tms.suncom.com
|
||||||
|
Unicel=@utext.com
|
||||||
|
US-Cellular=@email.uscc.net
|
||||||
|
US-West=@uswestdatamail.com
|
||||||
|
Verizon=@vtext.com
|
||||||
|
Virgin-Mobile=@vmobl.com
|
||||||
|
Virgin-Mobile-Canada=@vmobile.ca
|
||||||
|
West-Central=@sms.wcc.net
|
||||||
|
Western-Wireless=@cellularonewest.com
|
25
sms/current-carriers
Executable file
25
sms/current-carriers
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#script to add phone carries to master list
|
||||||
|
#KM4ACK 02AUGUST2022
|
||||||
|
|
||||||
|
FILE=$HOME/patmenu2/sms/myphonelist.txt
|
||||||
|
MYTEMP=/run/user/$UID/templist.txt
|
||||||
|
MAIN=$HOME/patmenu2/sms/manage-sms
|
||||||
|
export MYPATH=$HOME/patmenu2
|
||||||
|
LOGO=$MYPATH/pmlogo.png
|
||||||
|
|
||||||
|
INFO=$(PARSER='OFS="\n" {print $1}'
|
||||||
|
|
||||||
|
tail -300 $FILE | awk "$PARSER" | \
|
||||||
|
yad --title="Search Results" --width=600 --height=500 \
|
||||||
|
--image $LOGO --window-icon=$LOGO --image-on-top --multiple \
|
||||||
|
--center --list --text="Carrier List" \
|
||||||
|
--column Carrier \
|
||||||
|
--button=gtk-ok)
|
||||||
|
BUT=$?
|
||||||
|
if [ $BUT = 252 ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
$MAIN
|
28
sms/manage-sms
Executable file
28
sms/manage-sms
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#Pat SMS Manager
|
||||||
|
#20220720 KM4ACK
|
||||||
|
|
||||||
|
|
||||||
|
export MYPATH=$HOME/patmenu2
|
||||||
|
LOGO=$MYPATH/pmlogo.png
|
||||||
|
MAIN=$MYPATH/./patmenu
|
||||||
|
|
||||||
|
|
||||||
|
yad --form --width=420 --text-align=center --center --title="Pat SMS Manager" --text-align=center \
|
||||||
|
--image $LOGO --window-icon=$LOGO --image-on-top --separator="|" --item-separator="|" \
|
||||||
|
--text="<b>Pat SMS Manager</b> by KM4ACK" \
|
||||||
|
--field="Show Current Carrier List":fbtn 'bash -c "kill -USR1 $YAD_PID; $MYPATH/sms/current-carriers"' \
|
||||||
|
--field="Add Carriers":fbtn 'bash -c "kill -USR1 $YAD_PID; $MYPATH/sms/add-carrier"' \
|
||||||
|
--field="Remove Carriers":fbtn 'bash -c "kill -USR1 $YAD_PID; $MYPATH/sms/remove-carrier"' \
|
||||||
|
--field="Send Text Message":fbtn 'bash -c "kill -USR1 $YAD_PID; $MYPATH/sms/winlink2sms"' \
|
||||||
|
--button="Main Menu":1
|
||||||
|
|
||||||
|
BUT=$?
|
||||||
|
|
||||||
|
if [ $BUT = 1 ]; then
|
||||||
|
$MAIN &
|
||||||
|
exit
|
||||||
|
elif [ $BUT = 252 ]; then
|
||||||
|
exit
|
||||||
|
fi
|
5
sms/myphonelist.txt
Normal file
5
sms/myphonelist.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
ATT=@txt.att.net
|
||||||
|
Sprint=@messaging.sprintpcs.com
|
||||||
|
T-Mobile=@tmomail.net
|
||||||
|
Verizon=@vtext.com
|
||||||
|
Unknown=
|
39
sms/remove-carrier
Executable file
39
sms/remove-carrier
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#script to remove phone carries to master list
|
||||||
|
#KM4ACK 02AUGUST2022
|
||||||
|
|
||||||
|
FILE=$HOME/patmenu2/sms/myphonelist.txt
|
||||||
|
MYTEMP=/run/user/$UID/templist.txt
|
||||||
|
MAIN=$HOME/patmenu2/sms/manage-sms
|
||||||
|
export MYPATH=$HOME/patmenu2
|
||||||
|
LOGO=$MYPATH/pmlogo.png
|
||||||
|
|
||||||
|
INFO=$(PARSER='OFS="\n" {print $1}'
|
||||||
|
|
||||||
|
tail -300 $FILE | awk "$PARSER" | \
|
||||||
|
yad --title="Search Results" --width=600 --height=500 \
|
||||||
|
--image $LOGO --window-icon=$LOGO --image-on-top --multiple \
|
||||||
|
--center --list --text="Current Carrier List" \
|
||||||
|
--column Carrier \
|
||||||
|
--button="Cancel":1 \
|
||||||
|
--button="Remove Carrier":2 > $MYTEMP)
|
||||||
|
BUT=$?
|
||||||
|
|
||||||
|
if [ $BUT = 1 ]; then
|
||||||
|
$MAIN &
|
||||||
|
exit
|
||||||
|
elif [ $BUT = 252 ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i 's/|//g' $MYTEMP
|
||||||
|
|
||||||
|
while read -r line; do
|
||||||
|
sed -i "/$line/d" $FILE
|
||||||
|
done < $MYTEMP
|
||||||
|
|
||||||
|
yad --center --timeout=3 --timeout-indicator=top --no-buttons --text="The carrier list has been updated"
|
||||||
|
|
||||||
|
$MAIN &
|
||||||
|
exit
|
93
sms/winlink2sms
Executable file
93
sms/winlink2sms
Executable file
@ -0,0 +1,93 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#Script to send text message to regular cellphones via Winlink
|
||||||
|
#20JULY2022 KM4ACK
|
||||||
|
|
||||||
|
#subject CANNOT be blank
|
||||||
|
SUBJECT="Winlink text msg"
|
||||||
|
#PHONE_LIST=/run/user/$UID/my_phonelist.txt
|
||||||
|
PHONE_LIST=$HOME/patmenu2/sms/myphonelist.txt
|
||||||
|
MAIN=$HOME/patmenu2/sms/manage-sms
|
||||||
|
|
||||||
|
UNKNOWN(){
|
||||||
|
#send message to every carrier in the list
|
||||||
|
while read line in ; do
|
||||||
|
CARRIER=$(echo $line | awk -F "=" '{print $2}')
|
||||||
|
if [ -n "$CARRIER" ]; then
|
||||||
|
TO="-c $PHONE$CARRIER"
|
||||||
|
echo $TO >> /run/user/$UID/$PHONE.txt
|
||||||
|
fi
|
||||||
|
done <$PHONE_LIST
|
||||||
|
|
||||||
|
#remove the "-c" from the first address on the list
|
||||||
|
sed -i '0,/-c /{s/-c //}' /run/user/$UID/$PHONE.txt
|
||||||
|
TO=$(cat /run/user/$UID/$PHONE.txt)
|
||||||
|
rm /run/user/$UID/$PHONE.txt
|
||||||
|
|
||||||
|
#compose message and send to pat outbox
|
||||||
|
echo "$MESSAGE" | pat compose $TO -s "$SUBJECT"
|
||||||
|
yad --center --timeout=3 --timeout-indicator=top --no-buttons --text="Message posted to Pat outbox." &
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
#get list of carriers to populate dialog carrier box on main screen
|
||||||
|
CARRIER=$(cat $PHONE_LIST | awk -F"=" '{print $1"|"}')
|
||||||
|
|
||||||
|
#main menu
|
||||||
|
SETTING=$(yad --center --width=500 --wrap --window-icon=$HOME/Pi-APRS/ISS.png \
|
||||||
|
--title="Send Text Messages via Winlink" --text="Please complete the following:" \
|
||||||
|
--form --separator="|" --item-separator="|" \
|
||||||
|
--field="Phone Number" "$PHONE" \
|
||||||
|
--field="Carrier":CB "${CARRIER[@]}" \
|
||||||
|
--field="Message" "$MSG" \
|
||||||
|
--button="Post Message" \
|
||||||
|
--button="Cancel"
|
||||||
|
)
|
||||||
|
BUT=$?
|
||||||
|
|
||||||
|
#check to see if user wants to exit
|
||||||
|
if [ $BUT = 252 ]; then
|
||||||
|
echo "goodbye"
|
||||||
|
exit
|
||||||
|
elif [ $BUT = 1 ]; then
|
||||||
|
$MAIN &
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
#check to see if carrier is unknown. If so, send to UNKNOWN function.
|
||||||
|
CARRIER=$(echo $SETTING | awk -F"|" '{print $2}' | sed 's/ //')
|
||||||
|
if [ "$CARRIER" = 'Unknown' ]; then
|
||||||
|
PHONE=$(echo $SETTING | awk -F"|" '{print $1}')
|
||||||
|
MESSAGE=$(echo $SETTING | awk -F"|" '{print $3}')
|
||||||
|
UNKNOWN
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
PHONE=$(echo $SETTING | awk -F"|" '{print $1}' | sed 's/ //g')
|
||||||
|
CARRIER=$(echo $SETTING | awk -F"|" '{print $2}' | sed 's/ //g')
|
||||||
|
CARRIER=$(cat $PHONE_LIST | grep "$CARRIER" | sed 's/.*=//')
|
||||||
|
TO=$PHONE$CARRIER
|
||||||
|
MESSAGE=$(echo $SETTING | awk -F"|" '{print $3}')
|
||||||
|
|
||||||
|
if [ -z "$PHONE" ]; then
|
||||||
|
yad --center --width=300 --wrap --window-icon=$HOME/Pi-APRS/ISS.png \
|
||||||
|
--title="ERROR" --text="Phone Number Can't Be Blank!" \
|
||||||
|
--button=gtk-ok
|
||||||
|
$MAIN &
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo "$MESSAGE" | pat compose "$TO" -s "$SUBJECT"
|
||||||
|
|
||||||
|
yad --center --timeout=3 --timeout-indicator=top --no-buttons --text="Message posted to Pat outbox."
|
||||||
|
$MAIN &
|
||||||
|
exit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -99,7 +99,7 @@ SETRIG
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "starting VARA-FM"
|
echo "starting VARA-FM"
|
||||||
/usr/local/bin/wine /home/pi/.wine/drive_c/VARA\ FM/VARAFM.exe > /dev/null 2>&1 &
|
/usr/local/bin/wine $HOME/.wine/drive_c/VARA\ FM/VARAFM.exe > /dev/null 2>&1 &
|
||||||
sleep 7 #give vara time to start
|
sleep 7 #give vara time to start
|
||||||
|
|
||||||
#verify vara has started
|
#verify vara has started
|
||||||
|
@ -98,8 +98,8 @@ PIDCTL=$(pidof rigctld)
|
|||||||
SETRIG
|
SETRIG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "starting VARA-FM"
|
echo "starting VARA HF"
|
||||||
/usr/local/bin/wine /home/pi/.wine/drive_c/VARA/VARA.exe > /dev/null 2>&1 &
|
/usr/local/bin/wine $HOME/.wine/drive_c/VARA/VARA.exe > /dev/null 2>&1 &
|
||||||
sleep 7 #give vara time to start
|
sleep 7 #give vara time to start
|
||||||
|
|
||||||
#verify vara has started
|
#verify vara has started
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#20191117 km4ack
|
#20191117 km4ack
|
||||||
|
#20220614 edit by KM4ACK
|
||||||
|
|
||||||
MYPATH=$HOME/patmenu2
|
MYPATH=$HOME/patmenu2
|
||||||
LOGO=$MYPATH/pmlogo.png
|
LOGO=$MYPATH/pmlogo.png
|
||||||
|
|
||||||
#stop all modems that might be running
|
#stop all modems that might be running
|
||||||
|
|
||||||
sudo killall direwolf piardopc kissattach piARDOP_GUI > /dev/null 2>&1
|
sudo killall direwolf piardopc kissattach piARDOP_GUI rigctld > /dev/null 2>&1
|
||||||
sudo rfcomm release /dev/rfcomm0 > /dev/null 2>&1
|
sudo rfcomm release /dev/rfcomm0 > /dev/null 2>&1
|
||||||
|
VARA=$(ps aux | grep wine | grep VARA | head -1 | awk '{print $2}')
|
||||||
|
kill -9 $VARA > /dev/null 2>&1
|
||||||
|
VARA=$(ps aux | grep wine | grep VARA | head -1 | awk '{print $2}')
|
||||||
|
kill -9 $VARA > /dev/null 2>&1
|
||||||
|
|
||||||
yad --title="Modem Stopped" --width=400 --height=100 \
|
yad --title="Modem Stopped" --width=400 --height=100 \
|
||||||
--image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
|
--image $LOGO --window-icon=$LOGO --image-on-top --text-align=center \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user